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.

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.

Original entry on oeis.org

1, 11311, 1032327, 1210565, 11121217, 101033565, 111214177, 113411719, 121254557, 123254387, 10333633323, 12105652565, 11121314781937
Offset: 1

Views

Author

Pieter Post, Dec 29 2015

Keywords

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

Examples

			11311 == 1 (mod 2),
11311 == 1 (mod 3),
11311 == 3 (mod 4),
11311 == 1 (mod 5),
11311 == 1 (mod 6).
		

Crossrefs

Cf. A131835.

Programs

  • Mathematica
    Select[Range@ 2000000, First@ Union@ Function[k, MapIndexed[Mod[k, First@ #2 + 1] == #1 &, IntegerDigits@ k]]@ # &] (* Michael De Vlieger, Dec 30 2015 *)
  • 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
  • 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
    

Extensions

a(6)-a(12) from Michel Marcus, Dec 30 2015
a(13) from Hiroaki Yamanouchi, Jan 12 2016