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.

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

This page as a plain text file.
%I A355634 #9 Jul 23 2024 08:17:14
%S A355634 1,1,2,1,3,1,2,4,1,5,1,2,3,6,1,7,1,2,4,8,1,9,1,2,5,10,1,11,1,2,3,4,6,
%T A355634 12,1,13,1,2,7,14,1,3,15,1,2,4,8,16,1,17,1,2,9,18,1,19,1,2,4,5,10,20,
%U A355634 1,21,1,2,11,22,1,23,1,2,3,4,6,8,12,24,1,25
%N A355634 Irregular triangle T(n, k), n > 0, k = 1..A093640(n), read by rows; the n-th row contains in ascending order the divisors of n whose binary expansions appear as substrings in the binary expansion of n.
%H A355634 Paolo Xausa, <a href="/A355634/b355634.txt">Table of n, a(n) for n = 1..10019</a> (rows 1..2000 of the triangle, flattened).
%H A355634 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A355634 <a href="/index/Di#divisors">Index entries for sequences related to divisors</a>
%F A355634 T(n, 1) = 1.
%F A355634 T(n, A093640(n)) = n.
%F A355634 Sum_{k = 1..A093640(n)} T(n, k) = A355633(n).
%e A355634 Triangle T(n, k) begins:
%e A355634      1: [1]
%e A355634      2: [1, 2]
%e A355634      3: [1, 3]
%e A355634      4: [1, 2, 4]
%e A355634      5: [1, 5]
%e A355634      6: [1, 2, 3, 6]
%e A355634      7: [1, 7]
%e A355634      8: [1, 2, 4, 8]
%e A355634      9: [1, 9]
%e A355634     10: [1, 2, 5, 10]
%e A355634     11: [1, 11]
%e A355634     12: [1, 2, 3, 4, 6, 12]
%e A355634     13: [1, 13]
%e A355634     14: [1, 2, 7, 14]
%e A355634     15: [1, 3, 15]
%e A355634     16: [1, 2, 4, 8, 16]
%t A355634 Table[Select[Divisors[n], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &], {n, 50}] (* _Paolo Xausa_, Jul 23 2024 *)
%o A355634 (PARI) row(n, base=2) = { 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 A355634 (Python)
%o A355634 from sympy import divisors
%o A355634 def row(n):
%o A355634     s = bin(n)[2:]
%o A355634     return sorted(d for d in divisors(n, generator=True) if bin(d)[2:] in s)
%o A355634 def table(r): return [i for n in range(1, r+1) for i in row(n)]
%o A355634 print(table(25)) # _Michael S. Branicky_, Jul 11 2022
%Y A355634 Cf. A027750, A093640 (row lengths), A355632 (decimal analog), A355633 (row sums).
%K A355634 nonn,base,tabf
%O A355634 1,3
%A A355634 _Rémy Sigrist_, Jul 11 2022