|
| |
|
|
A053188
|
|
Distance to nearest square.
|
|
10
| |
|
|
0, 0, 1, 1, 0, 1, 2, 2, 1, 0, 1, 2, 3, 3, 2, 1, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,7
|
|
|
LINKS
| Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
|
|
|
EXAMPLE
| a(7)=2 since 9 is closest square to 7 and |9-7|=2
|
|
|
MATHEMATICA
| Flatten[Table[Abs[Nearest[Range[0, 25]^2, n]-n], {n, 0, 120}]] (* From Harvey P. Dale, Mar 14 2011 *)
|
|
|
PROG
| (Haskell)
a053188 0 = 0
a053188 n = min (n - last xs) (head ys - n) where
(xs, ys) = span (< n) a000290_list
-- Reinhard Zumkeller, Nov 28 2011
|
|
|
CROSSREFS
| Cf. A053187.
Cf. A074989, A000290.
Sequence in context: A185700 A061926 A180835 * A109389 A098884 A039800
Adjacent sequences: A053185 A053186 A053187 * A053189 A053190 A053191
|
|
|
KEYWORD
| easy,nonn
|
|
|
AUTHOR
| Henry Bottomley (se16(AT)btinternet.com), Mar 01 2000
|
| |
|
|