login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219182 Maximal number of partitions of n into any number k of distinct prime parts or 0 if there are no such partitions. 2
1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 4, 3, 4, 3, 5, 4, 5, 4, 6, 4, 6, 4, 6, 6, 6, 6, 9, 6, 9, 8, 8, 10, 11, 10, 11, 11, 11, 13, 13, 14, 13, 16, 13, 18, 14, 19, 15, 21, 15, 22, 18, 25, 18, 26, 22, 29, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,17

COMMENTS

a(n) is maximal element of row n of triangle A219180 or 0 if the row is empty. a(n) = 0 iff n in {1,4,6}.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..3500

FORMULA

a(n) = max_{k>=0} A219180(n,k).

EXAMPLE

a(31) = 4 because there are 4 partitions of 31 into 3 distinct prime parts ([3,5,23], [3,11,17], [5,7,19], [7,11,13]) but not more than 4 partitions of 31 into k distinct prime parts for any other k.

MAPLE

with(numtheory):

b:= proc(n, i) option remember;

      `if`(n=0, [1], `if`(i<1, [0], zip((x, y)->x+y, b(n, i-1),

       [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i-1))[]], 0)))

    end:

a:= n-> max(b(n, pi(n))[]):

seq(a(n), n=0..120);

MATHEMATICA

zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {0}, zip[b[n, i-1], Join[{0}, If[Prime[i]>n, {}, b[n-Prime[i], i-1]]]]]]; a[n_] := Max[b[n, PrimePi[n]]]; Table[a[n], {n, 0, 120}] (* Jean-Fran├žois Alcover, Feb 12 2017, translated from Maple *)

CROSSREFS

Cf. A219180.

Sequence in context: A271721 A050252 A025877 * A184171 A133989 A029398

Adjacent sequences:  A219179 A219180 A219181 * A219183 A219184 A219185

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Nov 13 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:49 EDT 2019. Contains 322446 sequences. (Running on oeis4.)