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!)
A155146 Numbers n such that n^3 has exactly 3 different digits. 9

%I #25 Sep 08 2022 08:45:40

%S 5,6,8,9,14,15,30,36,40,62,70,92,101,110,173,192,211,300,400,700,888,

%T 1001,1010,1100,1920,3000,3543,4000,7000,8880,10001,10010,10100,11000,

%U 19200,30000,35430,40000,70000,88800,100001,100010,100100,101000,110000,110011

%N Numbers n such that n^3 has exactly 3 different digits.

%H Chai Wah Wu, <a href="/A155146/b155146.txt">Table of n, a(n) for n = 1..103</a>

%e 14 is in the list because 14^3 = 2744. - _Jon Perry_, Nov 04 2014

%p a := proc (n) if nops(convert(convert(n^3, base, 10), set)) = 3 then n else end if end proc: seq(a(n), n = 1 .. 150000); # _Emeric Deutsch_, Jan 27 2009

%t Select[Range[120000], Length[Union[IntegerDigits[#^3]]]==3&] (* _Vincenzo Librandi_, Nov 04 2014 *)

%o (Python)

%o A155146_list, n3, m = [], 0, 0

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

%o ....m += 6*(n-1)

%o ....n3 += m + 1

%o ....if len(set(str(n3))) == 3:

%o ........A155146_list.append(n) # _Chai Wah Wu_, Nov 03 2014

%o (Magma) [n: n in [0..120000] | #Set(Intseq(n^3)) eq 3]; // _Vincenzo Librandi_, Nov 04 2014

%o (PARI) is(n)=#Set(digits(n^3))==3 \\ _Charles R Greathouse IV_, Feb 11 2017

%Y Cf. A030292.

%K nonn,base

%O 1,1

%A _Dmitry Kamenetsky_, Jan 21 2009

%E Extended by _Emeric Deutsch_, Jan 27 2009

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 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)