%I A053186
%S A053186 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,
%T A053186 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,
%U A053186 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
%N A053186 Square excess of n: difference between n and largest square <= n.
%C A053186 Comment from David Wilson (davidwwilson(AT)comcast.net), Jan 05 2009:
(Start)
%C A053186 More generally we may consider sequences defined by:
%C A053186 a(n) = n^j - (largest k^th power <= n^j),
%C A053186 a(n) = n^j - (largest k^th power < n^j),
%C A053186 a(n) = (largest k^th power >= n^j) - n^j,
%C A053186 a(n) = (largest k^th power > n^j) - n^j,
%C A053186 for small values of j and k.
%C A053186 The present entry is the first of these with j = 1 and n = 2.
%C A053186 It might be interesting to add further examples to the OEIS. (End)
%C A053186 a(A000290(n)) = 0; a(A005563(n)) = 2*n. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com),
May 20 2009]
%D A053186 S. H. Weintraub, An interesting recursion, Amer. Math. Monthly, 111 (No.
6, 2004), 528-530.
%H A053186 H. Bottomley, <a href="a000196.gif">Illustration of A000196, A048760,
A053186</a>
%H A053186 M. Somos, <a href="a073189.txt">Sequences used for indexing triangular
or square arrays</a>
%F A053186 a(n) = n-A048760(n) =n-floor(sqrt(n))^2
%F A053186 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]
%p A053186 S:=proc(n) if issqr(n) then RETURN(0); fi; n-(floor(sqrt(n)))^2; end;
%t A053186 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]
%o A053186 (PARI) a(n)=if(n<0,0,n-sqrtint(n)^2)
%Y A053186 Cf. A002262, A048760. A071797(n)=1+a(n-1).
%Y A053186 A002262. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com),
May 20 2009]
%Y A053186 Sequence in context: A119464 A107017 A049260 this_sequence A066628 A135317
A115218
%Y A053186 Adjacent sequences: A053183 A053184 A053185 this_sequence A053187 A053188
A053189
%K A053186 easy,nonn
%O A053186 0,4
%A A053186 Henry Bottomley (se16(AT)btinternet.com), Mar 01 2000
|