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.

A381527 a(n) is the smallest positive multiple of n such that the decimal expansion of a(n)/n is a substring of the decimal expansion of a(n), or -1 if no such number exists.

Original entry on oeis.org

-1, 1, -1, 15, -1, 25, 12, 35, -1, 45, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, 21, 198, 115, 1728, 125, 52, 135, 168, 145, 150, 31, 2912, 165, 1428, 140, 72, 148, 1368, 195, -1, 41, 3948, 215, 132, 135, 92, 235, 384, 245, 250, 51, 1248, 265, 378, 275
Offset: 0

Views

Author

Dominic McCarty, Feb 26 2025

Keywords

Examples

			44*1 = 44 does not have 1 as a substring.
44*2 = 88 does not have 2 as a substring.
44*3 = 132 has 3 as a substring.
So, a(44) = 132.
		

Crossrefs

Cf. A381526 (for a(n)/n).

Programs

  • Python
    from itertools import count
    def a(n):
        if n in [0, 2, 4, 8]: return -1
        if n % 10 == 0: return -1 if (k:=a(n//10)) == -1 else 10*k
        for k in count(1):
            if str(k) in str(k*n): return k*n
    print([a(n) for n in range(100)])

Formula

a(10*n) = 10*a(n) for a(n) != -1
a(n) = A381526(n)*n for A381526(n) != -1