[go: up one dir, main page]

login
A076975
a(1) = 1, a(2n) = smallest composite number > (2n-1)-th partial sum of the sequence itself and a(2n+1) = smallest prime > 2n-th partial sum of the sequence.
1
1, 4, 7, 14, 29, 56, 113, 225, 457, 908, 1823, 3638, 7283, 14559, 29123, 58241, 116483, 232965, 465931, 931861, 1863731, 3727453, 7454933, 14909839, 29819701, 59639379, 119278801, 238557559, 477115271, 954230389, 1908460819, 3816921597
OFFSET
1,2
PROG
(PARI) print1(1, ", "); s=1; for(i=2, 100, n=s+1; if(i%2==0, while( isprime(n), n++), while(!isprime(n), n++)); s+=n; print1(n, ", ")) - Lambert Herrgesell (zero815(AT)googlemail.com), Mar 09 2006
CROSSREFS
Cf. A076974.
Sequence in context: A305124 A094968 A049946 * A050343 A245002 A199628
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 23 2002
EXTENSIONS
More terms from Lambert Herrgesell (zero815(AT)googlemail.com), Mar 09 2006
STATUS
approved