OFFSET
3,1
FORMULA
a(n) = A017912(n-1)^2.
a(2n+1) = (2^n)^2 = 4^n, for n>=1; indeed: 4^n_{10} = 10^(2n)_{2} that is the least number with 2n+1 binary digits. - Bernard Schott, Oct 15 2022
MAPLE
a:= n-> ceil(sqrt(2)^(n-1))^2:
seq(a(n), n=3..35); # Alois P. Heinz, Oct 13 2022
MATHEMATICA
Array[Ceiling[Sqrt[2^(# - 1)]]^2 &, 33, 3]
PROG
(PARI) for (n=3, 35, for(k=0, oo, if(#digits(k^2, 2)==n, print1(k^2, ", "); break)))
(PARI) a(n) = if(n%2 == 1, 1 << (n-1), ceil(sqrt(1<<(n-1)))^2) \\ David A. Corneth, Oct 11 2022
(Python)
from math import isqrt
def A357753(n): return 1<<n-1 if n&1 else (isqrt(1<<n-1)+1)**2 # Chai Wah Wu, Oct 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hugo Pfoertner, Oct 11 2022
STATUS
approved