The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272680 Smallest square that begins with n (in binary). 3

%I #16 May 23 2016 08:06:11

%S 0,1,4,25,4,81,25,121,16,9,81,361,25,441,225,121,16,1089,36,625,81,

%T 169,361,1521,49,25,841,441,225,3721,121,2025,64,529,1089,4489,36,

%U 2401,1225,625,81,5329,169,2809,11449,361,5929,1521,6241,49,100,6561,841,6889

%N Smallest square that begins with n (in binary).

%D Allan C. Wechsler, posting to math-fun mailing list May 22 2016.

%H Chai Wah Wu, <a href="/A272680/b272680.txt">Table of n, a(n) for n = 0..10000</a>

%e a(10)=81, because 81 = 9^2 = 1010001_2 begins with 1010 = 10_2.

%o (Python)

%o from gmpy2 import isqrt

%o def A272680(n):

%o if n == 0:

%o return 0

%o else:

%o d, nd = 1, n

%o while True:

%o x = (isqrt(nd-1)+1)**2

%o if x < nd+d:

%o return int(x)

%o d *= 2

%o nd *= 2 # _Chai Wah Wu_, May 22 2016

%Y Cf. A007088, A018851, A018796, A272679, A272681.

%K nonn,base,easy

%O 0,3

%A _N. J. A. Sloane_, May 22 2016

%E More terms from _Chai Wah Wu_, May 22 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)