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!)
A339441 Number of compositions (ordered partitions) of n into an even number of distinct triangular numbers. 2
1, 0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 4, 0, 2, 0, 24, 2, 2, 0, 2, 26, 0, 2, 0, 26, 0, 28, 24, 0, 26, 24, 2, 2, 50, 2, 48, 0, 26, 26, 0, 48, 28, 72, 2, 26, 48, 4, 48, 48, 24, 74, 770, 2, 50, 48, 50, 26, 72, 720, 98, 74, 26, 74, 48, 770, 74, 768, 26, 122, 792, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
EXAMPLE
a(20) = 24 because we have [10, 6, 3, 1] (24 permutations).
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, irem(1+p, 2)*p!, (t->
`if`(t>n, 0, b(n, i+1, p)+b(n-t, i+1, p+1)))(i*(i+1)/2))
end:
a:= n-> b(n, 1, 0):
seq(a(n), n=0..100); # Alois P. Heinz, Dec 05 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[1 + p, 2]*p!, With[{t = i(i+1)/2}, If[t > n, 0, b[n, i + 1, p] + b[n - t, i + 1, p + 1]]]];
a[n_] := b[n, 1, 0];
a /@ Range[0, 100] (* Jean-François Alcover, Mar 14 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A035461 A118508 A029305 * A226914 A110036 A308046
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 05 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 March 28 12:26 EDT 2024. Contains 371254 sequences. (Running on oeis4.)