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!)
A331901 Number of compositions (ordered partitions) of the n-th prime into distinct prime parts. 1
1, 1, 3, 3, 1, 3, 25, 9, 61, 91, 99, 151, 901, 303, 1759, 3379, 5239, 4713, 8227, 12901, 12537, 23059, 65239, 159421, 232369, 489817, 351237, 726295, 564363, 1101883, 2517865, 6916027, 11825821, 4942227, 27166753, 21280053, 39547957, 52630273, 113638975 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = A219107(A000040(n)).
EXAMPLE
a(4) = 3 because we have [7], [5, 2] and [2, 5].
MAPLE
s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
b:= proc(n, i, t) option remember; `if`(s(i)<n, 0, `if`(n=0, t!, (p
->`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
end:
a:= n-> b(ithprime(n), n, 0):
seq(a(n), n=1..42); # Alois P. Heinz, Jan 31 2020
MATHEMATICA
s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, Function[p, If[p > n, 0, b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
a[n_] := b[Prime[n], n, 0];
Array[a, 42] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A032240 A366556 A275625 * A306148 A106836 A241235
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 31 2020
STATUS
approved

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 April 24 07:35 EDT 2024. Contains 371922 sequences. (Running on oeis4.)