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).
1, 12, 4, 14, 15, 6, 16, 18, 32, 8, 33, 9, 72, 34, 35, 36, 74, 38, 39, 75, 91, 76, 77, 92, 93, 78, 94, 192, 95, 96, 132, 98, 99, 111, 133, 112, 114, 194, 195, 212, 115, 213, 116, 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
Offset: 1
Examples
Striking 1 to the right pushes 1 against 12; the last digit of 12 is then pushed against 4 (leaving 11 behind - a prime); the last digit of 4 is then pushed against 14 (leaving 2 behind - a prime); the last digit of 14 is then pushed against 15 (leaving 41 behind - a prime); the last digit of 15 is then pushed against 6 (leaving 41 behind - a prime); the last digit of 6 is then pushed against 16 (leaving 5 behind - a prime); etc. This is the lexicographically earliest sequence of distinct positive terms with this property
Links
- Carole Dubois, Table of n, a(n) for n = 1..5000
Programs
-
Python
from sympy import isprime def aupto(n): alst, used = [0, 1], {1} for k in range(2, n+1): ball = (str(alst[k-1]))[-1] ak = 1 ball_left = ball + (str(ak))[:-1] while not isprime(int(ball_left)) or ak in used or isprime(ak): ak += 1 + (ak%10 == 9) # can't end in 0 ball_left = ball + (str(ak))[:-1] alst.append(ak) used.add(ak) return alst[1:] # use alst[n] for a(n) function print(aupto(64)) # Michael S. Branicky, Dec 07 2020
Comments