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 A309407 #33 Jun 19 2024 14:12:03 %S A309407 1,2,3,3,4,4,4,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10, %T A309407 10,10,10,10,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,13,13,13,13, %U A309407 13,13,13,13,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16 %N A309407 a(n) = round(sqrt(3*n + 9/4)), with a(0) = 1. %C A309407 Diverges from A046693 at positions in A308766. %C A309407 For the first 1750 terms, A046693(n)-a(n) is either 0 or 1. %H A309407 Ed Pegg Jr, <a href="http://demonstrations.wolfram.com/SparseRulers/">Sparse Rulers</a>. %F A309407 a(n) = round(sqrt(3*n + 9/4)). %F A309407 From _Michael Chu_, Jan 17 2022: (Start) %F A309407 a(12*k^2 - 6*k) = 6*k - 2 for k>0. %F A309407 a(12*k^2 + 6*k) = 6*k + 2 for k>0. (End) %t A309407 Table[If[n == 0, 1, Round[Sqrt[3 n + 9/4]]], {n, 0, 88}] %o A309407 (PARI) a(n) = if (n, round(sqrt(3*n + 9/4)), 1); \\ _Michel Marcus_, Jan 18 2022 %o A309407 (Python) %o A309407 from math import isqrt %o A309407 from sympy import integer_nthroot %o A309407 def A309407(n): %o A309407 if n == 0: return 1 %o A309407 a, b = integer_nthroot(12*n+9,2) %o A309407 return a-(c:=isqrt(3*n+2))-(b&(c&1^1)) # _Chai Wah Wu_, Jun 19 2024 %Y A309407 Cf. A046693, A308766, A326499. %K A309407 nonn,easy %O A309407 0,2 %A A309407 _Ed Pegg Jr_, Jul 29 2019