login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A296242 Slideable numbers: each digit d can be displaced by d positions either to the left or to the right, without creating a hole or an "overlap". 3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 20, 22, 24, 31, 33, 35, 42, 44, 46, 53, 55, 57, 64, 66, 68, 75, 77, 79, 86, 88, 97, 99, 102, 110, 111, 112, 113, 114, 120, 122, 132, 135, 144, 201, 202, 211, 213, 221, 222, 225, 231, 243, 246, 255, 300, 311, 312, 324, 330, 333, 336, 342, 354 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Any repdigit number (A010785) is in the sequence; 2-digit numbers 10a + b are in the sequence iff |a - b| = 2 or 0. See examples for more explanations.
The number 13 is the smallest prime for which the result of the "slide" operation yields a different prime, 31.
Theorem: If a number n with L digits is in the sequence because it can produce a number m ending p places to the right of the original number, then a digit p can be prefixed or appended, and one also gets a term of the sequence as concatenate(L+1+p, n) and concatenate(n, L+1-p), provided that L+1+p < 10, resp. L+1-p >= 0. Similarly, if m ends p places to the left of n, with concatenate(L+1-p, n) resp. concatenate(n, L+1+p). [The latter could be included in the former case by taking p negative, but using the absolute value when p is to be concatenated.]
Remark: Some repdigits d...d can "reproduce" less than d digits to the left or right: e.g., 2222 -> _2222 if all but the last 2's are moved two places to the right, but the last 2 is moved two places to the left.
Not all terms of this sequence can be obtained starting from { 0, ..., 9 } and the construction given in the above Theorem, possibly keeping intermediate terms with leading zeros. The term a(123) = 1043 is the first counterexample.
Distinguished subsets include that of numbers n that can be "slid" into m ending in p places later such that:
- m = n ("invariant" or "auto-slideable numbers", e.g., 12222), cf. A295010;
- p = 0 (position invariant, e.g., n = 112, m = 211);
- m = n and p = 0 (position invariant fixed points, e.g., 11, 110, 202);
- m is prime ("prime-slideable numbers", e.g., n = 35, m = 53), cf. A296236;
- n and m are prime (prime-slideable primes, e.g., n = 13, m = 31).
LINKS
EXAMPLE
Repdigit numbers (0, ..., 9, 11, 22, 33, ...) are in the sequence because each digit d can be shifted, e.g., by d places to the left, and the same number will result.
The number 10 is not in the sequence, because the digit 0 must remain at the same place, and the digit 1 cannot be moved neither to the left (which would create a "hole"), nor to the right (place already occupied by the digit 0).
Similarly, the number 12 is not in the sequence because shifting the digit 2 two places to the left is not possible if the 1 is also shifted 1 place to the left (which would be the same position), nor when the 1 is shifted to the right (which would create a hole), and shifting the 2 to the right would always create a hole.
The number 13 is in the sequence because one can shift the digit 1 one place to the left, and the digit 3 two places to the left, resulting in the number 31__ (where the _ stands for empty places previously occupied by some digit).
The number 102 is in the sequence, it results in the number 120_ if the 1 and the 2 are both shifted to the left. Similarly, 201 would result in _021 = 21.
The number 113 results in 311_ if the 1's switch places and the 3 moves to the left. The number 114 results in 411__ if the two 1's and the 4 all move to the left (by the respective distances).
The number 202 is in the sequence because the two 2's can switch places. As the repdigit numbers, it can be considered as a fixed point or invariant of the operation, since it can reproduce itself. Similarly, 3003, 40004, 42024, ... are fixed points of this operation, and in the sequence.
The number 2023 is also in the sequence, resulting in 3202_.
The number 12222 is also an invariant, reproducing itself shifted one place to the right, if the 1 is shifted 1 place to the right and the 2's accordingly (i.e., to the left for the last one, and to the right for all others but the last one).
MAPLE
f:= proc(n) local L, d, x, Lx, M;
L:= convert(n, base, 10);
d:= nops(L);
for x from 0 to 2^d-1 do
Lx:= convert(x+2^d, base, 2)[1..d];
M:= {seq(i+(2*Lx[i]-1)*L[i], i=1..d)};
if nops(M)=d and max(M)-min(M)=d-1 then return true fi
od;
false
end proc:
select(f, [$0..1000]); # Robert Israel, Dec 14 2017
PROG
(PARI) is(n, d=matdiagonal(n=digits(n)), v=n+[1..#n])={!n||forvec(s=vector(#d, i, [0, 1]), vecmax(p=v-2*s*d)+1==vecmin(p)+#p&&#p==#Set(p)&&return(1))}
CROSSREFS
Cf. A295010 (self-slideable numbers), A296236 (prime-slideable numbers) and A010785 (repdigits) all are subsequences.
Sequence in context: A161597 A320320 A263364 * A331020 A085429 A202940
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Dec 09 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 14:07 EDT 2024. Contains 372275 sequences. (Running on oeis4.)