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!)
A231071 Number of solutions to n = +- 1^2 +- 2^2 +- 3^2 +- 4^2 +- ... +- k^2 for minimal k giving at least one solution. 4
2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 3, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 9, 1, 3, 1, 1, 1, 2, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 5, 1, 1, 1, 1, 4, 3, 1, 2, 1, 2, 2, 1, 2, 1, 14, 2, 1, 3, 2, 1, 2, 1, 1, 7, 1, 3, 2, 5, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
This type of sequence was first studied by Andrica and Vacaretu. - Jonathan Sondow, Nov 06 2013
LINKS
Dorin Andrica and Daniel Vacaretu, Representation theorems and almost unimodal sequences, Studia Univ. Babes-Bolyai, Mathematica, Vol. LI, 4 (2006), 23-33.
FORMULA
From Jonathan Sondow, Nov 03 2013: (Start)
a(n(n+1)(2n+1)/6) = 1 for n > 0: n(n+1)(2n+1)/6 = 1+4+9+...+n^2. See A000330.
a(n(n+1)(2n+1)/6 - 2) = 1 for n > 1: n(n+1)(2n+1)/6 - 2 = -1+4+9+...+n^2. (End)
EXAMPLE
a(8) = 3: 8 = -1-4-9-16+25-36+49 = -1-4+9+16-25-36+49 = -1+4+9-16+25+36-49.
a(9) = 2: 9 = -1-4+9+16+25-36 = 1+4+9-16-25+36.
a(10) = 1: 10 = -1+4-9+16.
MAPLE
b:= proc(n, i) option remember; (m->`if`(n>m, 0, `if`(n=m, 1,
b(n+i^2, i-1) +b(abs(n-i^2), i-1))))((1+(3+2*i)*i)*i/6)
end:
a:= proc(n) local k; for k while b(n, k)=0 do od; b(n, k) end:
seq(a(n), n=0..100);
MATHEMATICA
b[n_, i_] := b[n, i] = Function[m, If[n > m, 0, If[n == m, 1,
b[n+i^2, i-1] + b[Abs[n-i^2], i-1]]]][(1+(3+2*i)*i)*i/6];
a[n_] := Module[{k}, For[k = 1, b[n, k] == 0, k++]; b[n, k]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 01 2022, after Alois P. Heinz *)
CROSSREFS
Cf. A083527, A158092 (extremal sums).
Sequence in context: A186027 A359250 A322482 * A209156 A329325 A341149
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, Nov 03 2013
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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)