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.

A080501 Let f(n) be the smallest multiple of n that can be obtained by inserting digits anywhere in n except that f(n) is not equal to 10*n; a(n) = f(n)/n.

This page as a plain text file.
%I A080501 #10 Nov 06 2021 11:04:32
%S A080501 11,6,11,6,3,6,11,6,11,11,11,11,11,11,7,11,11,6,61,6,11,11,11,11,5,11,
%T A080501 11,26,71,11,11,11,11,11,9,11,83,36,61,6,11,11,11,11,9,31,31,26,51,3,
%U A080501 11,11,11,11,21,26,89,26,27,6,11,11,11,26,21,51,25,26,39,11,11,11,51,51,5
%N A080501 Let f(n) be the smallest multiple of n that can be obtained by inserting digits anywhere in n except that f(n) is not equal to 10*n; a(n) = f(n)/n.
%e A080501 a(1) = 11/1 = 11; a(15) = 105/15 = 7; a(18) = 108/18 = 6.
%o A080501 (Python)
%o A080501 def issub(s1, s2, i1, i2):
%o A080501     if i1 == 0: return True
%o A080501     if i2 == 0: return False
%o A080501     if s1[i1-1] == s2[i2-1]: return issub(s1, s2, i1-1, i2-1)
%o A080501     return issub(s1, s2, i1, i2-1)
%o A080501 def a(n):
%o A080501     k, kn, tenn, s, sk = 2, 2*n, 10*n, str(n), str(2*n)
%o A080501     while kn == tenn or not issub(s, str(kn), len(s), len(sk)):
%o A080501         kn += n; sk = str(kn)
%o A080501     return kn//n
%o A080501 print([a(n) for n in range(1, 76)]) # _Michael S. Branicky_, Nov 06 2021
%Y A080501 Cf. A080502, A122098.
%K A080501 base,nonn
%O A080501 1,1
%A A080501 _Amarnath Murthy_, Mar 19 2003
%E A080501 Corrected and extended by _Ray Chandler_, Oct 11 2003