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!)
A303748 a(n) is the number of distinct terms of the form i^j where 0 <= i,j <= n. 1

%I #27 May 10 2021 03:50:32

%S 1,2,4,8,12,20,29,41,51,61,77,97,116,140,164,190,208,240,271,307,341,

%T 379,418,462,504,540,586,622,671,727,780,840,882,942,1004,1068,1114,

%U 1186,1255,1327,1398,1478,1554,1638,1718,1800,1885,1977,2064,2136,2226,2322

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

%H Michael De Vlieger, <a href="/A303748/b303748.txt">Table of n, a(n) for n = 0..500</a>

%H 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 a(n) = A126254(n) + 1.

%e For n=3 the distinct terms are 0,1,2,3,4,8,9,27 so a(3) = 8.

%t {1}~Join~Array[Length@ Union@ Map[#1^#2 & @@ # &, Rest@ Tuples[Range[0, #], {2}]] &, 51] (* _Michael De Vlieger_, Jan 31 2019 *)

%o (Python)

%o def distinct(limit):

%o unique = set()

%o for i in range(limit+1):

%o for j in range(limit+1):

%o if i**j not in unique:

%o unique.add(i**j)

%o return len(unique)

%o print([distinct(i) for i in range(40)])

%Y Cf. A126254.

%K nonn

%O 0,2

%A _Ralph-Joseph Tatt_, Apr 30 2018

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 4 00:44 EDT 2024. Contains 372225 sequences. (Running on oeis4.)