login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339431 Number of compositions (ordered partitions) of n into an odd number of distinct squares. 2
0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 6, 0, 0, 0, 1, 6, 0, 0, 6, 6, 0, 0, 0, 0, 6, 1, 0, 6, 0, 0, 6, 6, 0, 0, 6, 6, 0, 0, 7, 6, 0, 0, 6, 6, 120, 6, 0, 0, 6, 0, 6, 12, 0, 1, 6, 126, 0, 0, 12, 6, 0, 0, 0, 12, 126, 0, 12, 6, 120, 0, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,15

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10000

Index entries for sequences related to compositions

Index entries for sequences related to sums of squares

EXAMPLE

a(55) = 120 because we have [25, 16, 9, 4, 1] (120 permutations).

MAPLE

b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!,

     (s-> `if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(i^2))

    end:

a:= n-> b(n, 1, 0):

seq(a(n), n=0..100);  # Alois P. Heinz, Dec 04 2020

MATHEMATICA

b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, With[{s = i^2}, If[s > n, 0, b[n, i + 1, p] + b[n - s, 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

Cf. A000290, A331844, A332304, A339367, A339419, A339430.

Sequence in context: A192072 A060297 A240315 * A256041 A137378 A333275

Adjacent sequences:  A339428 A339429 A339430 * A339432 A339433 A339434

KEYWORD

nonn,look

AUTHOR

Ilya Gutkovskiy, Dec 04 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 05:23 EDT 2021. Contains 346273 sequences. (Running on oeis4.)