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!)
A331983 Number of compositions (ordered partitions) of n into distinct squares > 1. 1
1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 2, 0, 1, 0, 6, 0, 2, 2, 0, 0, 0, 8, 0, 0, 0, 7, 6, 0, 2, 2, 24, 0, 6, 0, 2, 0, 0, 8, 6, 0, 1, 32, 0, 0, 2, 6, 6, 0, 0, 2, 32, 0, 0, 12, 30, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
EXAMPLE
a(25) = 3 because we have [25], [16, 9] and [9, 16].
MAPLE
b:= proc(n, i, p) option remember;
`if`(n=0, p!, `if`(i*(i+1)*(2*i+1)/6-1<n, 0,
`if`(i^2>n, 0, b(n-i^2, i-1, p+1))+b(n, i-1, p)))
end:
a:= n-> b(n, isqrt(n), 0):
seq(a(n), n=0..87); # Alois P. Heinz, Feb 03 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i(i+1)(2i+1)/6 - 1 < n, 0, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
a[n_] := b[n, Floor@Sqrt[n], 0];
a /@ Range[0, 87] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A109527 A362424 A186715 * A219485 A337165 A057918
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 03 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 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)