OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = A017910(n)+1 if n is odd. a(n) = A017910(n) = 2^(n/2) if n is even. - Chai Wah Wu, Jul 26 2022
MATHEMATICA
Ceiling[(Sqrt[2])^Range[0, 40]] (* Vincenzo Librandi, Nov 20 2011 *)
PROG
(Magma) [Ceiling(Sqrt(2^n)): n in [0..40]]; // Vincenzo Librandi, Nov 20 2011
(Python)
from math import isqrt
def A017912(n): return isqrt(1<<n)+1 if n&1 else 1<<(n>>1) # Chai Wah Wu, Jul 26 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved