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.

A295010 Self-slideable numbers: numbers which can reproduce themselves by sliding each digit d by d places either to the left or to the right.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 111, 202, 222, 333, 444, 555, 666, 777, 888, 999, 1100, 1111, 2020, 2222, 3003, 3113, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 11000, 11011, 11110, 11111, 11202, 12222, 20200, 20211
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Dec 14 2017

Keywords

Comments

The result of the "slide" operation does not need to be in the initial position, e.g., the number 1 reproduces itself displaced by 1 position.
The first terms which can be "slided" into themselves without changing place are 0, 11, 110, 202, 1100, 1111, 2020, 2222, 3003, 3113, 11000, 11011, 11110, 11202, 20200, 20211, ...
Any concatenation of such fixed-position self-slideable numbers is again one. Primitive terms (not concatenation of smaller terms) are 0, 11, 202, 2222, 3003, 3113, 23203, 30232, 33033, 40004, 40114, 41104, 42024, ... However, even though they are not concatenation of smaller terms, 2222, 3113 and all the 5-digit terms except 40004 are a "non-interfering superposition" of earlier terms, i.e., the nonzero digits take the place of zero digits of earlier terms.
Theorem: Any fixed-position self-slideable number is a non-interfering superposition of terms of the form d*10^d+d.
Actually, most of the terms are of that form: among the 131 terms < 10^6, there are 45 repdigits, 80 fixed-position self-slideable numbers of the above form, and only 6 other terms, { 12222, 22221, 31313, 122221, 131313, 313131 }.

Examples

			12222 is in the sequence because one can slide the 1 and three of the 2's to the right (by one resp. two places), and the last 2 by two places to the left, and get back the same number, shifted one place to the right.
		

Crossrefs

Cf. A296242 (slideable numbers), A010785 (repdigit numbers: a subsequence).

Programs

  • PARI
    is_A295010(n,d=matdiagonal(n=digits(n)),v=[1..#n]+n)={!n||forvec( s=vector(#n,i,[0,1]),vecmax(p=v-2*s*d)+1==vecmin(p)+#p&&#p==#Set(p)&&sum(i=1,#p,10^(vecmax(p)-p[i])*n[i])==fromdigits(n,10)&&return(1))}

A296236 Prime-slideable numbers: such that a prime can be obtained by moving each digit d by d places either to the left or right, without creating a hole or overlap.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 20, 31, 35, 79, 97, 112, 113, 300, 311, 1021, 1124, 1201, 1243, 1333, 1465, 1546, 2011, 2114, 2231, 2312, 2536, 3001, 3122, 3337, 6752, 6877, 7423, 7441, 7687, 7742, 7867, 7966, 8956, 8996, 10031, 10114, 10211, 11113, 11144, 11221, 11300, 11311, 11336, 11354, 11413
Offset: 1

Views

Author

M. F. Hasler, Dec 09 2017

Keywords

Comments

A 2-digit number 10a + b is in the sequence if |a - b| = 2 (or 0) and 10b + a is prime.

Examples

			The number 35 is in the sequence because if the digit 3 is moved three places to the left and the digit 5 is moved five places to the left, this results in the number 53 (three place to the left from the initial position, which does not matter), and 53 is prime.
		

Crossrefs

Cf. A296242 (slideable numbers), A296010 (slideable numbers).

Programs

  • PARI
    is_A296236(n,d=matdiagonal(n=digits(n)),v=[1..#n]+n)={!n||forvec(s=vector(#n,i,[0,1]),vecmax(p=v-2*s*d)-vecmin(p)==#p-1&&#p==#Set(p)&&isprime(sum(i=1,#p,10^(vecmax(p)-p[i])*n[i]))&&return(1))}
Showing 1-2 of 2 results.