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!)
A344789 Number of partitions of the n-th nonprime number into a nonprime number of nonprime parts. 1
1, 2, 2, 2, 4, 3, 6, 8, 11, 11, 19, 27, 32, 37, 55, 63, 78, 88, 108, 149, 204, 232, 274, 313, 371, 497, 556, 654, 864, 1135, 1267, 1476, 1915, 2142, 2474, 2754, 3182, 4070, 4528, 5190, 5769, 6594, 8347, 10530, 11666, 13240, 14657, 16597, 20747, 22924, 25854 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(5) = 4: [9], [6,1,1,1], [4,1,1,1,1,1], [1,1,1,1,1,1,1,1,1].
a(6) = 3: [10], [4,4,1,1], [1,1,1,1,1,1,1,1,1,1].
a(7) = 6: [12], [9,1,1,1], [6,4,1,1], [4,4,1,1,1,1], [4,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1,1,1].
MAPLE
c:= proc(n) option remember; local k; if n=1 then 1 else
for k from 1+c(n-1) while isprime(k) do od; k fi
end:
h:= proc(n) option remember; `if`(isprime(n), h(n-1), n) end:
b:= proc(n, i, c) option remember; `if`(n=0 or i=1, `if`(isprime(
c+n), 0, 1), b(n-i, h(min(n-i, i)), c+1)+b(n, h(i-1), c))
end:
a:= n-> b(c(n)$2, 0):
seq(a(n), n=1..55);
MATHEMATICA
c[n_] := c[n] = Module[{k}, If[n == 1, 1,
For[k = 1+c[n-1], PrimeQ[k], k++]; k]];
h[n_] := h[n] = If[PrimeQ[n], h[n-1], n];
b[n_, i_, c_] := b[n, i, c] = If[n == 0 || i == 1, If[PrimeQ[
c+n], 0, 1], b[n-i, h[Min[n-i, i]], c+1] + b[n, h[i-1], c]];
a[n_] := b[c[n], c[n], 0];
Table[a[n], {n, 1, 55}] (* Jean-François Alcover, Sep 08 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A368689 A210596 A240078 * A228660 A228796 A155837
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 28 2021
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 August 11 03:32 EDT 2024. Contains 375059 sequences. (Running on oeis4.)