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!)
A079644 n (mod sqrtint(n)). 1

%I #29 Feb 03 2018 12:28:04

%S 0,0,0,0,1,0,1,0,0,1,2,0,1,2,0,0,1,2,3,0,1,2,3,0,0,1,2,3,4,0,1,2,3,4,

%T 0,0,1,2,3,4,5,0,1,2,3,4,5,0,0,1,2,3,4,5,6,0,1,2,3,4,5,6,0,0,1,2,3,4,

%U 5,6,7,0,1,2,3,4,5,6,7,0,0,1,2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,0,0,1,2,3,4,5

%N n (mod sqrtint(n)).

%C Record values: given an m>=0, the first n for which a(n)=m is n = (m+1)^2+m = A028387(m). Also, for n>3, n is a square if and only if a(n)=0 and a(n-1)=0. - _Stanislav Sykora_, Aug 13 2014

%H Stanislav Sykora, <a href="/A079644/b079644.txt">Table of n, a(n) for n = 1..1023</a>

%F a(A006446(n))=0; a(A033638(n))=1.

%F When n>0, a(A000290(n))=0; when n>1, a(A000290(n)-1)=0. - _Stanislav Sykora_, Aug 13 2014

%F a(n) = 0 if n or n+1 or 4*n+1 is a square, otherwise a(n) = a(n-1)+1. - _Robert Israel_, Aug 13 2014

%F G.f.: sum(r=2..infinity, x^(r^2) * (x^r + 1) * ((r-1)*x^(r+1) - r*x^r + x)/(1 - x)^2. - _Robert Israel_, Aug 13 2014

%p a:= proc(n) local r;

%p r:= isqrt(n);

%p if r^2 > n then r:= r-1 fi;

%p n mod r;

%p end proc:

%p seq(a(n),n=1..100); # _Robert Israel_, Aug 13 2014

%t A079644[n_]:=Mod[n,Floor[n^(1/2)]]; Array[A079644,200] (* _Enrique PĂ©rez Herrero_, Oct 06 2011 *)

%t Table[Mod[n,Floor[Sqrt[n]]],{n,110}] (* _Harvey P. Dale_, Apr 10 2016 *)

%o (PARI) a(n)=n%sqrtint(n)

%Y Cf. A000290, A006446, A028387, A033638.

%K nonn

%O 1,11

%A _Benoit Cloitre_, Jan 31 2003

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 August 19 07:15 EDT 2024. Contains 375284 sequences. (Running on oeis4.)