login
A017912
Powers of sqrt(2) rounded up.
7
1, 2, 2, 3, 4, 6, 8, 12, 16, 23, 32, 46, 64, 91, 128, 182, 256, 363, 512, 725, 1024, 1449, 2048, 2897, 4096, 5793, 8192, 11586, 16384, 23171, 32768, 46341, 65536, 92682, 131072, 185364, 262144, 370728, 524288, 741456, 1048576, 1482911, 2097152, 2965821, 4194304
OFFSET
0,2
LINKS
FORMULA
a(n) = A003059(A000079(n)). - Jason Kimberley, Oct 28 2016
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
Sequence in context: A334626 A339235 A332755 * A102543 A173383 A316076
KEYWORD
nonn,easy
STATUS
approved