A295900 Numbers n such that n^3 contains the consecutive substring 2,3,5,7.
1331, 3108, 3176, 4093, 4643, 5846, 6178, 6797, 9175, 10731, 13076, 13245, 13309, 13310, 14093, 14526, 16291, 17852, 20095, 20791, 21835, 23635, 23766, 24093, 28452, 28672, 28673, 28674, 28675, 29211, 31080, 31760, 33907, 34093, 34986, 36449, 38538, 38599, 39526
Offset: 1
Examples
1331 is in the sequence because 1331^3 = 2357947691 contains substring of prime digits "2357". 3108 is in the sequence because 3108^3 = 30022235712 contains substring of prime digits "2357".
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[100000], MemberQ[Partition[IntegerDigits[#^3], 4, 1], {2, 3, 5, 7}] &]
-
PARI
isok(n) = {c = n^3; ret = 0; while (c > 1, if ((c % 10000) == 2357, ret = 1; break); c = floor(c/10);); return (ret);} \\ Michel Marcus, Dec 15 2017
-
Python
A295900_list = [n for n in range(1,10**6) if '2357' in str(n**3)] # Chai Wah Wu, Feb 09 2018