|
|
A059402
|
|
Numbers with more than one prime factor that do not end in 0 and contain as substrings every maximal prime power dividing them.
|
|
2
|
|
|
1197, 14673, 83731, 129717, 167835, 322794, 429635, 831328, 1127125, 1183497, 1184128, 1319825, 1344837, 1371294, 1724786, 1731195, 1943795, 2597175, 2971137, 2993715, 3161907, 3181437, 3719193, 4609731, 4913928, 5037365, 5912739, 5981125, 6193563
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
1197 = 9 * 7 * 19 and all of these are substrings.
|
|
MATHEMATICA
|
ok[n_] := If[id = IntegerDigits[n]; Last[id] == 0, False, If[ff = IntegerDigits /@ Apply[ Power, FactorInteger[n], {1}]; Length[ff] == 1, False, And @@ (MatchQ[id, {___, Sequence @@ #, ___}] & ) /@ ff]]; A059402 = {}; Do[ If[ok[n], Print[n]; AppendTo[A059402, n]], {n, 1, 6*10^6}] (* Jean-François Alcover, Nov 24 2011 *)
|
|
PROG
|
(Haskell)
import Data.List (isInfixOf)
a059402 n = a059402_list !! (n-1)
a059402_list = filter chi [1..] where
chi n = n `mod` 10 > 0 && f n 1 0 a000040_list where
f :: Integer -> Integer -> Int -> [Integer] -> Bool
f 1 1 o _ = o > 1
f m x o ps'@(p:ps)
| r == 0 = f m' (p*x) o ps'
| x > 1 = show x `isInfixOf` show n && f m 1 (o+1) ps
| m < p * p = f 1 m o ps
| otherwise = f m 1 o ps
where (m', r) = divMod m p
(Python)
from sympy import factorint
A059402_list = [n for n in range(2, 10**6) if n % 10 and len(factorint(n)) > 1 and all(str(a**b) in str(n) for a, b in factorint(n).items())] # Chai Wah Wu, Aug 13 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nice,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|