cp's OEIS Frontend

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.

A060018 a(n) = floor(2*sqrt(n-2)).

This page as a plain text file.
%I A060018 #45 Jun 06 2025 14:47:57
%S A060018 0,2,2,3,4,4,4,5,5,6,6,6,6,7,7,7,8,8,8,8,8,9,9,9,9,10,10,10,10,10,10,
%T A060018 11,11,11,11,11,12,12,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,
%U A060018 14,14,14,15,15,15,15,15,15,15,16,16,16,16,16,16,16
%N A060018 a(n) = floor(2*sqrt(n-2)).
%H A060018 Harry J. Smith, <a href="/A060018/b060018.txt">Table of n, a(n) for n = 2..1000</a>
%H A060018 J. R. Griggs, <a href="http://dx.doi.org/10.1016/S0012-365X(00)00203-X">Spanning subset sums for finite Abelian groups</a>, Discrete Math., 229 (2001), 89-99.
%H A060018 Matthew Hyatt, Marina Skyers, <a href="http://www.emis.de/journals/INTEGERS/papers/p17/p17.Abstract.html">On the Increases of the Sequence floor(k*sqrt(n))</a>, Electronic Journal of Combinatorial Number Theory, Volume 15 #A17.
%F A060018 a(n) = floor(2*sqrt(n-2)) = floor(sqrt(4*n-8)). - _Charles R Greathouse IV_, Nov 26 2015
%F A060018 G.f.: (Sum_{k>=1} x^(k^2+2) + x^(k^2-k+3))/(1-x)
%F A060018 = (x^2 * (Theta3(x)-1) + x^(11/4) * Theta2(x))/(2-2*x) where Theta2 and Theta3 are Jacobi theta functions. - _Robert Israel_, Dec 09 2015
%F A060018 a(n) = A000194(n-2) + A000196(n-2) = floor(sqrt(n-2)+1/2) + floor(sqrt(n-2)). - _Ridouane Oudra_, Jun 07 2019
%t A060018 Floor[2*Sqrt[Range[2,80]-2]] (* _Harvey P. Dale_, Aug 19 2015 *)
%o A060018 (PARI) { default(realprecision, 100); for (n=2, 1000, write("b060018.txt", n, " ", floor(2*sqrt(n - 2))); ) } \\ _Harry J. Smith_, Jul 01 2009
%o A060018 (PARI) a(n)=sqrtint(4*n-8) \\ _Charles R Greathouse IV_, Aug 23 2011
%o A060018 (Magma) [Floor(2*Sqrt(n-2)): n in [2..100]]; // _Vincenzo Librandi_, Dec 09 2015
%o A060018 (Python)
%o A060018 from math import isqrt
%o A060018 def A060018(n): return isqrt(n-2<<2) # _Chai Wah Wu_, Jun 06 2025
%Y A060018 Cf. A060019.
%K A060018 nonn,easy
%O A060018 2,2
%A A060018 _N. J. A. Sloane_, Mar 17 2001