login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167615 Total number of positive integers below 10^n with 4 positive squares in their representation as sum of squares. 4
1, 15, 165, 1665, 16664, 166664, 1666663, 16666663, 166666661, 1666666662, 16666666661, 166666666660, 1666666666661, 16666666666660, 166666666666659, 1666666666666660, 16666666666666658, 166666666666666657, 1666666666666666660, 16666666666666666656 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A049416(n) + A180416(n) + A180425(n) + a(n) = A002283(n)

LINKS

Table of n, a(n) for n=1..20.

Eric W. Weisstein: Lagrange's Four-Square Theorem. From MathWorld.

Eric W. Weisstein: Sum of Squares Function. From MathWorld.

FORMULA

a(n) = Sum(ceil(10^n/2^(2*i+3)-7/8),i=0..k) with minimal k for which ceil(10^n/2^(2*k+3)-7/8) = 0

EXAMPLE

a(1) = 1 since 7 is the only natural number below 10 which is the sum of 4 but no fewer nonzero squares

MAPLE

a:=proc(n)

  local f, s, k;

  f:=(x, y)->ceil(10^y/2^(2*x+3)-7/8):

  s:=0:

  for k from 0 by 1 while not f(k, n)=0 do

    s:=s+f(k, n);

  od:

  return(s);

end;

CROSSREFS

Cf. A004215

Sequence in context: A016291 A229406 A118093 * A210326 A016234 A160197

Adjacent sequences:  A167612 A167613 A167614 * A167616 A167617 A167618

KEYWORD

nonn

AUTHOR

Martin Renner, Jan 18 2011

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 March 19 00:03 EDT 2019. Contains 321305 sequences. (Running on oeis4.)