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-5 of 5 results.

A284515 "Inside numbers". Pick a term "t" and one of its digits "d". Now jump to the right over d digits if "d" is odd, and to the left over d digits if "d" is even. Whatever the "d" you choose, you will stay on "t".

Original entry on oeis.org

100, 1000, 1002, 1100, 1102, 10000, 10002, 10020, 10022, 10100, 10102, 10120, 10122, 11000, 11002, 11020, 11022, 11100, 11102, 11120, 11122, 30000, 30002, 30020, 30022, 30100, 30102, 30120, 30122, 31000, 31002, 31020, 31022, 31100, 31102, 31120, 31122, 100000, 100002, 100004, 100020, 100022, 100024, 100100, 100102, 100104, 100120
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Mar 28 2017

Keywords

Comments

The sequence is started with a(1) = 100 and always extended with the smallest integer not yet present and not leading to a contradiction.

Examples

			Pick the digit "1" of the first term, 100. This "1" says that you should jump over 1 digit to the right (as "1" is odd). You'll land on the second "0" of 100.
Pick the leftmost digit "0" of the same term, 100. This "0" says that you should jump over 0 digit to the left (as "0" is even). You slide (land) on the "1" of 100.
Pick the rightmost digit "0" of 100. This "0" says that you should jump over 0 digit to the left (as "0" is even). You slide (land) on the first "0" of 100.
We see that any of those possible three movements leaves you "inside" the chosen term "t".
		

Crossrefs

Cf. A284591 (full inside numbers).

A285695 Numbers such that the path described in Comments visits all digits once and ends in the position before the first digit.

Original entry on oeis.org

0, 31202, 110140, 312122, 1101106, 1131404, 3121124, 3131226, 5111424, 5120200, 5300402, 5320004, 11011162, 11034000, 11112160, 11314142, 13030060, 15014020, 31211144, 31232200, 31312164, 33000160, 33202120, 33230240, 35010260, 35212220, 51034202, 51114144
Offset: 1

Views

Author

Lars Blomberg and Eric Angelini, Apr 25 2017

Keywords

Comments

Let d(1..k) be the digits in the number and let i = 1. If d(i) is odd set i = i+d(i)+1 else i = i-d(i)-1. The number is a term if i reaches 0.

Examples

			For 31202 the digit positions visited are 1, 5, 2, 4, 3, 0(outside to the left) so 31202 is a term.
		

Crossrefs

Formula

Except for 0, numbers must start with 1, 3, 5, 7, 9 and end with 0, 2, 4, 6, 8.
Let eSum = Sum_{i=1..k, d(i) is even} d(i)+1, and oSum = Sum_{i=1..k, d(i) is odd} d(i)+1. Then eSum-oSum-1 = 0.

A285696 Numbers such that the path described in Comments visits all digits once and ends in the position immediately after the last digit.

Original entry on oeis.org

110, 11112, 33000, 110110, 313122, 1111114, 1133200, 1303102, 1333004, 1531202, 3103120, 3130210, 3300112, 3330014, 3333222, 3501122, 3531024, 5113220, 5310212, 5313024, 5500000, 5511222, 11011112, 11033000, 11112110, 11313142, 13030010, 15013020, 31312114
Offset: 1

Views

Author

Lars Blomberg and Eric Angelini, Apr 25 2017

Keywords

Comments

Let d(1..k) be the digits in the number and let i = 1. If d(i) is odd set i = i+d(i)+1 else i = i-d(i)-1. The number is a term if i reaches k+1.

Examples

			For 33000 the digit positions visited are 1, 5, 4, 3, 2, 6(outside to the right) so 33000 is a term.
		

Crossrefs

Formula

Numbers must start with 1, 3, 5, 7, 9 and end with 0, 2, 4, 6, 8.
Let eSum = Sum_{i=1..k, d(i) is even} d(i)+1, and oSum = Sum_{i=1..k, d(i) is odd} d(i)+1. Then eSum-oSum+k = 0.

A336611 Always start on the lowest digit of a(n), then visit all digits of a(n) in increasing order. The terms of the sequence are the smallest one that force the visitor to walk n steps to complete his tour (a single step drives you from a digit to the closest one).

