login
Numbers k such that every digit that appears in k also appears at least once in both k^2 and k^3.
3

%I #14 Apr 03 2023 18:23:56

%S 0,1,5,6,10,11,25,50,55,60,64,66,76,99,100,101,110,111,112,115,116,

%T 125,225,250,275,288,323,376,405,499,500,501,502,525,550,555,600,602,

%U 625,640,642,644,660,666,676,724,726,733,755,760,776,777,833

%N Numbers k such that every digit that appears in k also appears at least once in both k^2 and k^3.

%H Harvey P. Dale, <a href="/A029780/b029780.txt">Table of n, a(n) for n = 1..1000</a>

%F A029772 intersect A029776. - _Sean A. Irvine_, Mar 04 2020

%t Select[Range[0,1000],Min[DigitCount[#^2,10,IntegerDigits[#]]]>0 && Min[ DigitCount[ #^3,10, IntegerDigits[#]]]>0&] (* _Harvey P. Dale_, Aug 12 2016 *)

%o (Python)

%o from itertools import count, islice

%o def A029780_gen(startvalue=0): # generator of terms >= startvalue

%o return filter(lambda n:set(str(n)) <= set(str(m:=n**2)) & set(str(n*m)), count(max(startvalue,0)))

%o A029780_list = list(islice(A029780_gen(),20)) # _Chai Wah Wu_, Apr 03 2023

%Y Cf. A029772, A046827.

%K nonn,base

%O 1,3

%A _Patrick De Geest_