The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A137214 a(n) is the number of distinct decimal digits in 2^n. 6

%I #19 Jul 24 2021 03:12:53

%S 1,1,1,1,2,2,2,3,3,3,4,4,4,4,5,5,3,5,4,4,7,6,5,4,4,4,6,6,6,9,7,7,5,6,

%T 6,7,7,8,7,7,7,6,8,7,9,8,7,8,9,7,8,9,8,7,7,8,8,7,9,8,9,9,9,9,9,9,8,9,

%U 10,9,10,7,9,8,9,9,9,8,9,10,9,9,10,9,10,9,9,10,10,10,9,8,9,9,10,10,10,10,10

%N a(n) is the number of distinct decimal digits in 2^n.

%C Appears to be all 10's starting at a(169). - _T. D. Noe_, Apr 01 2014

%H T. D. Noe, <a href="/A137214/b137214.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A043537(2^n). - _R. J. Mathar_, Mar 16 2008

%e a(16) = 3 because 2^16 = 65536, which contains 3 distinct decimal digits [3,5,6].

%p A043537 := proc(n) nops(convert(convert(n,base,10),set)) ; end: A137214 := proc(n) A043537(2^n) ; end: seq(A137214(n),n=0..120) ; # _R. J. Mathar_, Mar 16 2008

%p a:=proc(n) options operator, arrow: nops(convert(convert(2^n,base,10),set)) end proc: seq(a(n),n=0..80); # _Emeric Deutsch_, Apr 02 2008

%t Table[Length[Union[IntegerDigits[2^n]]], {n, 0, 100}] (* _T. D. Noe_, Apr 01 2014 *)

%o (Python)

%o def a(n): return len(set(str(2**n)))

%o print([a(n) for n in range(99)]) # _Michael S. Branicky_, Jul 23 2021

%Y Cf. A043562, A043536.

%K easy,nonn,base

%O 0,5

%A _Ctibor O. Zizka_, Mar 06 2008

%E More terms from _R. J. Mathar_ and _Emeric Deutsch_, Mar 16 2008

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 May 15 02:58 EDT 2024. Contains 372536 sequences. (Running on oeis4.)