This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A079644 #36 Jan 11 2025 18:46:01 %S A079644 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 A079644 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 A079644 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 A079644 a(n) = (n mod sqrtint(n)). %C A079644 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 A079644 Stanislav Sykora, <a href="/A079644/b079644.txt">Table of n, a(n) for n = 1..1023</a> %F A079644 a(A006446(n))=0; a(A033638(n))=1. %F A079644 When n>0, a(A000290(n))=0; when n>1, a(A000290(n)-1)=0. - _Stanislav Sykora_, Aug 13 2014 %F A079644 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 A079644 G.f.: Sum_{r>=2} x^(r^2) * (x^r + 1) * ((r-1)*x^(r+1) - r*x^r + x)/(1 - x)^2. - _Robert Israel_, Aug 13 2014 %p A079644 a:= proc(n) local r; %p A079644 r:= isqrt(n); %p A079644 if r^2 > n then r:= r-1 fi; %p A079644 n mod r; %p A079644 end proc: %p A079644 seq(a(n),n=1..100); # _Robert Israel_, Aug 13 2014 %t A079644 A079644[n_]:=Mod[n,Floor[n^(1/2)]]; Array[A079644,200] (* _Enrique Pérez Herrero_, Oct 06 2011 *) %t A079644 Table[Mod[n,Floor[Sqrt[n]]],{n,110}] (* _Harvey P. Dale_, Apr 10 2016 *) %o A079644 (PARI) a(n)=n%sqrtint(n) %Y A079644 Cf. A000290, A006446, A028387, A033638. %K A079644 nonn,easy %O A079644 1,11 %A A079644 _Benoit Cloitre_, Jan 31 2003 %E A079644 Definition clarified by _N. J. A. Sloane_, Jan 11 2025