OFFSET
1,3
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000 (first 500 terms from Reinhard Zumkeller)
EXAMPLE
24 is a term as 24^3 = 13824 contains 24 as a substring.
250 is a term as 250^3 = 1562500 contains 250 as a substring.
6^3 = 21_6, 782^3 = 4_782_11768.
MATHEMATICA
n3ssQ[n_]:=Module[{idn=IntegerDigits[n], idn3=Partition[ IntegerDigits[ n^3], IntegerLength[n], 1]}, MemberQ[idn3, idn]]; Join[{0}, Select[Range[ 2600], n3ssQ]] (* Harvey P. Dale, Jan 23 2012 *)
Select[Range[0, 2600], SequenceCount[IntegerDigits[#^3], IntegerDigits[ #]]> 0&] (* Harvey P. Dale, Aug 29 2021 *)
PROG
(Haskell)
import Data.List (isInfixOf)
a029942 n = a029942_list !! (n-1)
a029942_list = [x | x <- [0..], show x `isInfixOf` show (x^3)]
-- Reinhard Zumkeller, Feb 29 2012
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
STATUS
approved