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.

Previous Showing 31-39 of 39 results.

A121238 a(n) = (-1)^(1+n+A088585(n)).

Original entry on oeis.org

1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 21 2006

Keywords

Comments

Apparently the partial products of this sequence form the Hankel transform of A023359: 1, 1*1 = 1, 1*1*1 = 1, 1*1*1*-1 = -1, 1*1*1*-1*1 = -1, ... and 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, ... is the Hankel transform of A023359.

Crossrefs

A253511 Number of n-bit binary strings in which the length of any run of ones is a power of two.

Original entry on oeis.org

1, 2, 4, 7, 14, 26, 49, 93, 176, 333, 630, 1192, 2255, 4267, 8073, 15274, 28900, 54679, 103455, 195741, 370348, 700713, 1325774, 2508412, 4746007, 8979617, 16989761, 32145244, 60819967, 115073582, 217723390, 411940547, 779406450, 1474665262, 2790120139
Offset: 0

Views

Author

Andrew Woods, Jan 02 2015

Keywords

Examples

			For n = 4, the a(4) = 14 solutions are 0000, 0001, 0010, 0100, 1000, 0101, 1001, 1010, 0011, 0110, 1100, 1011, 1101, and 1111.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<1, 1,
          a(n-1) +add(a(n-1-2^k), k=0..ilog2(n)))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 03 2015
  • Mathematica
    terms = 35; h[x_] = Sum[x^2^k, {k, 0, Log[2, terms] // Floor}];
    CoefficientList[(1 + h[x])/(1 - x - x h[x]) + O[x]^terms, x] (* Jean-François Alcover, Mar 22 2019, after Robert Israel *)

Formula

a(n) = a(n-1) + Sum_{k>=0} a(n-(1+2^k)), with a(-1) = a(0) = 1 and a(n) = 0 for n < -1.
G.f.: (1 + h(x))/(1 - x - x*h(x)) where h(x) = sum(k >= 0, x^(2^k)) is the g.f. of A209229. - Robert Israel, Jan 04 2015

A304908 Expansion of x * (d/dx) 1/(1 - Sum_{k>=0} x^(2^k)).

Original entry on oeis.org

0, 1, 4, 9, 24, 50, 108, 217, 448, 882, 1740, 3366, 6504, 12428, 23660, 44745, 84352, 158270, 296064, 551950, 1026360, 1903524, 3522596, 6504998, 11990160, 22061700, 40528748, 74343096, 136183488, 249145148, 455265420, 830985473, 1515201792, 2760087990, 5023154832, 9133857670
Offset: 0

Views

Author

Ilya Gutkovskiy, May 20 2018

Keywords

Comments

Sum of all parts of all compositions (ordered partitions) of n into powers of 2.

Crossrefs

Programs

  • Mathematica
    nmax = 35; CoefficientList[Series[x D[1/(1 - Sum[x^2^k, {k, 0, Floor[Log[nmax]/Log[2]] + 1}]), x], {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[Boole[k == 2^IntegerExponent[k, 2]] a[n - k], {k, 1, n}]; Table[n a[n], {n, 0, 35}]

Formula

a(n) = n*A023359(n).

A339426 Number of compositions (ordered partitions) of n into an even number of powers of 2.

Original entry on oeis.org

1, 0, 1, 2, 2, 6, 9, 14, 30, 48, 86, 156, 268, 478, 849, 1486, 2638, 4660, 8214, 14532, 25664, 45304, 80078, 141412, 249768, 441276, 779376, 1376696, 2431924, 4295534, 7587753, 13403102, 23674870, 41819588, 73870046, 130483396, 230486384, 407130332, 719153726
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(5) = 6 because we have [4, 1], [1, 4], [2, 1, 1, 1], [1, 2, 1, 1], [1, 1, 2, 1] and [1, 1, 1, 2].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t,
          add(b(n-2^i, 1-t), i=0..ilog2(n)))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..42);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 38; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]) + 1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}])), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=0} x^(2^k)) + 1 / (1 + Sum_{k>=0} x^(2^k))).
a(n) = (A023359(n) + A339422(n)) / 2.
a(n) = Sum_{k=0..n} A023359(k) * A339422(n-k).

A339427 Number of compositions (ordered partitions) of n into an odd number of powers of 2.

Original entry on oeis.org

0, 1, 1, 1, 4, 4, 9, 17, 26, 50, 88, 150, 274, 478, 841, 1497, 2634, 4650, 8234, 14518, 25654, 45340, 80040, 141414, 249822, 441192, 779422, 1376752, 2431772, 4295678, 7587761, 13402881, 23675186, 41819442, 73869802, 130483966, 230485902, 407130212, 719154602
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(5) = 4 because we have [2, 2, 1], [2, 1, 2], [1, 2, 2] and [1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t,
          add(b(n-2^i, 1-t), i=0..ilog2(n)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..42);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 38; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]) - 1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}])), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=0} x^(2^k)) - 1 / (1 + Sum_{k>=0} x^(2^k))).
a(n) = (A023359(n) - A339422(n)) / 2.
a(n) = -Sum_{k=0..n-1} A023359(k) * A339422(n-k).

A357534 Number of compositions (ordered partitions) of n into two or more powers of 2.

Original entry on oeis.org

