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.

A003512 A Beatty sequence: floor(n*(sqrt(3) + 2)).

This page as a plain text file.
%I A003512 M2622 #53 Feb 16 2025 08:32:27
%S A003512 3,7,11,14,18,22,26,29,33,37,41,44,48,52,55,59,63,67,70,74,78,82,85,
%T A003512 89,93,97,100,104,108,111,115,119,123,126,130,134,138,141,145,149,153,
%U A003512 156,160,164,167,171,175,179,182,186
%N A003512 A Beatty sequence: floor(n*(sqrt(3) + 2)).
%D A003512 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A003512 Chai Wah Wu, <a href="/A003512/b003512.txt">Table of n, a(n) for n = 1..10000</a>
%H A003512 Aviezri S. Fraenkel, Jonathan Levitt, Michael Shimshoni, <a href="http://dx.doi.org/10.1016/0012-365X(72)90012-X">Characterization of the set of values f(n)=[n alpha], n=1,2,...</a>, Discrete Math. 2 (1972), no.4, 335-345.
%H A003512 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BeattySequence.html">Beatty Sequence.</a>
%H A003512 <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>
%F A003512 a(n) = floor(n*(sqrt(3)+2)). - _Michel Marcus_, Jan 05 2015
%F A003512 For n >= 0, a(n) = 2n + largest integer m such that m^2 <= 3*n^2. - _Chai Wah Wu_, Oct 08 2016
%F A003512 From _Miko Labalan_, Dec 03 2016: (Start)
%F A003512 For n > 0, a(n) = 4*floor(n*(sqrt(3)-1)) + 3*floor(n*(2-sqrt(3))) + 3;
%F A003512 a(0) = 0, a(n) = a(n - 1) + A182778(n) - A182778(n - 1) - 1.
%F A003512 (End)
%p A003512 Digits := 60: A003512 := proc(n) trunc( evalf( n*(sqrt(3)+2) )); end;
%t A003512 Table[Floor[n (Sqrt@ 3 + 2)], {n, 50}] (* _Michael De Vlieger_, Oct 08 2016 *)
%o A003512 (Python)
%o A003512 from gmpy2 import isqrt
%o A003512 def A003512(n):
%o A003512     return 2*n + int(isqrt(3*n**2))  # _Chai Wah Wu_, Oct 08 2016
%Y A003512 Cf. A003511 (complement), A019973 (sqrt(3)+2).
%K A003512 nonn
%O A003512 1,1
%A A003512 _N. J. A. Sloane_