login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030292 Numbers k such that k^3 has at most two different digits. 7

%I #37 Mar 18 2022 23:06:09

%S 0,1,2,3,4,7,10,11,20,100,200,1000,2000,10000,20000,100000,200000,

%T 1000000,2000000,10000000,20000000,100000000,200000000,1000000000,

%U 2000000000,10000000000,20000000000

%N Numbers k such that k^3 has at most two different digits.

%C Except for 0, 3, 4, 7, and 11, each term is of the form 10^x or 2*10^x. - _Harvey P. Dale_, Feb 05 2013

%p filter:= n -> nops(convert(convert(n^3,base,10),set)) <= 2:

%p select(filter, [$1..10^5]); # _Robert Israel_, Nov 10 2014

%t Join[Select[Range[0,20],Count[DigitCount[#^3],0]>7&],Flatten[Table[{10^n,2*10^n},{n,2,10}]]] (* _Harvey P. Dale_, Nov 23 2019 *)

%o (Python)

%o A030292_list, m = [0], [6, -6, 1, 0]

%o for n in range(1,10**6+1):

%o for i in range(3):

%o m[i+1] += m[i]

%o if len(set(str(m[-1]))) <= 2:

%o A030292_list.append(n) # _Chai Wah Wu_, Nov 05 2014

%o (PARI) isok(n) = #Set(digits(n^3)) <= 2; \\ _Michel Marcus_, Nov 10 2014

%o (Magma) [n: n in [0..4000000] | #Set(Intseq(n^3)) le 2]; // _Vincenzo Librandi_, Nov 10 2014

%K nonn,base,nice

%O 1,3

%A _Patrick De Geest_

%E More terms from _Lior Manor_, Jul 24 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)