OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..300
EXAMPLE
Count the primes in the partitions of 3n into 3 parts for a(n).
13 + 1 + 1
12 + 2 + 1
11 + 3 + 1
10 + 4 + 1
9 + 5 + 1
8 + 6 + 1
7 + 7 + 1
10 + 1 + 1 11 + 2 + 2
9 + 2 + 1 10 + 3 + 2
8 + 3 + 1 9 + 4 + 2
7 + 4 + 1 8 + 5 + 2
6 + 5 + 1 7 + 6 + 2
7 + 1 + 1 8 + 2 + 2 9 + 3 + 3
6 + 2 + 1 7 + 3 + 2 8 + 4 + 3
5 + 3 + 1 6 + 4 + 2 7 + 5 + 3
4 + 4 + 1 5 + 5 + 2 6 + 6 + 3
4 + 1 + 1 5 + 2 + 2 6 + 3 + 3 7 + 4 + 4
3 + 2 + 1 4 + 3 + 2 5 + 4 + 3 6 + 5 + 4
1 + 1 + 1 2 + 2 + 2 3 + 3 + 3 4 + 4 + 4 5 + 5 + 5
3(1) 3(2) 3(3) 3(4) 3(5) .. 3n
---------------------------------------------------------------------
0 5 12 17 29 .. a(n)
MATHEMATICA
Table[Sum[Sum[PrimePi[i] - PrimePi[i - 1], {i, n + Floor[j/2] + 1 - Floor[1/(j + 1)], n + 2 (j + 1)}], {j, 0, n - 2}] + Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, n}] + Sum[(PrimePi[n + i] - PrimePi[n + i - 1]) (n - 2 i), {i, Floor[(n - 1)/2]}] + Sum[(PrimePi[i] - PrimePi[i - 1]) (2 n - 2 i + 1 - Floor[(n - i + 1)/2]), {i, n}], {n, 70}]
Table[Count[Flatten[IntegerPartitions[3 n, {3}]], _?PrimeQ], {n, 60}] (* Harvey P. Dale, Oct 16 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 11 2014
STATUS
approved