OFFSET
0,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..500
Ovidiu Bagdasar and Ralph Tatt, On some new arithmetic functions involving prime divisors and perfect powers, Electronic Notes in Discrete Mathematics (2018) Vol. 70, 9-15.
FORMULA
a(n) = A126254(n) + 1.
EXAMPLE
For n=3 the distinct terms are 0,1,2,3,4,8,9,27 so a(3) = 8.
MATHEMATICA
{1}~Join~Array[Length@ Union@ Map[#1^#2 & @@ # &, Rest@ Tuples[Range[0, #], {2}]] &, 51] (* Michael De Vlieger, Jan 31 2019 *)
PROG
(Python)
def distinct(limit):
unique = set()
for i in range(limit+1):
for j in range(limit+1):
if i**j not in unique:
unique.add(i**j)
return len(unique)
print([distinct(i) for i in range(40)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralph-Joseph Tatt, Apr 30 2018
STATUS
approved