This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A059402 #27 Aug 14 2021 07:12:18 %S A059402 1197,14673,83731,129717,167835,322794,429635,831328,1127125,1183497, %T A059402 1184128,1319825,1344837,1371294,1724786,1731195,1943795,2597175, %U A059402 2971137,2993715,3161907,3181437,3719193,4609731,4913928,5037365,5912739,5981125,6193563 %N A059402 Numbers with more than one prime factor that do not end in 0 and contain as substrings every maximal prime power dividing them. %H A059402 Reinhard Zumkeller and Donovan Johnson, <a href="/A059402/b059402.txt">Table of n, a(n) for n = 1..500</a> (first 100 terms from Reinhard Zumkeller) %H A059402 Reinhard Zumkeller, <a href="/A059402/a059402.txt">Demonstration of first 100 terms</a> %e A059402 1197 = 9 * 7 * 19 and all of these are substrings. %t A059402 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 *) %o A059402 (Haskell) %o A059402 import Data.List (isInfixOf) %o A059402 a059402 n = a059402_list !! (n-1) %o A059402 a059402_list = filter chi [1..] where %o A059402 chi n = n `mod` 10 > 0 && f n 1 0 a000040_list where %o A059402 f :: Integer -> Integer -> Int -> [Integer] -> Bool %o A059402 f 1 1 o _ = o > 1 %o A059402 f m x o ps'@(p:ps) %o A059402 | r == 0 = f m' (p*x) o ps' %o A059402 | x > 1 = show x `isInfixOf` show n && f m 1 (o+1) ps %o A059402 | m < p * p = f 1 m o ps %o A059402 | otherwise = f m 1 o ps %o A059402 where (m',r) = divMod m p %o A059402 -- _Reinhard Zumkeller_, Jul 21 2011 %o A059402 (Python) %o A059402 from sympy import factorint %o A059402 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 %K A059402 base,nice,nonn %O A059402 1,1 %A A059402 _Erich Friedman_, Jan 29 2001 %E A059402 Offset corrected and a(6)-a(26) from _Donovan Johnson_, Jul 09 2010 %E A059402 Definition stated more precisely by _Reinhard Zumkeller_, Jul 19 2011