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 A038759 #25 Dec 04 2022 08:32:17 %S A038759 0,1,2,2,4,6,6,6,6,9,12,12,12,12,12,12,16,20,20,20,20,20,20,20,20,25, %T A038759 30,30,30,30,30,30,30,30,30,30,36,42,42,42,42,42,42,42,42,42,42,42,42, %U A038759 49,56,56,56,56,56,56,56,56,56,56,56,56,56,56,64,72,72,72,72,72,72,72 %N A038759 a(n) = ceiling(sqrt(n))*floor(sqrt(n)). %C A038759 a(n) = n iff n is a square or a pronic (or heteromecic) number of form k(k+1). The sequence interleaves individual squares with 2k copies of each pronic. %F A038759 a(n) = A003059(n)*A000196(n) = n - A038760(n). %F A038759 a(A002620(n)) = A002620(n). - _Bernard Schott_, Nov 06 2022 %F A038759 Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). - _Amiram Eldar_, Dec 04 2022 %e A038759 a(31) = 30 since 6 and 5 are on either side of the square root of 31 and 6*5 = 30. %t A038759 a[n_] := Ceiling[Sqrt[n]]*Floor[Sqrt[n]]; Array[a, 70, 0] (* _Amiram Eldar_, Dec 04 2022 *) %o A038759 (Python) %o A038759 from math import isqrt %o A038759 def A038759(n): return m+n+k if (m:=(k:=isqrt(n))**2-n) else n # _Chai Wah Wu_, Jul 28 2022 %o A038759 (PARI) a(n) = my(r,s=sqrtint(n,&r)); if(r, n-r+s, n); \\ _Kevin Ryde_, Jul 30 2022 %Y A038759 Cf. A000196, A002378, A002620, A003059, A038760, A053187, A072691. %K A038759 nonn,easy %O A038759 0,3 %A A038759 _Henry Bottomley_, May 03 2000