|
|
A357753
|
|
a(n) is the least square with n binary digits.
|
|
4
|
|
|
4, 9, 16, 36, 64, 144, 256, 529, 1024, 2116, 4096, 8281, 16384, 33124, 65536, 131769, 262144, 525625, 1048576, 2099601, 4194304, 8392609, 16777216, 33558849, 67108864, 134235396, 268435456, 536895241, 1073741824, 2147488281, 4294967296, 8589953124, 17179869184
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
LINKS
|
|
|
FORMULA
|
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:
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|