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 A163578 #16 Sep 05 2025 10:28:36 %S A163578 2,4,6,7,8,11,12,13,17,19,20,23,24,29,31,37,38,41,42,43,47,53,54,59, %T A163578 61,67,71,73,74,79,80,83,89,97,101,103,104,107,109,113,114,127,128, %U A163578 131,137,139,140,149,151,157,163,167,168,173,179,181,191,193,194,197,198,199 %N A163578 If n is prime, a(n) is next composite greater than a(n-1), else if n is composite, a(n) is next prime greater than a(n-1) else 2. %H A163578 Paolo Xausa, <a href="/A163578/b163578.txt">Table of n, a(n) for n = 1..10000</a> %e A163578 1 is not prime, a(1)=2. %e A163578 2 is prime, a(2)=4. %e A163578 3 is prime, a(3)=6. %e A163578 4 is composite, a(4)=7. %t A163578 Join[{2, 4}, FoldList[If[PrimeQ[#2], #+1, NextPrime[#]] &, 6, Range[4, 100]]] (* _Paolo Xausa_, Sep 03 2025 *) %Y A163578 Cf. A159559, A178663. %K A163578 nonn,changed %O A163578 1,1 %A A163578 _Gerald Hillier_, Jul 31 2009 %E A163578 More terms from _Paolo Xausa_, Sep 03 2025