OFFSET
1,1
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 3*n + floor(sqrt(2)*n) = 3*n+A001951(n).
MATHEMATICA
Table[Floor[(3+2^(1/2))n], {n, 1, 120}]
With[{c=3+Sqrt[2]}, Floor[c*Range[70]]] (* Harvey P. Dale, Aug 15 2013 *)
PROG
(PARI) for(n=1, 70, print1(3*n + floor(sqrt(2)*n), ", ")) \\ G. C. Greubel, Jan 29 2018
(Magma) [3*n + Floor(Sqrt(2)*n): n in [1..70]]; // G. C. Greubel, Jan 29 2018
(Python)
from sympy import integer_nthroot
def A187338(n): return 3*n+integer_nthroot(2*n**2, 2)[0] # Chai Wah Wu, Mar 17 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 08 2011
STATUS
approved