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!)
A256796 Positive part of the minimal alternating squares representation of n. 2
1, 4, 4, 4, 9, 10, 11, 9, 9, 20, 20, 16, 17, 18, 16, 16, 26, 29, 29, 29, 25, 26, 27, 25, 25, 46, 36, 37, 40, 40, 40, 36, 37, 38, 36, 36, 53, 58, 59, 49, 50, 53, 53, 53, 49, 50, 51, 49, 49, 68, 68, 68, 73, 74, 64, 65, 68, 68, 68, 64, 65, 66, 64, 64, 81, 82 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
See A256789 for definitions.
LINKS
EXAMPLE
R(1) = 1, positive part 1, nonpositive part 0;
R(2) = 4 - 2, positive part 4, nonpositive part 2;
R(3) = 4 - 1, positive part 4, nonpositive part 1;
R(89) = 100 - 16 + 9 - 4, positive part 100 + 9 = 109, nonpositive part 16 + 4 = 20.
MATHEMATICA
b[n_] := n^2; bb = Table[b[n], {n, 0, 100}];
s[n_] := Table[b[n], {k, 1, 2 n - 1}];
h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
g = h[100]; r[0] = {0}; r[1] = {1}; r[2] = {4, -2};
r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
t = Table[r[n], {n, 1, z}] (* A256789 *)
Table[Total[(Abs[r[n]] + r[n])/2], {n, 1, 120}] (* A256796 *)
Table[Total[(Abs[r[n]] - r[n])/2], {n, 1, 120}] (* A256797 *)
CROSSREFS
Sequence in context: A048761 A211547 A075561 * A117405 A013601 A219802
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 13 2015
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 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)