A235810 Numbers n such that n^3 has one or more occurrences of exactly eight different digits.
289, 297, 302, 319, 467, 494, 515, 557, 562, 595, 621, 623, 676, 682, 709, 712, 721, 862, 887, 909, 939, 945, 949, 963, 984, 987, 1012, 1015, 1016, 1025, 1029, 1043, 1049, 1065, 1075, 1087, 1104, 1106, 1107, 1114, 1118, 1132, 1137, 1154, 1161, 1167, 1178
Offset: 1
Examples
289 is in the sequence because 289^3 = 24137569, which contains exactly eight different digits.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[n: n in [0..1200] | #Set(Intseq(n^3)) eq 8]; // Vincenzo Librandi, Nov 07 2014
-
PARI
s=[]; for(n=1, 1500, if(#vecsort(eval(Vec(Str(n^3))),,8)==8, s=concat(s, n))); s
-
Python
A235810_list, m = [], [6, -6, 1, 0] for n in range(1,10**3+1): for i in range(3): m[i+1] += m[i] if len(set(str(m[-1]))) == 8: A235810_list.append(n) # Chai Wah Wu, Nov 05 2014