[go: up one dir, main page]

login
A303748
a(n) is the number of distinct terms of the form i^j where 0 <= i,j <= n.
1
1, 2, 4, 8, 12, 20, 29, 41, 51, 61, 77, 97, 116, 140, 164, 190, 208, 240, 271, 307, 341, 379, 418, 462, 504, 540, 586, 622, 671, 727, 780, 840, 882, 942, 1004, 1068, 1114, 1186, 1255, 1327, 1398, 1478, 1554, 1638, 1718, 1800, 1885, 1977, 2064, 2136, 2226, 2322
OFFSET
0,2
LINKS
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
Cf. A126254.
Sequence in context: A023598 A263615 A347789 * A173725 A300414 A307732
KEYWORD
nonn
AUTHOR
Ralph-Joseph Tatt, Apr 30 2018
STATUS
approved