login
A089576
Let p_k = k-th prime, let f((p_k)^n) = m where m is the largest power of p_(k+1) < (p_k)^n. a(n) = number of iterations of f to reach 1, starting from n and starting from k = 1.
7
0, 1, 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 21, 21
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
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
Row lengths of A347285.
Sequence in context: A189638 A097535 A060018 * A076642 A112325 A135304
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Dec 29 2003
EXTENSIONS
More terms from Michael De Vlieger, Sep 08 2021
STATUS
approved