login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Reinhard Zumkeller and Donovan Johnson, Table of n, a(n) for n = 1..500 (first 100 terms from Reinhard Zumkeller)
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
-- Reinhard Zumkeller, Jul 21 2011
(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
Sequence in context: A096955 A113898 A059401 * A252000 A251993 A250379
KEYWORD
base,nice,nonn
AUTHOR
Erich Friedman, Jan 29 2001
EXTENSIONS
Offset corrected and a(6)-a(26) from Donovan Johnson, Jul 09 2010
Definition stated more precisely by Reinhard Zumkeller, Jul 19 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 05:30 EDT 2024. Contains 372300 sequences. (Running on oeis4.)