A029780 Numbers k such that every digit that appears in k also appears at least once in both k^2 and k^3.
0, 1, 5, 6, 10, 11, 25, 50, 55, 60, 64, 66, 76, 99, 100, 101, 110, 111, 112, 115, 116, 125, 225, 250, 275, 288, 323, 376, 405, 499, 500, 501, 502, 525, 550, 555, 600, 602, 625, 640, 642, 644, 660, 666, 676, 724, 726, 733, 755, 760, 776, 777, 833
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Select[Range[0,1000],Min[DigitCount[#^2,10,IntegerDigits[#]]]>0 && Min[ DigitCount[ #^3,10, IntegerDigits[#]]]>0&] (* Harvey P. Dale, Aug 12 2016 *)
-
Python
from itertools import count, islice def A029780_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:set(str(n)) <= set(str(m:=n**2)) & set(str(n*m)), count(max(startvalue,0))) A029780_list = list(islice(A029780_gen(),20)) # Chai Wah Wu, Apr 03 2023