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!)
A257021 Numbers whose quarter-square representation consists of four terms. 7

%I #4 Apr 15 2015 15:43:02

%S 255,271,287,304,321,339,357,376,395,399,415,419,435,439,456,460,477,

%T 481,499,503,521,525,544,548,567,571,575,591,595,599,615,619,623,640,

%U 644,648,665,669,673,691,695,699,717,721,725,744,748,752,771,775,779,799

%N Numbers whose quarter-square representation consists of four terms.

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

%H Clark Kimberling, <a href="/A257021/b257021.txt">Table of n, a(n) for n = 1..1000</a>

%e Quarter-square representations:

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

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

%t z = 100; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];

%t s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];

%t h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];

%t g = h[100]; r[0] = {0};

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

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

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

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

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

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

%Y Cf. A002620, A257019, A257020, A257023.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, Apr 15 2015

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 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)