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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A064960 The prime then composite recurrence; a(2n) = a(2n-1)-th prime and a(2n+1) = a(2n)-th composite and a(1) = 1. 2
 1, 2, 6, 13, 22, 79, 108, 593, 722, 5471, 6290, 62653, 69558, 876329, 951338, 14679751, 15692307, 289078661, 305618710, 6588286337, 6908033000, 171482959009, 178668550322, 5040266614919, 5225256019175, 165678678591359, 171068472492228, 6039923990345039 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Chai Wah Wu, Table of n, a(n) for n = 1..31 Andrew R. Booker, The Nth Prime Page N. Fernandez, An order of primeness, F(p) N. Fernandez, An order of primeness [cached copy, included with permission of the author] MATHEMATICA Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a = {1}; b = 1; Do[ If[ !PrimeQ[b], b = Prime[b], b = Composite[b]]; a = Append[a, b], {n, 1, 23}]; a PROG (Python) from functools import cache from sympy import prime, composite @cache def A064960(n): return 1 if n == 1 else composite(A064960(n-1)) if n % 2 else prime(A064960(n-1)) # Chai Wah Wu, Jan 01 2022 CROSSREFS Cf. A007097, A006508 & A064961, see also A057450, A057451, A057452, A057453, A057456 & A057457 and A049076, A049077, A049078, A049079, A049080 & A049081. Sequence in context: A026052 A049616 A258603 * A293503 A143689 A180773 Adjacent sequences: A064957 A064958 A064959 * A064961 A064962 A064963 KEYWORD nonn AUTHOR Robert G. Wilson v, Oct 29 2001 EXTENSIONS a(26)-a(28) from Chai Wah Wu, May 07 2018 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.

Last modified September 23 10:17 EDT 2023. Contains 365544 sequences. (Running on oeis4.)