login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A089733
Begin with 1; add a distinct prime to get a composite number, then add a distinct composite number to get a prime; repeat.
0
1, 4, 13, 15, 19, 24, 59, 66, 131, 142, 157, 170, 191, 208, 233, 252, 307, 330, 379, 408, 499, 530, 557, 594, 709, 750, 827, 870, 991, 1038, 1123, 1176, 1301, 1360, 1399, 1460, 1493, 1560, 1693, 1764, 1907, 1980, 2099, 2178, 2273, 2356, 2437, 2526, 2671, 2768
OFFSET
1,2
COMMENTS
a(2n) - a(2n-1) = prime(n) for n > 2.
MAPLE
p:=[]:c:=[]:a:=[1]:for n from 2 to 60 do for i from 2 do m:=a[n-1]+i: if n mod 2=0 then if isprime(i) and not isprime(m) and not member(i, p) then p:=[op(p), i]: a:=[op(a), m]: break fi else if isprime(m) and not isprime(i) and not member(i, c) then c:=[op(c), i]: a:=[op(a), m]: break fi fi od od: op(a); # C. Ronaldo
CROSSREFS
Sequence in context: A014563 A066774 A075339 * A126908 A106681 A144947
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 19 2003
EXTENSIONS
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 26 2004
STATUS
approved