|
| |
|
|
A053186
|
|
Square excess of n: difference between n and largest square <= n.
|
|
26
| |
|
|
0, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,4
|
|
|
COMMENTS
| Comment from David Wilson (davidwwilson(AT)comcast.net), Jan 05 2009: (Start)
More generally we may consider sequences defined by:
a(n) = n^j - (largest k^th power <= n^j),
a(n) = n^j - (largest k^th power < n^j),
a(n) = (largest k^th power >= n^j) - n^j,
a(n) = (largest k^th power > n^j) - n^j,
for small values of j and k.
The present entry is the first of these with j = 1 and n = 2.
It might be interesting to add further examples to the OEIS. (End)
a(A000290(n)) = 0; a(A005563(n)) = 2*n. [Reinhard Zumkeller, May 20 2009]
0 ^ a(n) = A010052(n). [Reinhard Zumkeller, Feb 12 2012]
|
|
|
REFERENCES
| S. H. Weintraub, An interesting recursion, Amer. Math. Monthly, 111 (No. 6, 2004), 528-530.
|
|
|
LINKS
| Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
H. Bottomley, Illustration of A000196, A048760, A053186
M. Somos, Sequences used for indexing triangular or square arrays
|
|
|
FORMULA
| a(n) = n-A048760(n) =n-floor(sqrt(n))^2
a(n)=f(n,1) with f(n,m) = if n<m then n else f(n-m,m+2). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), May 20 2009]
|
|
|
MAPLE
| S:=proc(n) if issqr(n) then RETURN(0); fi; n-(floor(sqrt(n)))^2; end;
|
|
|
MATHEMATICA
| f[n_] := n - (Floor@ Sqrt@ n)^2; Table[f@ n, {n, 0, 94}] [From Robert G. Wilson, v (rgwv(AT)rgwv.com), Jan 23 2009]
|
|
|
PROG
| (PARI) a(n)=if(n<0, 0, n-sqrtint(n)^2)
|
|
|
CROSSREFS
| Cf. A002262, A048760. A071797(n)=1+a(n-1).
A002262. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), May 20 2009]
Cf. A048760, A000196.
Sequence in context: A201076 A201079 A049260 * A066628 A135317 A115218
Adjacent sequences: A053183 A053184 A053185 * A053187 A053188 A053189
|
|
|
KEYWORD
| easy,nonn,changed
|
|
|
AUTHOR
| Henry Bottomley (se16(AT)btinternet.com), Mar 01 2000
|
| |
|
|