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!)
A341122 Number of partitions of n into 4 prime powers (including 1). 10

%I #12 Feb 22 2022 03:50:22

%S 1,1,2,3,5,5,8,9,12,13,17,17,22,22,26,27,33,31,39,38,44,43,51,47,58,

%T 54,63,60,71,64,79,74,88,82,99,88,108,97,116,105,126,110,134,119,141,

%U 126,153,133,164,143,172,149,184,155,194,168,204,173,215,180,227,192,238

%N Number of partitions of n into 4 prime powers (including 1).

%p q:= proc(n) option remember; nops(ifactors(n)[2])<2 end:

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

%p `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+

%p `if`(q(i), b(n-i, min(n-i, i), t-1), 0)))

%p end:

%p a:= n-> b(n$2, 4):

%p seq(a(n), n=4..66); # _Alois P. Heinz_, Feb 05 2021

%t q[n_] := q[n] = Length[FactorInteger[n]] < 2;

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

%t If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +

%t If[q[i], b[n - i, Min[n - i, i], t - 1], 0]]];

%t a[n_] := b[n, n, 4];

%t Table[a[n], {n, 4, 66}] (* _Jean-François Alcover_, Feb 22 2022, after _Alois P. Heinz_ *)

%Y Cf. A000961, A010055, A071330, A341112, A341123, A341124, A341125, A341126, A341127.

%K nonn

%O 4,3

%A _Ilya Gutkovskiy_, Feb 05 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 28 09:38 EDT 2024. Contains 375481 sequences. (Running on oeis4.)