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.

This page as a plain text file.
%I A381527 #10 Mar 03 2025 13:37:09
%S A381527 -1,1,-1,15,-1,25,12,35,-1,45,10,11,12,13,14,15,16,17,18,19,-1,21,198,
%T A381527 115,1728,125,52,135,168,145,150,31,2912,165,1428,140,72,148,1368,195,
%U A381527 -1,41,3948,215,132,135,92,235,384,245,250,51,1248,265,378,275
%N 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.
%H A381527 Dominic McCarty, <a href="/A381527/b381527.txt">Table of n, a(n) for n = 0..10000</a>
%F A381527 a(10*n) = 10*a(n) for a(n) != -1
%F A381527 a(n) = A381526(n)*n for A381526(n) != -1
%e A381527 44*1 = 44 does not have 1 as a substring.
%e A381527 44*2 = 88 does not have 2 as a substring.
%e A381527 44*3 = 132 has 3 as a substring.
%e A381527 So, a(44) = 132.
%o A381527 (Python)
%o A381527 from itertools import count
%o A381527 def a(n):
%o A381527     if n in [0, 2, 4, 8]: return -1
%o A381527     if n % 10 == 0: return -1 if (k:=a(n//10)) == -1 else 10*k
%o A381527     for k in count(1):
%o A381527         if str(k) in str(k*n): return k*n
%o A381527 print([a(n) for n in range(100)])
%Y A381527 Cf. A381526 (for a(n)/n).
%K A381527 sign,easy
%O A381527 0,4
%A A381527 _Dominic McCarty_, Feb 26 2025