login
A141709
Least positive multiple of n which is palindromic in base 2, allowing for leading zeros (or: ignoring trailing zeros).
4
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 33, 12, 65, 14, 15, 16, 17, 18, 513, 20, 21, 66, 2047, 24, 325, 130, 27, 28, 1421, 30, 31, 32, 33, 34, 455, 36, 2553, 1026, 195, 40, 1025, 42, 129, 132, 45, 4094, 4841, 48, 1421, 650, 51, 260, 3339, 54, 165, 56, 513, 2842, 6077, 60, 427, 62
OFFSET
1,2
COMMENTS
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.
LINKS
FORMULA
A178225(A000265(a(n))) = 1. - Reinhard Zumkeller, Nov 06 2012
MATHEMATICA
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 *)
PROG
(PARI) A141709(n)=forstep(k=n, 10^9, n, vecextract(t=binary(k>>valuation(k, 2)), "-1..1")-t || return(k))
(Haskell)
a141709 n = until ((== 1) . a178225 . a000265) (+ n) n
-- Reinhard Zumkeller, Nov 06 2012
KEYWORD
base,easy,nice,nonn
AUTHOR
M. F. Hasler, Jul 17 2008
STATUS
approved