The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A256790 Number of terms in the minimal alternating squares representation of n. 1
 1, 1, 2, 2, 1, 2, 3, 3, 2, 1, 4, 3, 2, 3, 3, 2, 1, 3, 4, 4, 3, 2, 3, 3, 2, 1, 5, 2, 3, 4, 4, 3, 2, 3, 3, 2, 1, 3, 4, 5, 2, 3, 4, 4, 3, 2, 3, 3, 2, 1, 4, 4, 3, 4, 5, 2, 3, 4, 4, 3, 2, 3, 3, 2, 1, 2, 3, 4, 4, 3, 4, 5, 2, 3, 4, 4, 3, 2, 3, 3, 2, 1, 5, 4, 2, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS See A256789 for definitions. LINKS Clark Kimberling, Table of n, a(n) for n = 0..1000 EXAMPLE R(0) = 0, so a(0) = 1; R(1) = 1, so a(1) = 1; R(2) = 4 - 2, so a(2) = 2; R(7) = 9 - 4 + 2, so a(7) = 3; R(89) = 100 - 16 + 9 - 4, so a(89) = 4. MATHEMATICA b[n_] := n^2; bb = Table[b[n], {n, 0, 1000}]; 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]]]; Table[r[n], {n, 0, 120}] (* A256789 *) Flatten[Table[Length[r[n]], {n, 0, 1000}]]  (* A256790 *) CROSSREFS Cf. A256789. Sequence in context: A227185 A284579 A167489 * A337225 A256478 A106638 Adjacent sequences:  A256787 A256788 A256789 * A256791 A256792 A256793 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.

Last modified May 21 07:22 EDT 2022. Contains 353889 sequences. (Running on oeis4.)