login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A341974 Number of partitions of n into 3 distinct primes (counting 1 as a prime). 9

%I #13 Jul 13 2021 02:51:37

%S 1,0,1,1,2,1,1,1,2,2,2,2,2,3,3,4,3,4,2,5,4,5,2,5,2,7,4,6,3,8,3,9,4,7,

%T 2,9,3,10,5,9,4,12,3,13,6,12,4,14,3,16,6,13,3,16,3,19,7,14,3,19,5,21,

%U 6,15,3,23,5,23,7,18,5,26,5,26,7,21,5,29,4,28,9,25,4,30,4

%N Number of partitions of n into 3 distinct primes (counting 1 as a prime).

%H Alois P. Heinz, <a href="/A341974/b341974.txt">Table of n, a(n) for n = 6..10000</a>

%p b:= proc(n, i) option remember; series(`if`(n=0, 1,

%p `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(

%p `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 4)

%p end:

%p a:= n-> coeff(b(n, numtheory[pi](n)), x, 3):

%p seq(a(n), n=6..90); # _Alois P. Heinz_, Feb 24 2021

%t b[n_, i_] := b[n, i] = Series[If[n == 0, 1,

%t If[i<0, 0, Function[p, If[p>n, 0, x*b[n-p, i-1]]][

%t If[i == 0, 1, Prime[i]]] + b[n, i-1]]], {x, 0, 4}];

%t a[n_] := Coefficient[b[n, PrimePi[n]], x, 3];

%t Table[a[n], {n, 6, 1000}] (* _Jean-François Alcover_, Jul 13 2021, after _Alois P. Heinz_ *)

%Y Cf. A008578, A036497, A125688, A341946, A341973, A341975, A341976, A341977.

%K nonn

%O 6,5

%A _Ilya Gutkovskiy_, Feb 24 2021

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 21:22 EDT 2024. Contains 374875 sequences. (Running on oeis4.)