OFFSET
1,1
COMMENTS
This is the sequence S_2 mentioned in A141436. The primes and nonprimes alternate.
MAPLE
# See A280028 for Maple program
MATHEMATICA
nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@ n]; a[n_] := a[n] = If[OddQ@ n, Prime@ a[n -1], nonPrime[ a[n -1]]]; a[1] = 3; Array[a, 26] *( Robert G. Wilson v, Dec 28 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 25 2016
EXTENSIONS
a(12)-a(26) from Hans Havermann, Dec 25 2016
a(27) from Chai Wah Wu, Dec 27 2016
STATUS
approved