_Cino Hilliard (hillcino368(AT)gmail.com), _, May 26 2003
_Cino Hilliard (hillcino368(AT)gmail.com), _, May 26 2003
Edited by _Charles R Greathouse IV (charles.greathouse(AT)case.edu), _, Oct 09 2009
The ratio of seq(n-1)/seq(n) approaches .99999...986666... as n -> oo
(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) }
(PARI) a(n)={sum(k=1, n, if(isprime(k), k+1, if(k%2, k, k/2)))};
easy,nonn,uned,new
Edited by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Oct 09 2009
seq = if n even then n/2 else n. seq = if n is prime then n+1. Sumseq = Sumseq + seq for n=1, 2, ...
easy,nonn,uned,new
easy,nonn,uned,new
Cino Hilliard (hillcino368(AT)hotmailgmail.com), May 26 2003
seq = if n even then n/2 else n. seq = if n is prime then n+1. Sumseq = Sumseq + seq for n=1, 2, ..
easy,nonn,uned,new
(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) }
easy,nonn,uned,new
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.
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
1,2
The ratio of seq(n-1)/seq(n) approaches .99999...986666... as n -> oo
seq = if n even then n/2 else n. seq = if n is prime then n+1. Sumseq = Sumseq + seq for n=1,2,..
(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) }
easy,nonn,uned
Cino Hilliard (hillcino368(AT)hotmail.com), May 26 2003
approved