OFFSET
0,3
REFERENCES
Allan C. Wechsler, posting to math-fun mailing list May 22 2016.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000
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