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.

Showing 1-2 of 2 results.

A165416 Irregular array read by rows: The n-th row contains those distinct positive integers that each, when written in binary, occurs as a substring in binary n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 4, 1, 2, 5, 1, 2, 3, 6, 1, 3, 7, 1, 2, 4, 8, 1, 2, 4, 9, 1, 2, 5, 10, 1, 2, 3, 5, 11, 1, 2, 3, 4, 6, 12, 1, 2, 3, 5, 6, 13, 1, 2, 3, 6, 7, 14, 1, 3, 7, 15, 1, 2, 4, 8, 16, 1, 2, 4, 8, 17, 1, 2, 4, 9, 18, 1, 2, 3, 4, 9, 19, 1, 2, 4, 5, 10, 20, 1, 2, 5, 10, 21, 1, 2, 3, 5, 6, 11, 22, 1
Offset: 1

Views

Author

Leroy Quet, Sep 17 2009

Keywords

Comments

This is sequence A119709 with the 0's removed.
The n-th row of this sequence contains A122953(n) terms.

Examples

			6 in binary is 110. The distinct positive integers that occur as substrings in n when they and n are written in binary are: 1 (1 in binary), 2 (10 in binary), 3 (11 in binary), and 6 (110 in binary). So row 6 is (1,2,3,6).
		

Crossrefs

Cf. A030308.
Cf. A165153 (row products), A225243 (subsequence).

Programs

  • Haskell
    a165416 n k = a165416_tabf !! (n-1) !! (k-1)
    a165416_row n = a165416_tabf !! (n-1)
    a165416_tabf = map (dropWhile (== 0)) $ tail a119709_tabf
    -- Reinhard Zumkeller, Aug 14 2013

Extensions

Extended by Ray Chandler, Mar 13 2010

A332030 a(n) is the product of the distinct positive numbers whose binary digits appear in order, but not necessarily as consecutive digits, in the binary representation of n.

Original entry on oeis.org

1, 1, 2, 3, 8, 30, 36, 21, 64, 1080, 7200, 2310, 1728, 16380, 3528, 315, 1024, 146880, 9331200, 1580040, 13824000, 1362160800, 170755200, 796950, 331776, 176904000, 2861913600, 72972900, 4741632, 99754200, 1587600, 9765, 32768, 77552640, 86294937600
Offset: 0

Views

Author

Rémy Sigrist, Feb 05 2020

Keywords

Comments

This sequence is a variant of A165153.
For n > 0, a(n) is the product of the terms of the n-th row of A301983.

Examples

			For n = 9:
- the binary representation of 9 is "1001",
- the following positive binary strings appear in it: "1", "10", "11", "100", "101" and "1001",
- they correspond to: 1, 2, 3, 4, 5 and 9,
- so a(9) = 1 * 2 * 3 * 4 * 5 * 9 = 1080.
		

Crossrefs

Cf. A005329, A006125, A165153, A301983, A328379 (additive variant).

Programs

  • PARI
    a(n) = my (b=binary(n), s=[0]); for (i=1, #b, s=setunion(s, apply(m -> 2*m+b[i], s))); vecprod(s[2..#s])

Formula

a(n) >= A165153(n).
a(2^k) = A006125(k+1) for any k >= 0.
a(2^k-1) = A005329(k) for any k >= 0.
Showing 1-2 of 2 results.