This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A064960 #17 Apr 03 2023 10:36:10 %S A064960 1,2,6,13,22,79,108,593,722,5471,6290,62653,69558,876329,951338, %T A064960 14679751,15692307,289078661,305618710,6588286337,6908033000, %U A064960 171482959009,178668550322,5040266614919,5225256019175,165678678591359,171068472492228,6039923990345039 %N 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. %H A064960 Chai Wah Wu, <a href="/A064960/b064960.txt">Table of n, a(n) for n = 1..31</a> %H A064960 Andrew R. Booker, <a href="https://t5k.org/nthprime/">The Nth Prime Page</a> %H A064960 N. Fernandez, <a href="http://www.borve.org/primeness/FOP.html">An order of primeness, F(p)</a> %H A064960 N. Fernandez, <a href="/A006450/a006450.html">An order of primeness</a> [cached copy, included with permission of the author] %t A064960 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 %o A064960 (Python) %o A064960 from functools import cache %o A064960 from sympy import prime, composite %o A064960 @cache %o A064960 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 %Y A064960 Cf. A007097, A006508 & A064961, see also A057450, A057451, A057452, A057453, A057456 & A057457 and A049076, A049077, A049078, A049079, A049080 & A049081. %K A064960 nonn %O A064960 1,2 %A A064960 _Robert G. Wilson v_, Oct 29 2001 %E A064960 a(26)-a(28) from _Chai Wah Wu_, May 07 2018