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!)
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

%I #21 Sep 08 2021 21:18:10

%S 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,

%T 11,12,12,12,13,13,13,13,14,15,15,15,15,15,15,15,15,15,15,16,16,16,17,

%U 18,18,18,18,18,18,18,18,19,19,19,19,19,20,20,20,21,21

%N 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.

%C 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

%H Michael De Vlieger, <a href="/A089576/b089576.txt">Table of n, a(n) for n = 0..10000</a>

%e 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.

%p # largest exponent m of prime(k+1)^m< prime(k)^n.

%p A089576f := proc(k,n)

%p local pkn,pplus,m ;

%p pkn := ithprime(k)^n ;

%p pplus := ithprime(k+1) ;

%p for m from 1 do

%p if pplus^m >= pkn then

%p return m-1 ;

%p end if;

%p end do:

%p end proc:

%p A089576 := proc(n)

%p local itr,m;

%p if n = 0 then

%p return 0 ;

%p end if;

%p m := n ;

%p for itr from 1 do

%p m := A089576f(itr,m) ;

%p if m = 0 then

%p return itr ;

%p end if;

%p end do:

%p end proc:

%p seq(A089576(n),n=0..80) ; # _R. J. Mathar_, Sep 07 2021

%t 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 *)

%Y Row lengths of A347285.

%K easy,nonn

%O 0,3

%A _Naohiro Nomoto_, Dec 29 2003

%E More terms from _Michael De Vlieger_, Sep 08 2021

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 July 15 19:27 EDT 2024. Contains 374334 sequences. (Running on oeis4.)