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!)
A257023 Number of terms in the quarter-sum representation of n. 9
1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 2, 1, 2, 2, 3, 2, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 1, 2, 2, 3, 2, 3, 2, 1, 2, 2, 3, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 3, 1, 2, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Every positive integer is a sum of at most four distinct quarter squares, of which the least term is the trace; see A257019.
LINKS
EXAMPLE
Quarter-square representations:
r(0) = 0, so a(0) = 1
r(3) = 2 + 1, so a(3) = 2
MATHEMATICA
z = 100; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
g = h[200]; r[0] = {0};
r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
Table[Length[r[n]], {n, 0, 3 z}] (* A257022 *)
CROSSREFS
Sequence in context: A106149 A253607 A212179 * A238894 A054740 A272947
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 15 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 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)