OFFSET
0,3
COMMENTS
The steps are a downward recursion in the prime powers: start at 2^n in A000961, i.e., at A000961(A024622(n)); skip to the left to the next smaller power 3^e_3 (see A024623), then to the left to the next smaller power 5^e_5, to the left to the next smaller power 7^e_7 etc., and count the steps to reach 1. - R. J. Mathar, Sep 08 2021
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
EXAMPLE
a(5)=4 as f(2^5)=3^3 < 2^5, f(3^3)=5^2 < 3^3, f(5^2)=7 < 5^2 and f(7)=11^0 < 7.
MAPLE
# largest exponent m of prime(k+1)^m< prime(k)^n.
A089576f := proc(k, n)
local pkn, pplus, m ;
pkn := ithprime(k)^n ;
pplus := ithprime(k+1) ;
for m from 1 do
if pplus^m >= pkn then
return m-1 ;
end if;
end do:
end proc:
A089576 := proc(n)
local itr, m;
if n = 0 then
return 0 ;
end if;
m := n ;
for itr from 1 do
m := A089576f(itr, m) ;
if m = 0 then
return itr ;
end if;
end do:
end proc:
seq(A089576(n), n=0..80) ; # R. J. Mathar, Sep 07 2021
MATHEMATICA
Array[-1 + Length@ NestWhile[Append[#1, #2^Floor@ Log[#2, #1[[-1]]]] & @@ {#, Prime[Length@ # + 1]} &, {2^#}, #[[-1]] > 1 &] &, 71, 0] (* Michael De Vlieger, Sep 08 2021 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Dec 29 2003
EXTENSIONS
More terms from Michael De Vlieger, Sep 08 2021
STATUS
approved