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 A339616 #10 Dec 14 2020 05:19:02 %S A339616 2,11,3,23,29,5,13,31,7,41,43,37,47,53,59,17,61,67,71,83,89,19,97,73, %T A339616 101,103,107,79,109,127,113,149,131,151,157,137,139,163,167,173,181, %U A339616 179,211,191,193,197,223,199,227,229,233,239,241,251,257,263,269,271,281,283,277,293,307,311,331,337,313,347 %N A339616 The Judd Trump's "infinite plant" sequence: prime numbers become nonprime numbers by striking the cue ball 2 with a cue stick to the right (see the Comments section). %C A339616 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 nonprimes only (with duplicates, sometimes); the starting sequence (this one) is the lexicographically earliest with this property that has no duplicates and no nonprimes. %e A339616 Striking 2 to the right pushes 2 against 11; %e A339616 the last digit of 11 is then pushed against 3 (leaving 21 behind - a nonprime); %e A339616 the last digit of 3 is then pushed against 23 (leaving 1 behind - a nonprime); %e A339616 the last digit of 23 is then pushed against 29 (leaving 32 behind - a nonprime); %e A339616 the last digit of 29 is then pushed against 5 (leaving 32 behind - a nonprime); %e A339616 the last digit of 5 is then pushed against 13 (leaving 9 behind - a nonprime); %e A339616 etc. %e A339616 This is the lexicographically earliest sequence of distinct positive terms with this property. %o A339616 (Python) %o A339616 from sympy import isprime %o A339616 def aupto(n): %o A339616 alst, used, strakm1 = [0, 2], {2}, "2" %o A339616 for k in range(2, n+1): %o A339616 ball = (str(alst[k-1]))[-1] %o A339616 ak = 1 %o A339616 ball_left = ball + (str(ak))[:-1] %o A339616 while isprime(int(ball_left)) or ak in used or not isprime(ak): %o A339616 ak += 2 # continue to only test odds %o A339616 ball_left = ball + (str(ak))[:-1] %o A339616 alst.append(ak) %o A339616 used.add(ak) %o A339616 return alst[1:] # use alst[n] for a(n) function %o A339616 print(aupto(70)) # _Michael S. Branicky_, Dec 11 2020 %Y A339616 Cf. A339467 (the Ronnie O'Sullivan sequence). %K A339616 base,nonn %O A339616 1,1 %A A339616 _Eric Angelini_ and _Carole Dubois_, Dec 10 2020