cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

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).

Original entry on oeis.org

2, 11, 3, 23, 29, 5, 13, 31, 7, 41, 43, 37, 47, 53, 59, 17, 61, 67, 71, 83, 89, 19, 97, 73, 101, 103, 107, 79, 109, 127, 113, 149, 131, 151, 157, 137, 139, 163, 167, 173, 181, 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
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Dec 10 2020

Keywords

Comments

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.

Examples

			Striking 2 to the right pushes 2 against 11;
the last digit of 11 is then pushed against 3 (leaving 21 behind - a nonprime);
the last digit of 3 is then pushed against 23 (leaving 1 behind - a nonprime);
the last digit of 23 is then pushed against 29 (leaving 32 behind - a nonprime);
the last digit of 29 is then pushed against 5 (leaving 32 behind - a nonprime);
the last digit of 5 is then pushed against 13 (leaving 9 behind - a nonprime);
etc.
This is the lexicographically earliest sequence of distinct positive terms with this property.
		

Crossrefs

Cf. A339467 (the Ronnie O'Sullivan sequence).

Programs

  • Python
    from sympy import isprime
    def aupto(n):
        alst, used, strakm1 = [0, 2], {2}, "2"
        for k in range(2, n+1):
            ball = (str(alst[k-1]))[-1]
            ak = 1
            ball_left = ball + (str(ak))[:-1]
            while isprime(int(ball_left)) or ak in used or not isprime(ak):
                ak += 2 # continue to only test odds
                ball_left = ball + (str(ak))[:-1]
            alst.append(ak)
            used.add(ak)
        return alst[1:]  # use alst[n] for a(n) function
    print(aupto(70)) # Michael S. Branicky, Dec 11 2020

A381224 a(n) is the integer resulting from the concatenation of the unit digit of prime(n-1) to the digits of prime(n) without its own unit digit.

Original entry on oeis.org

0, 2, 3, 5, 71, 11, 31, 71, 92, 32, 93, 13, 74, 14, 34, 75, 35, 96, 16, 77, 17, 37, 98, 38, 99, 710, 110, 310, 710, 911, 312, 713, 113, 713, 914, 915, 115, 716, 316, 717, 317, 918, 119, 119, 319, 719, 921, 122, 322, 722, 923, 323, 924, 125, 125, 726, 326, 927, 127, 728, 128, 329, 330, 731, 131, 331, 733, 133, 734, 734, 935, 335
Offset: 1

Views

Author

N. J. A. Sloane, Feb 22 2025

Keywords

Comments

Take list of primes and move the right-most digit of each term to the start of the next term.

Examples

			Starting from
   2, 3, 5, 7, 11, 13, 17, 19, ...
we get
   0, 2, 3, 5, 71, 11, 31, 71, ...
		

Crossrefs

Programs

  • Maple
    a381224 := proc(n) local i,p;
    if n=1 then i:=0; else i:=(ithprime(n-1) mod 10); fi;
    p:=ithprime(n);
    i * 10^ilog10(p) + floor(p/10);
    end;
  • Python
    from sympy import prime
    def a(n): return 0 if n == 1 else int(str(prime(n-1)%10)+ str(prime(n))[:-1])
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Feb 22 2025
Showing 1-2 of 2 results.