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 A339467 #27 Dec 14 2020 05:16:08 %S A339467 1,12,4,14,15,6,16,18,32,8,33,9,72,34,35,36,74,38,39,75,91,76,77,92, %T A339467 93,78,94,192,95,96,132,98,99,111,133,112,114,194,195,212,115,213,116, %U A339467 134,196,135,214,198,117,272,118,119,291,136,138,215,216,171,273,172,231,274,217,275,218,219,292,232,234,312,235 %N A339467 The Ronnie O'Sullivan's "infinite plant" sequence: nonprime numbers become prime numbers by striking the cue ball 1 with a cue stick to the right (see the Comments section). %C A339467 There is a non-snooker description of this sequence: first erase all spaces between terms; then move every comma 1 position to the left; the new sequence is now made by primes only (with duplicates, sometimes); the starting sequence (this one) is the lexicographically earliest with this property that has no duplicates and no primes. %H A339467 Carole Dubois, <a href="/A339467/b339467.txt">Table of n, a(n) for n = 1..5000</a> %e A339467 Striking 1 to the right pushes 1 against 12; %e A339467 the last digit of 12 is then pushed against 4 (leaving 11 behind - a prime); %e A339467 the last digit of 4 is then pushed against 14 (leaving 2 behind - a prime); %e A339467 the last digit of 14 is then pushed against 15 (leaving 41 behind - a prime); %e A339467 the last digit of 15 is then pushed against 6 (leaving 41 behind - a prime); %e A339467 the last digit of 6 is then pushed against 16 (leaving 5 behind - a prime); etc. %e A339467 This is the lexicographically earliest sequence of distinct positive terms with this property %o A339467 (Python) %o A339467 from sympy import isprime %o A339467 def aupto(n): %o A339467 alst, used = [0, 1], {1} %o A339467 for k in range(2, n+1): %o A339467 ball = (str(alst[k-1]))[-1] %o A339467 ak = 1 %o A339467 ball_left = ball + (str(ak))[:-1] %o A339467 while not isprime(int(ball_left)) or ak in used or isprime(ak): %o A339467 ak += 1 + (ak%10 == 9) # can't end in 0 %o A339467 ball_left = ball + (str(ak))[:-1] %o A339467 alst.append(ak) %o A339467 used.add(ak) %o A339467 return alst[1:] # use alst[n] for a(n) function %o A339467 print(aupto(64)) # _Michael S. Branicky_, Dec 07 2020 %Y A339467 Cf. A339616 (the Judd Trump sequence), A335972, A335973. %K A339467 base,nonn %O A339467 1,2 %A A339467 _Eric Angelini_ and _Carole Dubois_, Dec 06 2020