OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
EXAMPLE
sqrt(5)^3 = 11.18033988749895... so a(3) = 12.
sqrt(5)^4 = 25, so a(4) = 25.
sqrt(5)^5 = 55.90169943749474241... so a(5) = 56.
MATHEMATICA
Ceiling[Sqrt[5]^Range[0, 40]] (* Vincenzo Librandi, Nov 20 2011 *)
PROG
(Magma) [Ceiling(Sqrt(5^n)): n in [0..40]]; // Vincenzo Librandi, Nov 20 2011
(PARI) a(n) = ceil(sqrt(5^n)); \\ Michel Marcus, Dec 14 2017
(Python)
from math import isqrt
def A017921(n): return isqrt(5**n)+(n&1) # Chai Wah Wu, Jun 19 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved