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

A284591 "Full Inside numbers". Such numbers have the property that all their digits will be visited exactly once in a single closed circuit (see Comments).

Original entry on oeis.org

100, 1102, 11122, 30000, 111124, 130200, 300102, 330004, 1031202, 1111144, 1132200, 1302102, 1332004, 3001122, 3031024, 3102120, 3130240, 3300142, 3330044, 3332222, 5000000, 5011222, 5112220, 5310242, 5312024, 10110140, 10312122, 11031402, 11111146, 11132400, 11322102, 11332006, 13021122, 13031026, 13122120, 13130440
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Mar 29 2017 and Mar 30 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. See A284515 for the definition of an "Inside number".

Examples

			The 13th term of the sequence is 1332004. This integer is in the sequence because starting on the first digit "1", will lead to the second "3" (after jumping over exactly one digit to the right), then to "4" (after jumping exactly over three digits to the right), then to the first "3" (after jumping exactly over four digits to the left), then to the last "0" (after jumping exactly over three digits to the right), then to the first "0" (after jumping exactly over no digit to the left, which is equivalent to "sliding" to the digit on the left), then to "2" (same reason), then to the initial "1" (after jumping exactly over two digits to the left). The cycle has come to its end. (The direction -left or right- of a jump is given by the parity -odd or even- of the digit involved.)
		

Crossrefs

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.

A345967 Lexicographically first sequence of distinct positive integers such that the alternating partial sums p(n) = Sum_{k=1..n} -(-1)^k a(k), n >= 1, are distinct positive integers.

Original entry on oeis.org

2, 1, 5, 3, 6, 4, 7, 8, 12, 9, 11, 10, 15, 13, 17, 14, 16, 18, 22, 19, 21, 20, 25, 23, 26, 24, 28, 27, 30, 29, 32, 31, 35, 33, 36, 34, 37, 38, 42, 39, 43, 40, 44, 41, 45, 47, 46, 48, 55, 49, 51, 50, 53, 52, 57, 54, 56, 58, 62, 59, 63, 60, 64, 61, 65, 67, 66, 68, 74, 69, 72, 70, 75, 71, 73, 76, 79, 77, 80, 78
Offset: 1

Views

Author

Eric Angelini and Neil Bickford, Jun 30 2021

Keywords

Comments

The chess rook as a windshield wiper sequence: terms with an odd index [a(1), a(3), a(5), ...] move the chess rook horizontally to the right over a(n) terms; terms with an even index [a(2), a(4), a(6), ...] move the chess rook to the left over a(n) terms; this is the lexicographically earliest sequence of positive distinct terms such that all terms of the sequence will be visited exactly once by the rook.
It turns out that both, sequence (a(n), n >= 1) and that of partial alternating sums (p(n), n >= 1), are permutations of the positive integers. - M. F. Hasler, Jul 11 2021
The inverse permutation of this sequence starts (2, 1, 4, 6, 3, 5, 7, 8, 10, 12, 11, 9, 14, 16, 13, 17, 15, 18, 20, 22, 21, ...). - M. F. Hasler, Jul 19 2021

Examples

			As a(1) = 2 has an odd index, the rook moves 2 terms to the Right on a(3) = 5;
from there the rook moves according to a(2) = 1 (1 term to the L) on a(2) = 1;
from there the rook moves according to a(3) = 5 (5 terms to the R) on a(7) = 7;
from there the rook moves according to a(4) = 3 (3 terms to the L) on a(4) = 3;
from there the rook moves according to a(5) = 6 (6 terms to the R) on a(10) = 9; etc. The rook's successive movements can be seen as the movements of a windshield wiper.
		

Crossrefs

Cf. A285471.

Programs

  • PARI
    A345967_vec(Nmax, P=0)={ my(US=[0], UP=[P], used(x,U)= setsearch(U,x) || x<=U[1], insert(x,U)= U=setunion(U,[x]); while(#U>1&&U[2]==U[1]+1, U=U[^1]); U); vector(Nmax, n, my(s=(-1)^n); for(S=US[1]+1,oo, (used(S,US) || used(P-s*S,UP))&&next; if(s<0, my(f=1); for(PP=UP[1]+1,P+S-1, used(PP,UP) || used(P+S-PP,US) || PP==P || [f=0; break]); f && next); UP=insert(P-=s*S, UP); US=insert(s=S, US); break); s)} \\ M. F. Hasler, Jul 11 2021

Extensions

Edited and better definition from M. F. Hasler, Jul 19 2021
Showing 1-4 of 4 results.