login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A061797
Smallest k such that k*n has even digits and is a palindrome or becomes a palindrome when 0's are added on the left.
2
1, 2, 1, 2, 1, 4, 1, 98, 1, 74, 2, 2, 5, 154, 49, 4, 5, 38, 37, 34, 1, 286, 1, 36, 25, 8, 77, 329144, 31, 16, 2, 28, 25, 2, 19, 196, 23, 6, 17, 154, 1, 542, 143, 1602, 1, 148, 18, 6, 88, 14, 4, 824, 77, 8, 164572, 4, 143, 1198, 8, 1154, 1, 1126, 14, 962, 66, 308, 1, 998
OFFSET
0,2
COMMENTS
Every integer n has a multiple of the form 99...9900...00. To see that n has a multiple that's a palindrome (allowing 0's on the left) with even digits, let 9n divide 99...9900...00; then n divides 22...2200...00. - Dean Hickerson, Jun 29 2001
a(81), if it exists, is greater than 5 million. - Harvey P. Dale, Dec 19 2021
EXAMPLE
a(12) = 5 since 5*12 = 60 (i.e., "060") is a palindrome.
MATHEMATICA
a[n_] := For[k = 1, True, k++, id = IntegerDigits[k*n]; If[AllTrue[id, EvenQ], rid = Reverse[id]; If[id == rid || (id //. {d__, 0} :> {d}) == (rid //. {0, d__} :> {d}), Return[k]]]]; a[0] = 1; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Apr 01 2016 *)
skpal[n_]:=Module[{k=1}, While[Count[IntegerDigits[k n], _?OddQ]>0 || (!PalindromeQ[(k n)/10^IntegerExponent[n k]]), k++]; k]; Array[skpal, 70, 0] (* Harvey P. Dale, Dec 19 2021 *)
PROG
(ARIBAS): stop := 500000; for n := 0 to 75 do k := 1; test := true; while test and k < stop do m := omit_trailzeros(n*k); if test := not all_even(m) or m <> int_reverse(m) then inc(k); end; end; if k < stop then write(k, " "); else write(-1, " "); end; end;
(Haskell)
a061797 0 = 1
a061797 n = head [k | k <- [1..], let x = k * n,
all (`elem` "02468") $ show x, a136522 (a004151 x) == 1]
-- Reinhard Zumkeller, Feb 01 2012
CROSSREFS
Cf. A050782, A062293 A061674. Values of k*n are given in A062293.
Sequence in context: A300584 A024559 A334664 * A068341 A360738 A321368
KEYWORD
nonn,base,easy,nice
AUTHOR
Amarnath Murthy, Jun 17 2001
EXTENSIONS
More terms from Klaus Brockhaus, Jun 27 2001
STATUS
approved