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.

A280954 Number of integer partitions of n using predecessors of prime numbers.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 7, 11, 11, 17, 17, 26, 26, 37, 37, 53, 53, 74, 74, 101, 101, 137, 137, 183, 183, 240, 240, 314, 314, 406, 406, 520, 520, 662, 662, 837, 837, 1049, 1049, 1311, 1311, 1627, 1627, 2008, 2008, 2469, 2469, 3021, 3021, 3678, 3678, 4466, 4466
Offset: 0

Views

Author

Gus Wiseman, Jan 11 2017

Keywords

Comments

The predecessors of prime numbers are {1, 2, 4, 6, 10, 12, ...} = A006093.

Examples

			The partitions for n=0..7 are:
(),
(1),
(2), (11),
(21),(111),
(4), (22), (211), (1111),
(41),(221),(2111),(11111),
(6), (42), (411), (222), (2211), (21111), (111111),
(61),(421),(4111),(2221),(22111),(211111),(1111111).
		

Crossrefs

Even (and odd) bipartition gives A280962.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=2, 1,
          b(n, prevprime(i))+`if`(i-1>n, 0, b(n-i+1, i)))
        end:
    a:= n-> b(n, nextprime(n)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 11 2017
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(`if`(
          isprime(d+1), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 07 2018
  • Mathematica
    nn=60;invser=Series[Product[1-x^(Prime[n]-1),{n,PrimePi[nn+1]}],{x,0,nn}];
    CoefficientList[1/invser,x]