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 A003151 M1033 #95 Apr 13 2025 16:31:26 %S A003151 2,4,7,9,12,14,16,19,21,24,26,28,31,33,36,38,41,43,45,48,50,53,55,57, %T A003151 60,62,65,67,70,72,74,77,79,82,84,86,89,91,94,96,98,101,103,106,108, %U A003151 111,113,115,118,120,123,125,127,130,132,135,137,140,142,144 %N A003151 Beatty sequence for 1+sqrt(2); a(n) = floor(n*(1+sqrt(2))). %C A003151 Numbers with an odd number of trailing 0's in their minimal representation in terms of the positive Pell numbers (A317204). - _Amiram Eldar_, Mar 16 2022 %C A003151 From _Clark Kimberling_, Dec 24 2022: (Start) %C A003151 This is the first of four sequences that partition the positive integers. Starting with a general overview, suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their complements, and assume that the following four sequences are infinite: %C A003151 (1) u ^ v = intersection of u and v (in increasing order); %C A003151 (2) u ^ v'; %C A003151 (3) u' ^ v; %C A003151 (4) u' ^ v'. %C A003151 Every positive integer is in exactly one of the four sequences. %C A003151 For A003151, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor(((1+sqrt(2))/2)*n), so that r = sqrt(2), s = (1+sqrt(2))/2, r' = (2+sqrt(2))/2, s' = 1 + 1/sqrt(2). %C A003151 Assume that if w is any of the sequences u, v, u', v', then lim_{n->oo} w(n)/n exists and defines the (limiting) density of w. For w = u,v,u',v', denote the densities by r,s,r',s'. Then the densities of sequences (1)-(4) exist, and 1/(r*r') + 1/(r*s') + 1/(s*s') + 1/(s*r') = 1. %C A003151 (1) u ^ v = (2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, ...) = A003151 %C A003151 (2) u ^ v' = (1, 5, 8, 11, 15, 18, 22, 25, 29, 32, 35, 39, 42, ...) = A001954 %C A003151 (3) u' ^ v = (284, 287, 289, 292, 294, 296, 299, 301, 304, 306, ...) = A356135 %C A003151 (4) u' ^ v' = (3, 6, 10, 13, 17, 20, 23, 27, 30, 34, 37, 40, 44, ...) = A003152 %C A003151 For results of compositions instead of intersections, see A184922. (End) %C A003151 The indices of the twice squares in the sequence of squares and twice squares: A028982(a(n)) = 2*n^2. - _Amiram Eldar_, Apr 13 2025 %D A003151 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A003151 G. C. Greubel, <a href="/A003151/b003151.txt">Table of n, a(n) for n = 1..5000</a> %H A003151 Shiri Artstein-Avidan, Aviezri S. Fraenkel and Vera T. Sós, <a href="https://doi.org/10.1016/j.disc.2007.08.070">A two-parameter family of an extension of Beatty sequences</a>, Discrete Math., Vol. 308, No. 20 (2008), pp. 4578-4588; <a href="http://www.wisdom.weizmann.ac.il/~fraenkel/Papers/coatp8.pdf">preprint</a>. %H A003151 Leonard Carlitz, Richard Scoville, and Verner E. Hoggatt, Jr., <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/10-5.html">Pellian representatives</a>, Fib. Quart., Vol. 10, No. 5 (1972), pp. 449-488. %H A003151 Benoit Cloitre, N. J. A. Sloane, and Matthew J. Vandermast, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Cloitre/cloitre2.html">Numerical analogues of Aronson's sequence</a>, J. Integer Seq., Vol. 6 (2003), Article 03.2.2; <a href="https://arxiv.org/abs/math/0305308">arXiv preprint</a>, arXiv:math/0305308 [math.NT], 2003. %H A003151 Joshua N. Cooper and Alexander W. N. Riasanovsky, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Cooper/cooper3.html">On the Reciprocal of the Binary Generating Function for the Sum of Divisors</a>, J. Int. Seq., Vol. 16 (2013), Article 13.1.8; <a href="http://www.math.sc.edu/~cooper/Sigma.pdf">preprint</a>, 2012. %H A003151 R. J. Mathar, <a href="/A003151/a003151.pdf">Graphical representation among sequences closely related to this one</a> (cf. N. J. A. Sloane, "Families of Essentially Identical Sequences"). %H A003151 Luke Schaeffer, Jeffrey Shallit, and Stefan Zorcic, <a href="https://arxiv.org/abs/2402.08331">Beatty Sequences for a Quadratic Irrational: Decidability and Applications</a>, arXiv:2402.08331 [math.NT], 2024. See pp. 17-18. %H A003151 N. J. A. Sloane, <a href="/A115004/a115004.txt">Families of Essentially Identical Sequences</a>, Mar 24 2021 (Includes this sequence). %H A003151 <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>. %F A003151 a(1) = 2; for n>1, a(n+1) = a(n)+3 if n is already in the sequence, a(n+1) = a(n)+2 otherwise. %t A003151 Table[Floor[n*(1 + Sqrt[2])], {n, 1, 50}] (* _G. C. Greubel_, Jul 02 2017 *) %o A003151 (PARI) for(n=1,50, print1(floor(n*(1 + sqrt(2))), ", ")) \\ _G. C. Greubel_, Jul 02 2017 %o A003151 (Python) %o A003151 from math import isqrt %o A003151 def A003151(n): return n+isqrt(n*n<<1) # _Chai Wah Wu_, Aug 03 2022 %Y A003151 Complement of A003152. %Y A003151 Equals A001951(n) + n. %Y A003151 Cf. A028982, A109250, A317204. %Y A003151 The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - _N. J. A. Sloane_, Mar 09 2021 %Y A003151 Bisections: A197878, A215247. %Y A003151 Cf. A001954, A356135, A184922, A341239. %K A003151 nonn,easy %O A003151 1,1 %A A003151 _N. J. A. Sloane_