cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A141709 #17 Jun 14 2017 01:08:12
%S A141709 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 A141709 325,130,27,28,1421,30,31,32,33,34,455,36,2553,1026,195,40,1025,42,
%U A141709 129,132,45,4094,4841,48,1421,650,51,260,3339,54,165,56,513,2842,6077,60,427,62
%N A141709 Least positive multiple of n which is palindromic in base 2, allowing for leading zeros (or: ignoring trailing zeros).
%C A141709 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 A141709 Harvey P. Dale, <a href="/A141709/b141709.txt">Table of n, a(n) for n = 1..1000</a>
%F A141709 A178225(A000265(a(n))) = 1. - _Reinhard Zumkeller_, Nov 06 2012
%t A141709 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 A141709 (PARI) A141709(n)=forstep(k=n,10^9,n,vecextract(t=binary(k>>valuation(k,2)),"-1..1")-t || return(k))
%o A141709 (Haskell)
%o A141709 a141709 n = until ((== 1) . a178225 . a000265) (+ n) n
%o A141709 -- _Reinhard Zumkeller_, Nov 06 2012
%Y A141709 Cf. A050782, A141707-A141708, A062279, A203070, A000265, A178225.
%K A141709 base,easy,nice,nonn
%O A141709 1,2
%A A141709 _M. F. Hasler_, Jul 17 2008