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.

A111178 Number of partitions of n into positive numbers one less than a square.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 2, 4, 1, 2, 5, 2, 4, 5, 2, 5, 5, 2, 6, 7, 4, 6, 7, 5, 6, 8, 6, 8, 12, 6, 9, 13, 6, 10, 15, 8, 14, 15, 9, 16, 16, 10, 18, 21, 14, 19, 22, 16, 20, 24, 19, 25, 30, 20, 27, 33, 21, 29, 39, 26, 37, 40, 28, 42, 42, 31, 48
Offset: 0

Views

Author

Wouter Meeussen, Oct 22 2005

Keywords

Comments

Also limiting form of the number of representations of n into k positive squares for k decreasing from n to 1, or Table[Count[SumOfSquaresRepresentations[k,n], {a_,}/;a>0], {n,100,100}, {k,100,40,-1}]. (Franklin T. Adams-Watters: replacing k^2 ones by the value k^2 changes the count by k^2-1).
a(n) = A243148(2n,n). - Alois P. Heinz, May 30 2014

Crossrefs

Programs

  • Haskell
    a111178 = p $ tail a005563_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2014
  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i<2, 0, b(n, i-1)+
          `if`(i^2>n+1, 0, b(n+1-i^2, i))))
        end:
    a:= n-> b(n, isqrt(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 30 2014
  • Mathematica
    nn = 100; CoefficientList[Series[Product[1/(1 - x^(k^2 - 1)), {k, 2, nn}], {x, 0, nn}], x] (* corrected by T. D. Noe, Feb 22 2012 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i^2>n+1, 0, b[n+1-i^2, i]]]]; a[n_] := b[n, Round[Sqrt[n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)

Formula

G.f.: Product_{k>=2} 1/(1-x^(k^2-1)).