OFFSET
1,1
COMMENTS
The smallest term sharing more than one digit with its double is 102. - Alonso del Arte, Apr 16 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
10 is in the sequence because 2 * 10 = 20, which has a 0 in common with 10.
12 is in the sequence because 2 * 12 = 24, which has a 2 in common with 12.
14 is not in the sequence because 2 * 14 = 28, which has no digits in common with 14.
MAPLE
a:=proc(n) if nops(convert(convert(n, base, 10), set) intersect convert(convert(2*n, base, 10), set))>0 then n else fi end: seq(a(n), n=1..170); # Emeric Deutsch, May 27 2007
isA129845 := proc(n) local twon, digsn, digs2n, i ; twon := 2*n ; digsn := convert(n, base, 10) ; digs2n := convert(twon, base, 10) ; for i from 1 to nops(digsn) do if op(i, digsn) in digs2n then RETURN(true) ; fi ; od ; RETURN(false) ; end: for n from 1 to 200 do if isA129845(n) then printf("%d, ", n) ; fi ; od ; # R. J. Mathar, Jun 08 2007
MATHEMATICA
Select[Range[300], Length[Intersection[IntegerDigits[#], IntegerDigits[2#]]] > 0 &] (* Stefan Steinerberger, May 24 2007 *)
PROG
(Haskell)
a129845 n = a129845_list !! (n-1)
a129845_list =
filter (\x -> not $ null (show (2*x) `intersect` show x)) [1..]
-- Reinhard Zumkeller, Aug 16 2011
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, May 22 2007
EXTENSIONS
STATUS
approved