login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A266181
Numbers k such that k == d_1 (mod 2), k == d_2 (mod 3), k == d_3 (mod 4) etc., where d_1 d_2 d_3 ... is the decimal expansion of k.
2
1, 11311, 1032327, 1210565, 11121217, 101033565, 111214177, 113411719, 121254557, 123254387, 10333633323, 12105652565, 11121314781937
OFFSET
1,2
COMMENTS
Subsequence of A131835, the numbers starting with 1. - Michel Marcus, Dec 30 2015
If it exists, a(14) >= 10^21. - Hiroaki Yamanouchi, Jan 12 2016
Definition assumes that d_i are residues, as otherwise 2,3,...,9 are also terms. - Chai Wah Wu, Jun 23 2020
EXAMPLE
11311 == 1 (mod 2),
11311 == 1 (mod 3),
11311 == 3 (mod 4),
11311 == 1 (mod 5),
11311 == 1 (mod 6).
MATHEMATICA
Select[Range@ 2000000, First@ Union@ Function[k, MapIndexed[Mod[k, First@ #2 + 1] == #1 &, IntegerDigits@ k]]@ # &] (* Michael De Vlieger, Dec 30 2015 *)
PROG
(Python)
for b in range (3, 11):
for i in range (10**(b-2), 13*10**(b-3)):
si, k, kk=str(i), 0, i
for j in range(1, b):
if int(si[len(str(i))-j])==kk%(b+1-j):
k=k+1
if k==len(str(i)):
print (i)
(Python)
def ok(n): return all(n%i == di for i, di in enumerate(map(int, str(n)), 2)) # Michael S. Branicky, Jan 21 2025
(PARI) isok(n) = {my(d = digits(n)); for (i=1, #d, if (n % (i+1) != d[i], return (0)); ); return (1); } \\ Michel Marcus, Dec 30 2015
CROSSREFS
Cf. A131835.
Sequence in context: A178581 A178583 A178589 * A179917 A287245 A067791
KEYWORD
nonn,base,more,changed
AUTHOR
Pieter Post, Dec 29 2015
EXTENSIONS
a(6)-a(12) from Michel Marcus, Dec 30 2015
a(13) from Hiroaki Yamanouchi, Jan 12 2016
STATUS
approved