OFFSET
1,4
COMMENTS
a(n) = A162401(n)^2.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..4096
FORMULA
From David A. Corneth, Nov 04 2017: (Start)
a(n^2) = n^2
a(4*n) = 4*a(n)
a(4*n + 2) = a(2*n + 1). (End)
EXAMPLE
a(8) = 4 since 8 = binary "1000" and the largest square less than or equal to 8, that of 4 = binary "100" appears as the first three bits of "1000". - Michael De Vlieger, Nov 04 2017
MATHEMATICA
Table[Block[{k = n, s}, While[SequenceCount[#, IntegerDigits[Set[s, k^2], 2]] == 0, k--]; s] &@ IntegerDigits[n, 2], {n, 101}] (* Michael De Vlieger, Nov 04 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 02 2009
EXTENSIONS
Corrected and extended by Sean A. Irvine, Dec 05 2010
STATUS
approved