0, 0, 1, 3, 5, 10, 18, 31, 55, 98, 174, 306, 542, 956, 1690, 2983, 5271, 9310, 16448, 29050, 51318, 90644, 160118, 282826, 499590, 882468, 1558798, 2753448, 4863696, 8591212, 15175514, 26805983, 47350055, 83639030, 147739848, 260967362, 460972286, 814260544, 1438308328
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 02 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n=0, 1, add(b(n-2^i), i=0..ilog2(n)))
        end:
    a:= n-> b(n)-`if`(2^ilog2(n)=n, 1, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Oct 02 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - 2^i], {i, 0, Floor@ Log2[n]}]];
    a[n_] :=  b[n] - If[2^Floor@Log2[n] == n, 1, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 26 2022, after Alois P. Heinz *)

Formula

a(n) = A023359(n) - A209229(n) for n > 0.

A369222 Number of compositions (ordered partitions) of n into powers of 2 not greater than sqrt(n).

Original entry on oeis.org

1, 1, 1, 1, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 4930, 8651, 15182, 26642, 46754, 82047, 143983, 252672, 443409, 778128, 1365520, 2396320, 4205249, 7379697, 12950466, 22726483, 39882198, 69988378, 122821042, 215535903, 378239143, 663763424
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 16 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1,
          add(b(n-2^j, t), j=0..min(ilog2(n), t)))
        end:
    a:= n-> b(n, ilog2(floor(sqrt(n)))):
    seq(a(n), n=0..37);  # Alois P. Heinz, Jan 18 2024
  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[Boole[IntegerQ[Log[2, k]]] x^k, {k, 1, Floor[Sqrt[n]]}]), {x, 0, n}], {n, 0, 37}]

A144219 Eigentriangle, row sums = number of ordered partitions of n into powers of 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 2, 1, 0, 2, 3, 0, 1, 0, 3, 6, 0, 0, 2, 0, 6, 10, 0, 0, 0, 3, 0, 10, 18, 1, 0, 0, 0, 6, 0, 18, 31, 0, 1, 0, 0, 0, 10, 0, 31, 56, 0, 0, 2, 0, 0, 0, 18, 0, 56, 98, 0, 0, 0, 3, 0, 0, 0, 31, 0, 98, 174, 0, 0, 0, 0, 6, 0, 0, 0, 56, 0, 174, 306, 0, 0, 0, 0, 0, 10, 0, 0, 98, 0, 306, 542, 0, 0
Offset: 1

Views

Author

Gary W. Adamson, Sep 14 2008

Keywords

Comments

Right border of the triangle = A023359: (1, 1, 2, 3, 6, 10, 18,...) the number of ordered partitions of n into powers of 2.
Row sums = A023359 starting with offset 1: (1, 2, 3, 6, 10, 18,...).
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
1, 1;
0, 1, 2;
1, 0, 2, 3;
0, 1, 0, 3, 6;
0, 0, 2, 0, 6, 10;
0, 0, 0, 3, 0, 10, 18;
1, 0, 0, 0, 6, 0, 18, 31;
0, 1, 0, 0, 0, 10, 0, 31, 56;
0, 0, 2, 0, 0, 0, 18, 0, 56; 98;
0, 0, 0, 3, 0, 0, 0, 31, 0, 98, 174;
0, 0, 0, 0, 6, 0, 0, 0, 56, 0, 174, 306;
...
Row 4 = (1, 0, 2, 3) = termwise products of (1, 0, 1, 1) and (1, 1, 2, 3).
		

Formula

Equals A*B, where A = an infinite lower triangular matrix with the Fredholm-Rueppel sequence A036987 in every column: (1, 1, 0, 1, 0, 0, 0, 1,...); and B = an infinite lower triangular matrix with A023359: (1, 1, 2, 3, 6, 10, 18,...) as the main diagonal and the rest zeros.

A375492 Number of compositions of n into powers of two that each divide the sum of previous powers.

Original entry on oeis.org

1, 1, 2, 2, 5, 5, 10, 10, 26, 26, 52, 52, 130, 130, 260, 260, 677, 677, 1354, 1354, 3385, 3385, 6770, 6770, 17602, 17602, 35204, 35204, 88010, 88010, 176020, 176020, 458330, 458330, 916660, 916660, 2291650, 2291650, 4583300, 4583300, 11916580, 11916580
Offset: 0

Views

Author

David Eppstein, Aug 17 2024

Keywords

Comments

If n = 2^k, a(n) = A003095(k). Otherwise, a(n) is the product of terms from A003095 corresponding to the powers of two in the binary representation of n. If n is odd, the final term of the composition must be 1, so a(n) = a(n-1).
Pieter Mostert points out that, after the first two values, this is a subsequence of A000404 (sums of two nonzero squares), because each term is either a square + 1 or a product of two earlier terms.

Examples

			For n = 4 the a(4) = 5 compositions are 1+1+1+1, 1+1+2, 2+1+1, 2+2, and 4. The composition 1+2+1 is not allowed, because 2 does not divide the sum of previous terms.
		

Crossrefs

Formula

Let p be the largest power of two less than n; then a(n) = a(p)a(n-p) if n is not a power of two, or a(n) = a(p)^2 + 1 if n is a power of two.
Previous Showing 31-39 of 39 results.