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!)
A299168 Number of ordered ways of writing n-th prime number as a sum of n primes. 4

%I #9 Feb 13 2021 09:12:14

%S 1,0,0,0,5,6,42,64,387,5480,10461,113256,507390,1071084,4882635,

%T 44984560,382362589,891350154,7469477771,33066211100,78673599501,

%U 649785780710,2884039365010,22986956007816,306912836483025,1361558306986280,3519406658042964

%N Number of ordered ways of writing n-th prime number as a sum of n primes.

%H Alois P. Heinz, <a href="/A299168/b299168.txt">Table of n, a(n) for n = 1..400</a>

%F a(n) = [x^prime(n)] (Sum_{k>=1} x^prime(k))^n.

%e a(5) = 5 because fifth prime number is 11 and we have [3, 2, 2, 2, 2], [2, 3, 2, 2, 2], [2, 2, 3, 2, 2], [2, 2, 2, 3, 2] and [2, 2, 2, 2, 3].

%p b:= proc(n, t) option remember;

%p `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(

%p `if`(isprime(j), b(n-j, t-1), 0), j=1..n)))

%p end:

%p a:= n-> b(ithprime(n), n):

%p seq(a(n), n=1..30); # _Alois P. Heinz_, Feb 13 2021

%t Table[SeriesCoefficient[Sum[x^Prime[k], {k, 1, n}]^n, {x, 0, Prime[n]}], {n, 1, 27}]

%Y Cf. A000040, A000586, A000607, A023360, A056768, A070215, A073610, A098238, A117278, A121303, A219180, A224344, A259254, A265112, A341459.

%K nonn

%O 1,5

%A _Ilya Gutkovskiy_, Feb 04 2018

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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)