login
A272681
Smallest binary square that begins with the binary expansion of n.
3
0, 1, 100, 11001, 100, 1010001, 11001, 1111001, 10000, 1001, 1010001, 101101001, 11001, 110111001, 11100001, 1111001, 10000, 10001000001, 100100, 1001110001, 1010001, 10101001, 101101001, 10111110001, 110001, 11001, 1101001001, 110111001, 11100001, 111010001001
OFFSET
0,3
REFERENCES
Allan C. Wechsler, posting to math-fun mailing list May 22 2016.
EXAMPLE
a(10)=1010001 = 81_10, because 1010001_2 begins with 1010 = 10_2.
PROG
(Python)
from gmpy2 import isqrt
def A272681(n):
if n == 0:
return 0
else:
d, nd = 1, n
while True:
x = (isqrt(nd-1)+1)**2
if x < nd+d:
return int(bin(x)[2:])
d *= 2
nd *= 2 # Chai Wah Wu, May 22 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, May 22 2016
EXTENSIONS
More terms from Chai Wah Wu, May 22 2016
STATUS
approved