OFFSET
1,2
MATHEMATICA
Table[2*Ceiling[n*GoldenRatio]-Ceiling[n*Sqrt[5]], {n, 80}] (* Harvey P. Dale, Dec 20 2015 *)
PROG
(PARI) a(n)=2*ceil(n*(1+sqrt(5))/2)-ceil(n*sqrt(5))
(Python)
from math import isqrt
def A078796(n): return (n+(m:=isqrt(5*n**2))&-2)-m+1 # Chai Wah Wu, Aug 17 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 05 2002
STATUS
approved