cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A303748 a(n) is the number of distinct terms of the form i^j where 0 <= i,j <= n.

This page as a plain text file.
%I A303748 #27 May 10 2021 03:50:32
%S A303748 1,2,4,8,12,20,29,41,51,61,77,97,116,140,164,190,208,240,271,307,341,
%T A303748 379,418,462,504,540,586,622,671,727,780,840,882,942,1004,1068,1114,
%U A303748 1186,1255,1327,1398,1478,1554,1638,1718,1800,1885,1977,2064,2136,2226,2322
%N A303748 a(n) is the number of distinct terms of the form i^j where 0 <= i,j <= n.
%H A303748 Michael De Vlieger, <a href="/A303748/b303748.txt">Table of n, a(n) for n = 0..500</a>
%H A303748 Ovidiu Bagdasar and Ralph Tatt, <a href="https://doi.org/10.1016/j.endm.2018.11.002">On some new arithmetic functions involving prime divisors and perfect powers</a>, Electronic Notes in Discrete Mathematics (2018) Vol. 70, 9-15.
%F A303748 a(n) = A126254(n) + 1.
%e A303748 For n=3 the distinct terms are 0,1,2,3,4,8,9,27 so a(3) = 8.
%t A303748 {1}~Join~Array[Length@ Union@ Map[#1^#2 & @@ # &, Rest@ Tuples[Range[0, #], {2}]] &, 51] (* _Michael De Vlieger_, Jan 31 2019 *)
%o A303748 (Python)
%o A303748 def distinct(limit):
%o A303748     unique = set()
%o A303748     for i in range(limit+1):
%o A303748         for j in range(limit+1):
%o A303748             if i**j not in unique:
%o A303748                 unique.add(i**j)
%o A303748     return len(unique)
%o A303748 print([distinct(i) for i in range(40)])
%Y A303748 Cf. A126254.
%K A303748 nonn
%O A303748 0,2
%A A303748 _Ralph-Joseph Tatt_, Apr 30 2018