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!)
A280651 Numbers k such that k^3 has an odd number of digits in base 2 and the middle digit is 1. 2
1, 5, 7, 11, 18, 19, 20, 26, 27, 28, 41, 42, 45, 47, 49, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 103, 106, 110, 111, 113, 115, 119, 120, 122, 123, 124, 125, 126, 162, 164, 165, 166, 168, 171, 177, 178, 180, 181, 182, 184, 185, 190, 194, 197, 199, 201, 259 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Lars Blomberg, Table of n, a(n) for n = 1..10000

Mail by Andrew Weimholt to the Seqfan Mailing list Dec 12 2016

EXAMPLE

5^3 = 111(1)101_2, 28^3 = 1010101(1)1000000_2, 111^3 = 1010011011(1)1001001111_2.

MATHEMATICA

a[n_]:=Part[IntegerDigits[n, 2], (Length[IntegerDigits[n, 2]]+1)/2];

Select[Range[0, 259], OddQ[Length[IntegerDigits[#^3, 2]]] && a[#^3]==1 &] (* Indranil Ghosh, Mar 06 2017 *)

PROG

(PARI)

isok(k) = my(d=digits(k^3, 2)); (#d%2 == 1) && (d[#d\2 +1] == 1);

for(k=0, 259, if(isok(k)==1, print1(k, ", "))); \\ Indranil Ghosh, Mar 06 2017

(Python)

i=0

j=1

while i<=259:

....n=str(bin(i**3)[2:])

....l=len(n)

....if l%2==1 and n[(l-1)/2]=="1":

........print (str(i))+", ",

........j+=1

....i+=1 # Indranil Ghosh, Mar 06 2017

CROSSREFS

Cf. A280650.

See A279430-A279431 for a k^2 version.

See A280640-A280649 for a base-10 version.

See A279420-A279429 for a k^2, base-10 version.

Sequence in context: A106954 A027755 A260828 * A089785 A226383 A118386

Adjacent sequences:  A280648 A280649 A280650 * A280652 A280653 A280654

KEYWORD

nonn,base,easy

AUTHOR

Lars Blomberg, Jan 12 2017

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 April 23 13:56 EDT 2021. Contains 343204 sequences. (Running on oeis4.)