Original entry on oeis.org

10, 100, 101, 1011, 1001, 1320, 1302, 10210, 10201, 13002, 13042, 102013, 102031, 130024, 130042, 135204, 135024, 1024013, 1035024, 1305204, 1305024, 1350024, 1350624, 10240513, 10350624, 13050024, 13050624, 13500264, 13500624, 13572046, 13570246, 103572046, 103570246, 130572046, 130570246, 135072046
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jul 27 2020

Keywords

Comments

This is the lexicographically earliest sequence having this property, with a(1) = 10. The terms after a(39) = 135708246 are hard to compute. No obvious pattern is visible, though there must be one for sure. "Increasing order" is not "monotonically increasing order".

Examples

			a(1) = 10 because, starting on 0, you'll need n = 1 step to visit all digits (single 0 --> single 1);
a(2) = 100 because, starting on any 0, you'll need at least n = 2 steps to visit all the digits (rightmost 0 --> leftmost 0 --> single 1);
a(3) = 101 because, starting on 0, you'll need at least n = 3 steps to visit all the  digits (single 0 --> any 1 --> single 0 --> other 1);
a(4) = 1011 because, starting on 0, you'll need at least n = 4 steps to visit all the digits (single 0 --> leftmost 1 --> single 0 --> middle 1 --> rightmost 1);
a(5) = 1001 because, starting on any 0, you'll need at least n = 5 steps to visit all the digits (leftmost 0 --> rightmost 0 --> rightmost 1 --> rightmost 0 --> leftmost 0 --> leftmost 1);
a(6) = 1320 because, starting on 0, you'll need at least n = 6 steps to visit all the digits (your path will be 0-2-3-1-3-2-3 = 6 steps); etc.
		

Crossrefs

Cf. A284591.

A289351 Starting from one digit move right by x steps, x being the value of the digit. If the steps go beyond the least significant digits they continue from the left side. Then repeat the process from the reached digit. The sequence lists the numbers such that all the digits are touched just one time and the last run ends in the initial digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 31, 33, 35, 37, 39, 51, 53, 55, 57, 59, 71, 73, 75, 77, 79, 91, 93, 95, 97, 99, 111, 114, 117, 141, 144, 147, 171, 174, 177, 222, 225, 228, 252, 255, 258, 282, 285, 288, 411, 414, 417, 441, 444, 447, 471, 474, 477
Offset: 0

Views

Author

Paolo P. Lava, Jul 03 2017

Keywords

Comments

Apart from a(0), only zeroless numbers.
If we move left instead of right, the sequence is the same up to a(103); here, a(103)=1223 while in the other sequence a(103) would be 1322.

Examples

			13894: for instance, let us start from 8. Moving eight steps right we are at 1. Then, moving one step right we are at 3. Then 3 steps right we are at 4. Again after 4 steps we are at 9. After an additional 9 steps we end at 8 again. All the digits have been touched and we are again at the digit we started from.
		

Crossrefs

Cf. A014261 (2 digits terms), A071073 (3 digits terms up to 588), A284515, A284591.

Programs

  • Maple
    P:=proc(q) local a,b,d,k,n,t; print(0); for n from 1 to q do d:=ilog10(n)+1; a:=convert(n,base,10);
    for k from 1 to trunc(d/2) do b:=a[k]; a[k]:=a[d-k+1]; a[d-k+1]:=b; od; b:=array(1..d);
    for k from 1 to d do b[k]:=0; od; t:=1; for k from 1 to d do
    if ((t+(a[t] mod d)) mod d)>0 then b[(t+(a[t] mod d)) mod d]:=1; t:=(t+(a[t] mod d)) mod d;
    else b[d]:=1; t:=d; fi; od; if add(b[k],k=1..d)=d then print(n); fi; od; end: P(10^9);
  • Mathematica
    Select[Range[0,477],(n=IntegerDigits@#;Last[m=Mod[Accumulate@Mod[n,s=Length@n],s]]==0&&Sort@m+1==Range@s)&] (* Giorgos Kalogeropoulos, Nov 21 2021 *)
Showing 1-5 of 5 results.