login
A305937
Number of partitions such that the least positive integer which is not a part of the partition is prime.
1
0, 1, 1, 2, 3, 5, 6, 10, 13, 19, 26, 36, 47, 65, 84, 111, 144, 188, 239, 309, 390, 497, 624, 786, 978, 1224, 1513, 1875, 2306, 2839, 3469, 4246, 5162, 6279, 7600, 9196, 11077, 13344, 16006, 19191, 22934, 27387, 32602, 38788, 46015, 54547, 64504, 76209, 89835
OFFSET
0,4
LINKS
EXAMPLE
For n=3 there are three unrestricted partitions: 3, 2+1, and 1+1+1. The least positive integer not in the first partition is 1. One is not a prime so the first partition is not counted. For the second partition the smallest missing positive integer is 3, which is prime. For the third partition the missing number is 2, which is prime. So a(3)=2.
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t or isprime(i), 1, 0), `if`(i>n, 0,
`if`(t or isprime(i), b(n, i+1, true), 0)+
add(b(n-i*j, i+1, t), j=1..n/i)))
end:
a:= n-> b(n, 1, false):
seq(a(n), n=0..70); # Alois P. Heinz, Jun 16 2018
MATHEMATICA
nend = 30;
For[n = 1, n <= nend, n++,
sum[n] = 0;
partition = {n};
For[i = 1, i <= PartitionsP[n], i++,
partition = NextPartition[partition];
mex = Min[Complement[Range[n + 1], partition]];
If [PrimeQ[mex], sum[n]++; ] ] ];
Table[sum[i], {i, 1, nend}]
CROSSREFS
Cf. A000040.
Sequence in context: A064173 A145724 A039843 * A286097 A287483 A014853
KEYWORD
nonn
AUTHOR
David S. Newman, Jun 14 2018
STATUS
approved