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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087278 Distance to nearest square is not greater than 1. 1
0, 1, 2, 3, 4, 5, 8, 9, 10, 15, 16, 17, 24, 25, 26, 35, 36, 37, 48, 49, 50, 63, 64, 65, 80, 81, 82, 99, 100, 101, 120, 121, 122, 143, 144, 145, 168, 169, 170, 195, 196, 197, 224, 225, 226, 255, 256, 257, 288, 289, 290, 323, 324, 325, 360, 361, 362, 399, 400, 401 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

Union of A005563, A000290 and A002522:

a(3*k) = (k+1)^2 - 1 = A005563(k+1);

a(3*k+1) = (k+1)^2 = A000290(k+1);

a(3*k+2) = (k+1)^2 + 1 = A002522(k+1);

FORMULA

a(n) = floor(n/3)*(floor(n/3) + 2) + n mod 3.

MATHEMATICA

dnsQ[n_]:=Module[{x=Floor[Sqrt[n]]}, Min[n-x^2, (x+1)^2-n]<=1]; Select[Range[0, 450], dnsQ] (* From Harvey P. Dale, May 25 2011 *)

CROSSREFS

Cf. A002264, A010872, A087279.

Sequence in context: A102471 A094566 A190018 * A054219 A116214 A161389

Adjacent sequences:  A087275 A087276 A087277 * A087279 A087280 A087281

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 28 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 14:50 EST 2012. Contains 206050 sequences.