[go: up one dir, main page]

login
Revision History for A082934 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
#8 by N. J. A. Sloane at Tue Oct 01 17:57:38 EDT 2013
AUTHOR

_Cino Hilliard (hillcino368(AT)gmail.com), _, May 26 2003

Discussion
Tue Oct 01
17:57
OEIS Server: https://oeis.org/edit/global/1955
#7 by Russ Cox at Fri Mar 30 17:28:18 EDT 2012
EXTENSIONS

Edited by _Charles R Greathouse IV (charles.greathouse(AT)case.edu), _, Oct 09 2009

Discussion
Fri Mar 30
17:28
OEIS Server: https://oeis.org/edit/global/147
#6 by N. J. A. Sloane at Tue Jun 01 03:00:00 EDT 2010
NAME

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.

A082928(1) + A082928(2) + ... + A082928(n).

COMMENTS

The ratio of seq(n-1)/seq(n) approaches .99999...986666... as n -> oo

PROG

(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)))};

KEYWORD

easy,nonn,uned,new

EXTENSIONS

Edited by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Oct 09 2009

#5 by N. J. A. Sloane at Fri May 11 03:00:00 EDT 2007
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, ...

KEYWORD

easy,nonn,uned,new

#4 by N. J. A. Sloane at Wed Dec 06 03:00:00 EST 2006
KEYWORD

easy,nonn,uned,new

AUTHOR

Cino Hilliard (hillcino368(AT)hotmailgmail.com), May 26 2003

#3 by N. J. A. Sloane at Fri Feb 24 03:00:00 EST 2006
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, ..

KEYWORD

easy,nonn,uned,new

#2 by N. J. A. Sloane at Thu Feb 19 03:00:00 EST 2004
PROG

(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) }

KEYWORD

easy,nonn,uned,new

#1 by N. J. A. Sloane at Sat Sep 13 03:00:00 EDT 2003
NAME

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.

DATA

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

OFFSET

1,2

COMMENTS

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,..

PROG

(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) }

KEYWORD

easy,nonn,uned

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), May 26 2003

STATUS

approved