OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
MATHEMATICA
Table[Round[n*Sqrt[8]], {n, 0, 60}] (* G. C. Greubel, Sep 29 2018 *)
PROG
(Magma) [Round(n*Sqrt(8)): n in [0..60]]; // Vincenzo Librandi, Oct 24 2011
(PARI) vector(60, n, n--; round(n*sqrt(8))) \\ G. C. Greubel, Sep 29 2018
(Python)
from math import isqrt
def A022851(n): return (m:=isqrt(k:=n**2<<3))+int((k-m*(m+1)<<2)>=1) # Chai Wah Wu, Jul 29 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved