login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140807 a(n) is the largest integer such that n^k is palindromic in binary for all nonnegative integers k that are <= a(n). 1
0, 3, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

COMMENTS

a(2n) = 0 for all n.

LINKS

Antti Karttunen, Table of n, a(n) for n = 2..65537

FORMULA

For n > 3, a(n)=0 or 1; moreover, a(n)=1 iff n belongs to A006995 (in other words, this sequence is an indicator function of A006995). - Max Alekseyev, Jul 22 2008

EXAMPLE

The powers of 3 are, when written in binary: 1, 11, 1001, 11011, 1010001, ... Now, 3^k written in binary is palindromic for k = 0,1,2 and 3, but not for k=4. So a(3) = 3.

MATHEMATICA

Array[If[EvenQ@ #, 0, Block[{k = 0}, While[PalindromeQ@ IntegerDigits[#^k, 2], k++]; k - 1]] &, 105, 2] (* Michael De Vlieger, Nov 13 2018 *)

PROG

(PARI) A140807(n) = for(k=1, oo, my(bs=binary(n^k)); if(Vecrev(bs)!=bs, return(k-1))); \\ Antti Karttunen, Nov 11 2018

CROSSREFS

Cf. A006995.

Sequence in context: A292835 A318499 A317946 * A232629 A091959 A318659

Adjacent sequences:  A140804 A140805 A140806 * A140808 A140809 A140810

KEYWORD

nonn,base

AUTHOR

Leroy Quet, Jul 15 2008

EXTENSIONS

More terms from Max Alekseyev, Jul 22 2008

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 22 11:46 EDT 2019. Contains 322330 sequences. (Running on oeis4.)