OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
FORMULA
a(n) = floor(2*n*sqrt(2)). - Michel Marcus, Oct 31 2017
MAPLE
a:=n->floor(2*n*sqrt(2)): seq(a(n), n=1..60); # Muniru A Asiru, Sep 28 2018
MATHEMATICA
Table[Floor[2*n*Sqrt[2]], {n, 1, 60}] (* G. C. Greubel, Sep 28 2018 *)
PROG
(Magma) [Floor(n*Sqrt(8)): n in [1..60]]; // Vincenzo Librandi, Oct 24 2011
(PARI) vector(80, n, floor(2*n*sqrt(2))) \\ G. C. Greubel, Sep 28 2018
(Python)
from sympy import integer_nthroot
def A022842(n): return integer_nthroot(8*n**2, 2)[0] # Chai Wah Wu, Mar 16 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Offset changed from 0 to 1 by Vincenzo Librandi, Oct 24 2011
STATUS
approved