OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
FORMULA
MATHEMATICA
With[{c = GoldenRatio}, Table[4*n - Floor[c*n], {n, 0, 50}]] (* G. C. Greubel, Oct 31 2017 *)
PROG
(Magma) [4*n-Floor(n*(1+Sqrt(5))/2): n in [0..70]]; // Vincenzo Librandi, Sep 11 2011
(PARI) for(n=0, 50, print1(4*n - floor(n*(1+sqrt(5))/2), ", ")) \\ G. C. Greubel, Oct 31 2017
(Python)
from math import isqrt
def A195170(n): return (n<<2)-(n+isqrt(5*n**2)>>1) # Chai Wah Wu, Aug 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 10 2011
STATUS
approved