|
Search: id:A082934
|
|
|
| A082934 |
|
Sum of numbers generated from the consecutive numbers n = 1,2,.. according to the rule in exact order: if n is even then divide n by 2, if n is odd keep it, if n is prime add 1 to n. |
|
+0 1
|
|
| 1, 4, 8, 10, 16, 19, 27, 31, 40, 45, 57, 63, 77, 84, 99, 107, 125, 134, 154, 164, 185, 196, 220, 232, 257, 270, 297, 311, 341, 356, 388, 404, 437, 454, 489, 507, 545, 564, 603, 623, 665, 686, 730, 752, 797, 820, 868, 892, 941, 966, 1017, 1043, 1097, 1124, 1179
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
The ratio of seq(n-1)/seq(n) approaches .99999...986666... as n -> oo
|
|
FORMULA
|
seq = if n even then n/2 else n. seq = if n is prime then n+1. Sumseq = Sumseq + seq for n=1, 2, ...
|
|
PROGRAM
|
(PARI) crazy1(n) = { s=0; tmp; for(x=1, n, if(x%2==0, y=x/2, y=x); if(isprime(x), y=x+1); s=s+y; \ print1(y" ") print1(s" "); tmp=s1; s1=s2; s2=tmp; ); print(); print(s1/s2"="s1/s2+0.0) }
|
|
CROSSREFS
|
Sequence in context: A120064 A028873 A020169 this_sequence A036311 A020209 A046559
Adjacent sequences: A082931 A082932 A082933 this_sequence A082935 A082936 A082937
|
|
KEYWORD
|
easy,nonn,uned
|
|
AUTHOR
|
Cino Hilliard (hillcino368(AT)gmail.com), May 26 2003
|
|
|
Search completed in 0.002 seconds
|