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.

A000267 Integer part of square root of 4n+1.

This page as a plain text file.
%I A000267 #97 Nov 24 2024 01:49:31
%S A000267 1,2,3,3,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,
%T A000267 11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13,13,14,14,14,14,14,
%U A000267 14,14,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17
%N A000267 Integer part of square root of 4n+1.
%C A000267 1^1, 2^1, 3^2, 4^2, 5^3, 6^3, 7^4, 8^4, 9^5, 10^5, ...
%C A000267 Start with n, repeatedly subtract the square root of the previous term; a(n) gives number of steps to reach 0. - _Robert G. Wilson v_, Jul 22 2002
%C A000267 Triangle A094727 read by diagonals. - _Philippe Deléham_, Mar 21 2014
%C A000267 Partial sums of A240025; a(n) = number of quarter squares <= n. - _Reinhard Zumkeller_, Jul 05 2014
%C A000267 Every number k is present consecutively (floor((2*k+3)/4)) times. - _Bernard Schott_, Jun 08 2019
%D A000267 Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 73, problem 20.
%D A000267 Bruce C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, 1994, see p. 77, Entry 23.
%H A000267 T. D. Noe, <a href="/A000267/b000267.txt">Table of n, a(n) for n = 0..10000</a>
%H A000267 Gal Cohensius, Urban Larsson, Reshef Meir, and David Wahlstedt, <a href="https://arxiv.org/abs/1805.09368">Cumulative subtraction games</a>, arXiv:1805.09368 [math.CO], 2018-2020.
%H A000267 S. Ramanujan, <a href="http://www.imsc.res.in/~rao/ramanujan/CamUnivCpapers/question/q723.htm">Question 723</a>, J. Ind. Math. Soc., Vol. 7 (1915), p. 240, Vol. 10 (1918), pp. 357-358.
%F A000267 floor(a(n)/2) = A000196(n).
%F A000267 a(n) = 1 + a(n - floor(n^(1/2))), if n>0. - _Michael Somos_, Jul 22 2002
%F A000267 a(n) = floor( 1 / ( sqrt(n + 1) - sqrt(n) ) ). - Robert A. Stump (bob_ess107(AT)yahoo.com), Apr 07 2003
%F A000267 a(n) = |{floor(n/k): k in Z+}|. - _David W. Wilson_, May 26 2005
%F A000267 a(n) = ceiling(2*sqrt(n+1) - 1). - _Mircea Merca_, Feb 03 2012
%F A000267 a(n) = A000196(A016813(n)). - _Reinhard Zumkeller_, Dec 13 2012
%F A000267 a(n) = A070939(A227368(n+1)), conjectured. - _Antti Karttunen_, Dec 28 2013
%F A000267 a(n) = floor( sqrt(n) + sqrt(n+2) ). [_Bruno Berselli_, Jan 08 2015]
%F A000267 a(n) = floor( sqrt(4*n + k) ) where k = 1, 2, or 3. - _Michael Somos_, Mar 11 2015
%F A000267 G.f.: (Sum_{k>0} x^floor(k^2 / 4)) / (1 - x). - _Michael Somos_, Mar 11 2015
%F A000267 a(n) = 1 + A055086(n). - _Michael Somos_, Sep 02 2017
%F A000267 a(n) = floor(sqrt(n+1)+1/2) + floor(sqrt(n)). - _Ridouane Oudra_, Jun 07 2019
%F A000267 Sum_{k>=0} (-1)^k/a(k) = Pi/8 + log(2)/4. - _Amiram Eldar_, Jan 26 2024
%e A000267 From _Philippe Deléham_, Mar 21 2014: (Start)
%e A000267 Triangle A094727 begins:
%e A000267   1;
%e A000267   2,  3;
%e A000267   3,  4,  5;
%e A000267   4,  5,  6,  7;
%e A000267   5,  6,  7,  8,  9;
%e A000267   6,  7,  8,  9, 10, 11; ...
%e A000267 Read by diagonals:
%e A000267    1;
%e A000267    2;
%e A000267    3,  3;
%e A000267    4,  4;
%e A000267    5,  5,  5;
%e A000267    6,  6,  6;
%e A000267    7,  7,  7,  7;
%e A000267    8,  8,  8,  8;
%e A000267    9,  9,  9,  9,  9;
%e A000267   10, 10, 10, 10, 10; (End)
%e A000267 G.f. = 1 + 2*x + 3*x^2 + 3*x^3 + 4*x^4 + 4*x^5 + 5*x^6 + 5*x^7 + 5*x^8 + 6*x^9 + ...
%p A000267 A000267:=seq(floor(sqrt(4*n+1)), n=0..100); // _Bernard Schott_, Jun 08 2019
%t A000267 Table[Floor[Sqrt[4*n + 1]], {n, 0, 100}] (* _T. D. Noe_, Jun 19 2012 *)
%o A000267 (PARI) {a(n) = if( n<0, 0, sqrtint(4*n + 1))};
%o A000267 (Haskell)
%o A000267 a000267 = a000196 . a016813  -- _Reinhard Zumkeller_, Dec 13 2012
%o A000267 (Magma) [Floor(Sqrt(4*n+1)): n in [0..100]]; // _Vincenzo Librandi_, Jun 08 2019
%o A000267 (Python)
%o A000267 from math import isqrt
%o A000267 def A000267(n): return isqrt((n<<2)|1) # _Chai Wah Wu_, Nov 23 2024
%Y A000267 Cf. A055086, A080037, A227368.
%Y A000267 Cf. A000196, A002620, A016813, A070939, A094727, A240025.
%K A000267 nonn,easy,nice,tabf
%O A000267 0,2
%A A000267 _N. J. A. Sloane_
%E A000267 More terms from _Michael Somos_, Jun 13 2000