login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066740
Number of distinct partitions of A007504(n) which can be obtained by merging parts in the partition 2+3+5+...+prime(n), where prime(n) is the n-th prime.
1
1, 1, 2, 5, 13, 44, 151, 614, 2446, 11066, 53368, 253927, 1316375, 7213979, 38175696, 213766427
OFFSET
0,3
EXAMPLE
For n=4, the 13 partitions are 17, 2+15, 3+14, 5+12, 7+10, 8+9, 2+3+12, 2+5+10, 2+7+8, 3+5+9, 3+7+7, 5+5+7, 2+3+5+7. 5+12 and 7+10 can be obtained in two ways each: 5+12 = (5)+(2+3+7) = (2+3)+(5+7), 7+10 = (7)+(2+3+5) = (2+5)+(3+7).
MAPLE
b:= proc(n) local p; p:= `if`(n=0, 1, ithprime(n));
b(n):= `if`(n<2, {[p$n]}, map(x-> [sort([x[], p]),
seq(sort(subsop(i=x[i]+p, x)), i=1..nops(x))][], b(n-1)))
end:
a:= n-> nops(b(n)):
seq(a(n), n=0..10); # Alois P. Heinz, May 31 2013
MATHEMATICA
addto[ p_, k_ ] := Module[ {}, lth=Length[ p ]; Union[ Sort/@Append[ Table[ Join[ Take[ p, i-1 ], {p[ [ i ] ]+k}, Take[ p, i-lth ] ], {i, 1, lth} ], Append[ p, k ] ] ] ]; addtolist[ plist_, k_ ] := Union[ Join@@(addto[ #, k ]&/@plist) ]; l[ 0 ]={{}}; l[ n_ ] := l[ n ]=addtolist[ l[ n-1 ], Prime[ n ] ]; a[ n_ ] := Length[ l[ n ] ]
CROSSREFS
Sequence in context: A287008 A119533 A375730 * A212825 A212826 A212827
KEYWORD
more,nonn
AUTHOR
Naohiro Nomoto, Jan 16 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 18 2002
a(14)-a(15) from Sean A. Irvine, Nov 05 2023
STATUS
approved