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.

A056970 Number of partitions of n into distinct parts congruent to 2, 4 or 5 mod 6.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 13, 13, 15, 16, 17, 20, 21, 23, 25, 27, 30, 33, 36, 38, 42, 45, 49, 54, 57, 62, 67, 72, 79, 85, 92, 98, 106, 114, 123, 133, 141, 152, 163, 175, 189, 202, 216, 231, 248, 265, 284, 304, 323
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n into parts equal to 2,5, or 11 mod 12 (Gollnitz's theorem). Example: a(18)=4 because we have [14,2,2], [11,5,2], [5,5,2,2,2,2] and [2,2,2,2,2,2,2,2,2]. - Emeric Deutsch, Apr 18 2006

Examples

			a(18)=4 because we have [16,2], [14,4], [11,5,2] and [10,8].
		

Crossrefs

Programs

  • Haskell
    a056970 n = p a047261_list n where
       p _  0     = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Nov 16 2012
  • Maple
    g:=product((1+x^(2+6*j))*(1+x^(4+6*j))*(1+x^(5+6*j)),j=0..30): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..67); # Emeric Deutsch, Apr 18 2006
    # second Maple program:
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(irem(d, 12) in [2, 5, 11], d, 0)
          , d=divisors(j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Oct 27 2015
  • Mathematica
    max = 70; g[x_] := Product[(1+x^(2+6j))(1+x^(4+6j))(1+x^(5+6j)), {j, 0, Floor[max/6]}]; CoefficientList[ Series[g[x], {x, 0, max}], x](* Jean-François Alcover, Nov 16 2011, after Emeric Deutsch *)
    a[n_] := a[n] = If[n==0, 1, Sum[Sum[If[MatchQ[Mod[d, 12], 2|5|11], d, 0], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Dec 23 2015, after Alois P. Heinz *)
  • PARI
    {a(n)= if(n<0, 0, polcoeff( 1/prod(k=1, n, 1-(k%3==2)*(k%12!=8)*x^k, 1+x*O(x^n)), n))} /* Michael Somos, Jul 24 2007 */
    

Formula

From Emeric Deutsch, Apr 18 2006: (Start)
G.f.: Product_{j >= 0} (1+x^(2+6j))(1+x^(4+6j))(1+x^(5+6j)).
G.f.: 1/Product_{j >= 0} (1-x^(2+12j))(1-x^(5+12j))(1-x^(11+12j)).
(End)
Euler transform of period 12 sequence [ 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, ...]. - Michael Somos, Jul 24 2007
a(n) ~ exp(Pi*sqrt(n/6)) / (2^(25/12) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Aug 30 2015