A089361 Numbers of pairs (i, j), i, j > 1, such that i^j <= n.
0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15
Offset: 1
Examples
There are 5 perfect powers greater than 1 that are less than or equal to 16: 2^2, 2^3, 2^4, 3^2, 4^2, ergo the first 5 in the table.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 1000; # to get a(1) to a(N) B:= Vector(N); for i from 2 to floor(sqrt(N)) do for j from 2 while i^j <= N do B[i^j]:= B[i^j]+1 od od: convert(map(round,Statistics:-CumulativeSum(B)),list); # Robert Israel, Jun 24 2015
-
Mathematica
A089361[n_] := Sum[Floor[n^(1/j)] - 1, {j, 2, BitLength[n] - 1}]; Array[A089361, 100] (* Paolo Xausa, Jan 14 2025 *)
-
PARI
plessn(n,m=2) = { for(k=1,n, s=0; rx = sqrtint(k); ry = logint(k,2); for(x=m,rx, for(y=2,ry, p = floor(x^y); if(p<=k,s++) ) ); print1(s", ") ) } \\ [corrected by Jason Yuen, Jan 12 2025]
-
PARI
A = vector(100); for (p = 2, 6, i = 2; while (i^p <= 100, A[i^p]++; i++)); for (n = 2, 100, A[n] += A[n - 1]); \\ David Wasserman
-
PARI
a(n) = sum(j=2, logint(n,2), sqrtnint(n,j)-1) \\ Jason Yuen, Jan 12 2025
-
Python
from sympy import integer_nthroot def A089361(n): return sum(integer_nthroot(n,k)[0]-1 for k in range(2,n.bit_length())) # Chai Wah Wu, Nov 25 2024
Formula
a(1) = 0; for n > 1, if n not in A001597, a(n) = a(n-1), otherwise a(n) = a(n-1) + number of factors of j > 1 (A000005(j) - 1), for the j in the positive integer pair (i,j) where i^j = n with the smallest value of i. - Doug Bell, Jun 23 2015
a(n) = Sum_{j=2..floor(log_2(n))} floor(n^(1/j) - 1). - Robert Israel, Jun 24 2015
From Friedjof Tellkamp, Jun 14 2025: (Start)
a(n) = Sum_{k>=2..n} A259362(k), for n > 1.
G.f.: Sum_{j>=2, k>=2} x^(j^k)/(1-x). (End)
Comments