login
A242349
Largest power of 2 <= n^2.
0
1, 4, 8, 16, 16, 32, 32, 64, 64, 64, 64, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 2048, 2048, 2048, 2048, 2048, 2048
OFFSET
1,2
COMMENTS
The first values of n that produce powers of 4 are precisely the powers of 2.
EXAMPLE
a(3) = 8 because 3^2 = 9 and the largest power of 2 <= 9 is 8.
PROG
(PARI) a(n)=2^(#binary(n^2)-1) \\ Charles R Greathouse IV, May 11 2014
CROSSREFS
Sequence in context: A312764 A166634 A189007 * A309521 A072603 A123535
KEYWORD
nonn,easy
AUTHOR
J. Lowell, May 11 2014
STATUS
approved