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!)
A257021 Numbers whose quarter-square representation consists of four terms. 7
255, 271, 287, 304, 321, 339, 357, 376, 395, 399, 415, 419, 435, 439, 456, 460, 477, 481, 499, 503, 521, 525, 544, 548, 567, 571, 575, 591, 595, 599, 615, 619, 623, 640, 644, 648, 665, 669, 673, 691, 695, 699, 717, 721, 725, 744, 748, 752, 771, 775, 779, 799 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Every positive integer is a sum of at most four distinct quarter squares (see A257019).

LINKS

Clark Kimberling, Table of n, a(n) for n = 1..1000

EXAMPLE

Quarter-square representations:

r(255) = 240 + 12 + 2 + 1; four terms

r(6969) = 6889 + 72 + 6 + 2; four terms

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[100]; r[0] = {0};

r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];

u = Table[Length[r[n]], {n, 0, 4 z}]; (* A257023 *)

Flatten[-1 + Position[u, 1]]; (* A002620 *)

Flatten[-1 + Position[u, 2]]; (* A257019 *)

Flatten[-1 + Position[u, 3]]; (* A257020 *)

Flatten[-1 + Position[u, 4]]; (* A257021 *)

CROSSREFS

Cf. A002620, A257019, A257020, A257023.

Sequence in context: A028526 A132828 A296899 * A306223 A023690 A101745

Adjacent sequences:  A257018 A257019 A257020 * A257022 A257023 A257024

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 20 04:32 EST 2020. Contains 332063 sequences. (Running on oeis4.)