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.

A204389 Number of partitions of n into distinct composite parts.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 3, 2, 3, 1, 5, 3, 5, 4, 7, 4, 9, 7, 10, 9, 13, 10, 17, 14, 18, 18, 25, 22, 30, 27, 34, 36, 44, 40, 53, 52, 62, 65, 76, 74, 93, 95, 107, 113, 131, 133, 158, 164, 182, 195, 221, 229, 264, 276, 304, 329, 367, 383, 431
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 15 2012

Keywords

Examples

			a(10) = #{10, 6+4} = 2;
a(11) = #{ } = 0;
a(12) = #{12, 8+4} = 2;
a(13) = #{9+4} = 1;
a(14) = #{14, 10+4, 8+6} = 3;
a(15) = #{15, 9+6} = 2;
a(16) = #{16, 12+4, 10+6} = 3;
a(17) = #{9+8} = 1;
a(18) = #{18, 14+4, 12+6, 10+8, 8+6+4} = 5;
a(19) = #{15+4, 10+9, 9+6+4} = 3;
a(20) = #{20, 16+4, 14+6, 12+8, 10+6+4} = 5.
		

Crossrefs

Programs

  • Haskell
    a204389 = p a002808_list where
       p _      0 = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
           b(n, i-1)+ `if`(i>n or isprime(i), 0, b(n-i, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..70);  # Alois P. Heinz, May 29 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i>n || PrimeQ[i], 0, b[n-i, i-1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Oct 22 2015, after Alois P. Heinz *)

Formula

G.f.: (1/(1 + x))*Product_{k>=1} (1 + x^k)/(1 + x^prime(k)). - Ilya Gutkovskiy, Dec 31 2016
G.f.: product_(i>=1) (1+x^A002808(i)). - R. J. Mathar, Mar 01 2023