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”).
%I #18 Nov 30 2020 16:19:45
%S 1,1,3,7,16,33,52,99,246,338,750,1255,1608,2585,5110,9782,12074,22240,
%T 32987,40024,70478,101693,173672,345837,483325,570076,789635,927404,
%U 1274113,3725322,5010683,7755766,8953854,18108385,20792118,31316304,46828022,61000699
%N Number of partitions of prime(n) into distinct parts not larger than prime(n-1).
%C The first prime number taken into consideration in the sequence is prime(2)=3, as 2 does not have a preceding prime.
%H Alois P. Heinz, <a href="/A318604/b318604.txt">Table of n, a(n) for n = 2..1000</a>
%e a(5) = 7: there are 7 partitions of prime(5) = 11 into distinct parts not larger than prime(4) = 7: [7,4], [7,3,1], [6,5], [6,4,1], [6,3,2], [5,4,2], [5,3,2,1].
%p b:= proc(n,i) option remember; (m-> `if`(m<n, 0, `if`(m=n, 1,
%p b(n, i-1)+b(n-i, min(n-i, i-1)))))(i*(i+1)/2)
%p end:
%p a:= n-> (p-> b(p(n), p(n-1)))(ithprime):
%p seq(a(n), n=2..50); # _Alois P. Heinz_, Aug 29 2018
%t b[n_, i_] := b[n, i] = Function[m, If[m < n, 0, If[m == n, 1, b[n, i - 1] + b[n - i, Min[n - i, i - 1]]]]][i(i+1)/2];
%t a[n_] := b[Prime[n], Prime[n - 1]];
%t a /@ Range[2, 50] (* _Jean-François Alcover_, Nov 30 2020, after _Alois P. Heinz_ *)
%K nonn
%O 2,3
%A _Pierandrea Formusa_, Aug 29 2018
%E a(26)-a(39) from _Alois P. Heinz_, Aug 29 2018