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!)
A141709 Least positive multiple of n which is palindromic in base 2, allowing for leading zeros (or: ignoring trailing zeros). 4

%I #17 Jun 14 2017 01:08:12

%S 1,2,3,4,5,6,7,8,9,10,33,12,65,14,15,16,17,18,513,20,21,66,2047,24,

%T 325,130,27,28,1421,30,31,32,33,34,455,36,2553,1026,195,40,1025,42,

%U 129,132,45,4094,4841,48,1421,650,51,260,3339,54,165,56,513,2842,6077,60,427,62

%N Least positive multiple of n which is palindromic in base 2, allowing for leading zeros (or: ignoring trailing zeros).

%C Even numbers cannot be palindromic in base 2, unless leading zeros are considered (or, equivalently, resp. more precisely, trailing zeros are discarded). This is done in this version of A141708, which therefore does not need to be restricted to odd n as it has been done for A141707 and A141708.

%H Harvey P. Dale, <a href="/A141709/b141709.txt">Table of n, a(n) for n = 1..1000</a>

%F A178225(A000265(a(n))) = 1. - _Reinhard Zumkeller_, Nov 06 2012

%t notpalbinQ[i_]:=Module[{id=IntegerDigits[i,2]},While[Last[id]==0,id=Most[id]];id!= Reverse[id]]; lm[n_]:=Module[{k=1},While[notpalbinQ[k n],k++];k n]; Array[lm,70] (* _Harvey P. Dale_, Dec 28 2011 *)

%o (PARI) A141709(n)=forstep(k=n,10^9,n,vecextract(t=binary(k>>valuation(k,2)),"-1..1")-t || return(k))

%o (Haskell)

%o a141709 n = until ((== 1) . a178225 . a000265) (+ n) n

%o -- _Reinhard Zumkeller_, Nov 06 2012

%Y Cf. A050782, A141707-A141708, A062279, A203070, A000265, A178225.

%K base,easy,nice,nonn

%O 1,2

%A _M. F. Hasler_, Jul 17 2008

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 April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)