login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342158 Dividing a(n) by the first digit of the next term leaves the next digit as remainder. 1
1, 2, 10, 3, 100, 6, 4, 20, 7, 61, 5, 101, 8, 53, 9, 81, 21, 30, 42, 52, 31, 43, 71, 32, 40, 50, 62, 76, 51, 63, 70, 64, 54, 60, 74, 82, 75, 83, 65, 41, 95, 87, 73, 91, 102, 86, 72, 80, 98, 103, 94, 104, 105, 96, 106, 97, 107, 108, 84, 93, 85, 109, 210, 200, 92 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This is (defined to be) the lexicographically earliest sequence of distinct positive numbers with this property.

"First digit to its right" means the first digit of a(n+1); the next digit is then the second digit of a(n+1) (if > 9) or the first digit of a(n+2).

From M. F. Hasler, Mar 03 2021: (Start)

The definition can be written as: For all n >= 1, a(n) == r (mod q) where q > r >= 0 and either a(n+1) = q < 10 and r = first digit of a(n+2), or a(n+1) = (10 q + r)*10^k + m with 0 <= m < 10^k >= 1.

This makes it easy to construct a(n+1) for any given a(n). In particular, one always has a(n+1) <= smallest power of 10 not yet in the sequence.

This also shows that any term is either a single digit number, or it has its second digit strictly smaller than its first digit.

Therefore the sequence is not a permutation of the natural numbers. Specifically, none of {11, ..., 19, 22, ..., 29, 33, ..., 39, ..., 99, 110, ..., 199, 220, ... 299, ...} (sequence not yet in the OEIS) will ever appear in the sequence.

However, we may conjecture that all other numbers (i.e., all positive integers whose second digit, if it exists, is strictly smaller than the first digit), will eventually appear.

(End)

LINKS

M. F. Hasler, Table of n, a(n) for n = 1..5000

EXAMPLE

  a(n)  divider  remainder  condition satisfied:

    1      2         1          1 =  0*2 + 1

    2      1         0          2 =  2*1 + 0

   10      3         1         10 =  3*3 + 1

    3      1         0          3 =  3*1 + 0

  100      6         4        100 = 16*6 + 4

    6      4         2          6 =  1*4 + 2

    4      2         0          4 =  2*2 + 0

   20      7         6         20 =  2*7 + 6

    7      6         1          7 =  1*6 + 1

   61      8         5         61 =  7*8 + 5

    5      1         0          5 =  2*1 + 0

  101      8         5        101 = 12*8 + 5

    8      5         3          8 =  1*5 + 3

   53      9         8         53 =  5*9 + 8

    9      8         1          9 =  1*8 + 1

  ....

PROG

(PARI) A342158(Nmax=100, s=1, U=[], t)={vector(Nmax, n, /* update list of used/forbidden numbers */ U=setunion(U, [s]); while(#U>1&&U[2]==U[1]+1, U=U[^1]); /* only if previously computed s = a(n) < 10, first digit of next term must equal a(n-1) mod a(n) */ t = if(s>9, 0, t%s); /* now "place" the previously computed a(n) = s and compute the next term: for(...) evaluates to 0 */ s + for(k=U[1]+1, oo, setsearch(U, k) && next /* already used */; my(d=digits(k)); /* first digit OK? */ if(t && d[1] != t, k = t*10^(#d - (d[1]<t))-1; next); if((k>9 && s%d[1]==d[2]) || (k<10 && s%d[1]), t=s; s=k; break)))} \\ M. F. Hasler, Mar 03 2021

CROSSREFS

Cf. A341169.

Sequence in context: A341363 A234932 A332701 * A344544 A102512 A344794

Adjacent sequences:  A342155 A342156 A342157 * A342159 A342160 A342161

KEYWORD

base,nonn,look

AUTHOR

Eric Angelini and M. F. Hasler, Mar 02 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 10:35 EDT 2021. Contains 347518 sequences. (Running on oeis4.)