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 A373808 #26 Aug 15 2024 16:01:32 %S A373808 2,4,9,19,10,19,18,37,22,43,32,65,131,42,83,54,109,60,119,237,473,945, %T A373808 1889,90,181,100,199,108,217,435,871,1743,3487,6975,13951,27903,55807, %U A373808 162,323,645,1289,182,365,731,1463,2927,210,419,228,457,232,463,242,485,971,262,523,272,545,1091,282 %N A373808 If a(n-1) is not a prime, then a(n) = 2*a(n-1) + S; otherwise set S = -S and a(n) = prime(n) + S; start with a(1) = 2, S = -1. %C A373808 Similar to A373805, but with different initial values. Contains a repeated term (19), but that is allowed. Merges with A373805 at a(10) = 22. The primes here are therefore essentially the same as the primes in A373805: see A373806 and A373807. %H A373808 N. J. A. Sloane, <a href="/A373808/b373808.txt">Table of n, a(n) for n = 1..5000</a> %t A373808 Module[{n = 1, s = -1}, NestList[If[n++; PrimeQ[#], Prime[n] + (s = -s), 2*# + s] &, 2, 100]] (* _Paolo Xausa_, Aug 13 2024 *) %Y A373808 Cf. A373805, A373806, A373807. %K A373808 nonn %O A373808 1,1 %A A373808 _N. J. A. Sloane_, Aug 12 2024