%I #5 Apr 28 2015 16:53:20
%S 1387,1849,2117,4307,8299,34547,35947,38491,68753,69679,84281,90637,
%T 128729,183097,185047,230689,281443,407837,423979,483029,664457,
%U 719399,904537,1056403,1121213,1236511,1247707,1303391,1308947,1369751
%N Composite numbers which in base 9 contain their largest proper factor as a substring.
%t Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 9 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 9 ] ] ] ] != {}, Print[ n ] ], {n, 2, 2*10^6} ]
%t lpf9Q[n_]:=Module[{idn9=IntegerDigits[n,9],d9=IntegerDigits[ Divisors[ n][[-2]],9]},d9!={1}&&SequenceCount[idn9,d9]>0]; Select[Range[ 2, 1500000], lpf9Q] (* The program uses the SequenceCount function from Mathematica version 10 *) (* _Harvey P. Dale_, Apr 28 2015 *)
%Y Cf. A062238.
%K base,nonn
%O 1,1
%A _Robert G. Wilson v_, Aug 08 2001
|