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!)
A174806 a(n) = n-floor(sqrt(n))^2-floor(sqrt(n-floor(sqrt(n))^2))^2; difference between n and sum of two largest distinct squares <= n. 2
0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 0, 0, 1, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
If a(n)=0 then n is a sum of two squares A001481, but not conversely. For the sum of two squares n = 18, 32, 41, ... we have a(n) > 0. - Thomas Ordowski, Jul 11 2014
LINKS
FORMULA
a(n) = 0 iff A053610(n) < 3 and 0 < a(n) = m^2 iff A053610(n) = 3. - Thomas Ordowski, Jul 12 2014
EXAMPLE
24=4^2+8;8-2^2=4, 115=10^2+15;15-3^2=6,..
MATHEMATICA
a[n_]:=n-Floor[Sqrt[n]]^2-Floor[Sqrt[n-Floor[Sqrt[n]]^2]]^2;
Table[a[n], {n, 0, 6!}]
PROG
(PARI) a(n) = my(x=sqrtint(n)^2); n - x - sqrtint((n-x))^2; \\ Michel Marcus, Dec 17 2022
CROSSREFS
Sequence in context: A191410 A249142 A225099 * A089605 A218786 A218787
KEYWORD
nonn
AUTHOR
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 18 04:31 EDT 2024. Contains 371767 sequences. (Running on oeis4.)