login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280029 a(1)=3; thereafter, if n odd, a(n) = a(n-1)-st prime, and if n even, a(n) = a(n-1)-st nonprime. 3
3, 6, 13, 21, 73, 98, 521, 636, 4721, 5439, 53323, 59318, 737183, 801235, 12215237, 13068626, 238205651, 251987681, 5381022817, 5644769560, 138933578143, 144807081479, 4053430178401, 4203399920996, 132332669898119, 136669373292795, 4793783797371011 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is the sequence S_2 mentioned in A141436. The primes and nonprimes alternate.
LINKS
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
Sequence in context: A034734 A329766 A019079 * A178097 A361276 A211870
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)