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.

A309535 Total number of square parts in all compositions of n.

Original entry on oeis.org

0, 1, 2, 5, 13, 30, 69, 156, 348, 769, 1682, 3653, 7884, 16924, 36160, 76944, 163137, 344770, 726533, 1527052, 3202076, 6700096, 13992080, 29167936, 60703424, 126141953, 261754114, 542448645, 1122778124, 2321317916, 4794159168, 9891365008, 20388823360
Offset: 0

Views

Author

Alois P. Heinz, Aug 06 2019

Keywords

Examples

			a(4) = 13: (1)(1)(1)(1), (1)(1)2, (1)2(1), 2(1)(1), 22, (1)3, 3(1), (4).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(a(n-j)+
          `if`(issqr(j), ceil(2^(n-j-1)), 0), j=1..n)
        end:
    seq(a(n), n=0..33);
  • Mathematica
    CoefficientList[Series[(EllipticTheta[3, 0, x]-1)*(1-x)^2/(2*(1-2*x)^2), {x, 0, 30}], x] (* Vaclav Kotesovec, Aug 18 2019 *)
    Table[Sum[If[k == n, 1, (2^(n - k - 2)*(3 + n - k))] * If[IntegerQ[Sqrt[k]], 1, 0], {k, 1, n}], {n, 0, 30}] (* Vaclav Kotesovec, Aug 18 2019 *)

Formula

G.f.: Sum_{k>=1} x^(k^2)*(1-x)^2/(1-2*x)^2.
a(n) ~ c * 2^n * n, where c = (EllipticTheta[3, 0, 1/2] - 1)/8 = 0.1411171034014846448336823185681189155765645674... - Vaclav Kotesovec, Aug 18 2019, updated Mar 17 2024
a(n) = Sum_{k=1..A000196(n)} A045623(n-k^2). - Gregory L. Simay, Jun 07 2021