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.

A355632 Irregular triangle T(n, k), n > 0, k = 1..A121041(n), read by rows; the n-th row contains in ascending order the divisors of n whose decimal expansions appear as substrings in the decimal expansion of n.

This page as a plain text file.
%I A355632 #15 Jul 23 2024 13:35:35
%S A355632 1,2,3,4,5,6,7,8,9,1,10,1,11,1,2,12,1,13,1,14,1,5,15,1,16,1,17,1,18,1,
%T A355632 19,2,20,1,21,2,22,23,2,4,24,5,25,2,26,27,2,28,29,3,30,1,31,2,32,3,33,
%U A355632 34,5,35,3,6,36,37,38,3,39,4,40,1,41,2,42,43,4,44
%N A355632 Irregular triangle T(n, k), n > 0, k = 1..A121041(n), read by rows; the n-th row contains in ascending order the divisors of n whose decimal expansions appear as substrings in the decimal expansion of n.
%H A355632 Paolo Xausa, <a href="/A355632/b355632.txt">Table of n, a(n) for n = 1..12288</a> (rows 1..5000 of the triangle, flattened).
%H A355632 <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a>
%H A355632 <a href="/index/Di#divisors">Index entries for sequences related to divisors</a>
%F A355632 T(n, 1) = A121042(n).
%F A355632 T(n, A121041(n)) = n.
%F A355632 Sum_{k = 1..A121041(n)} T(n, k) = A355620(n).
%e A355632 Triangle T(n, k) begins:
%e A355632      1: [1]
%e A355632      2: [2]
%e A355632      3: [3]
%e A355632      4: [4]
%e A355632      5: [5]
%e A355632      6: [6]
%e A355632      7: [7]
%e A355632      8: [8]
%e A355632      9: [9]
%e A355632     10: [1, 10]
%e A355632     11: [1, 11]
%e A355632     12: [1, 2, 12]
%e A355632     13: [1, 13]
%e A355632     14: [1, 14]
%e A355632     15: [1, 5, 15]
%e A355632     16: [1, 16]
%t A355632 Table[Select[Divisors[n], StringContainsQ[IntegerString[n], IntegerString[#]] &], {n, 50}] (* _Paolo Xausa_, Jul 23 2024 *)
%o A355632 (PARI) row(n, base=10) = { my (d=digits(n, base), s=setbinop((i,j) -> fromdigits(d[i..j], base), [1..#d]), v=0); select(v -> v && n%v==0, s) }
%o A355632 (Python)
%o A355632 from sympy import divisors
%o A355632 def row(n):
%o A355632     s = str(n)
%o A355632     return sorted(d for d in divisors(n, generator=True) if str(d) in s)
%o A355632 def table(r): return [i for n in range(1, r+1) for i in row(n)]
%o A355632 print(table(44)) # _Michael S. Branicky_, Jul 11 2022
%Y A355632 Cf. A027750, A121041 (row lengths), A121042, A355620 (row sums), A355634 (binary analog).
%K A355632 nonn,base,tabf
%O A355632 1,2
%A A355632 _Rémy Sigrist_, Jul 11 2022