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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,11
COMMENTS
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
LINKS
FORMULA
a(A006446(n))=0; a(A033638(n))=1.
When n>0, a(A000290(n))=0; when n>1, a(A000290(n)-1)=0. - Stanislav Sykora, Aug 13 2014
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
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
MAPLE
a:= proc(n) local r;
r:= isqrt(n);
if r^2 > n then r:= r-1 fi;
n mod r;
end proc:
seq(a(n), n=1..100); # Robert Israel, Aug 13 2014
MATHEMATICA
A079644[n_]:=Mod[n, Floor[n^(1/2)]]; Array[A079644, 200] (* Enrique Pérez Herrero, Oct 06 2011 *)
Table[Mod[n, Floor[Sqrt[n]]], {n, 110}] (* Harvey P. Dale, Apr 10 2016 *)
PROG
(PARI) a(n)=n%sqrtint(n)
CROSSREFS
Sequence in context: A322823 A334872 A263844 * A072705 A072574 A293595
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 31 2003
STATUS
approved

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 05:36 EDT 2024. Contains 375284 sequences. (Running on oeis4.)