login
A137214
a(n) is the number of distinct decimal digits in 2^n.
6
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, 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, 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
OFFSET
0,5
COMMENTS
Appears to be all 10's starting at a(169). - T. D. Noe, Apr 01 2014
FORMULA
a(n) = A043537(2^n). - R. J. Mathar, Mar 16 2008
EXAMPLE
a(16) = 3 because 2^16 = 65536, which contains 3 distinct decimal digits [3,5,6].
MAPLE
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
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
MATHEMATICA
Table[Length[Union[IntegerDigits[2^n]]], {n, 0, 100}] (* T. D. Noe, Apr 01 2014 *)
PROG
(Python)
def a(n): return len(set(str(2**n)))
print([a(n) for n in range(99)]) # Michael S. Branicky, Jul 23 2021
CROSSREFS
Sequence in context: A046155 A026819 A302342 * A284726 A319951 A222642
KEYWORD
easy,nonn,base
AUTHOR
Ctibor O. Zizka, Mar 06 2008
EXTENSIONS
More terms from R. J. Mathar and Emeric Deutsch, Mar 16 2008
STATUS
approved