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!)
A331845 Number of compositions (ordered partitions) of n into distinct cubes. 7
1, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 6, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,10
LINKS
EXAMPLE
a(36) = 6 because we have [27,8,1], [27,1,8], [8,27,1], [8,1,27], [1,27,8] and [1,8,27].
MAPLE
b:= proc(n, i, p) option remember;
`if`((i*(i+1)/2)^2<n, 0, `if`(n=0, p!,
`if`(i^3>n, 0, b(n-i^3, i-1, p+1))+b(n, i-1, p)))
end:
a:= n-> b(n, iroot(n, 3), 0):
seq(a(n), n=0..100); # Alois P. Heinz, Jan 30 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[(i(i+1)/2)^2 < n, 0, If[n == 0, p!, If[i^3 > n, 0, b[n-i^3, i-1, p+1]] + b[n, i-1, p]]];
a[n_] := b[n, Floor[n^(1/3)], 0];
a /@ Range[0, 100] (* Jean-François Alcover, Oct 31 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A349399 A228594 A281669 * A014083 A238403 A112315
KEYWORD
nonn,look
AUTHOR
Ilya Gutkovskiy, Jan 29 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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)