login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272679 a(n)^2 is the smallest square whose binary expansion begins with the binary expansion of n. 5
0, 1, 2, 5, 2, 9, 5, 11, 4, 3, 9, 19, 5, 21, 15, 11, 4, 33, 6, 25, 9, 13, 19, 39, 7, 5, 29, 21, 15, 61, 11, 45, 8, 23, 33, 67, 6, 49, 35, 25, 9, 73, 13, 53, 107, 19, 77, 39, 79, 7, 10, 81, 29, 83, 59, 21, 15, 43, 61, 87, 11, 89, 63, 45, 8, 129, 23, 93, 33, 47 (list; graph; refs; listen; history; text; internal format)
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)=9, because 9^2 = 81 = 1010001_2 begins with 1010 = 10_2.

PROG

(Python)

from gmpy2 import isqrt

def A272679(n):

    if n == 0:

        return 0

    else:

        d, nd = 1, n

        while True:

            x = isqrt(nd-1)+1

            if x**2 < nd+d:

                return int(x)

            d *= 2

            nd *= 2 # Chai Wah Wu, May 22 2016

CROSSREFS

Cf. A007088, A018851, A018796, A272680, A272681.

Sequence in context: A266256 A247551 A273580 * A119764 A178310 A210697

Adjacent sequences:  A272676 A272677 A272678 * A272680 A272681 A272682

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane, May 22 2016

EXTENSIONS

More terms from Chai Wah Wu, May 22 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 03:06 EDT 2020. Contains 334696 sequences. (Running on oeis4.)