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!)
A279047 Number k of modular reductions at which the recurrence relation x(i+1) = x(0) mod x(i) terminates with x(k) = 1, where x(0) = prime(n+1), x(1) = prime(n). 0

%I #17 Dec 07 2016 11:15:26

%S 1,2,2,4,2,2,2,4,4,2,2,2,2,4,5,6,2,2,4,2,2,4,4,2,2,2,4,2,2,2,4,4,2,5,

%T 2,2,2,4,5,6,2,2,2,2,2,3,4,4,2,2,6,2,2,4,5,4,2,2,2,2,4,5,4,2,2,5,2,6,

%U 2,2,6,4,2,2,4,4,4,2,2,7,2,2,2,2,4,4,2,2,2,4,8,5,4,3,4,4,3,2,2,2,4,5,4,2,2,6,5,6

%N Number k of modular reductions at which the recurrence relation x(i+1) = x(0) mod x(i) terminates with x(k) = 1, where x(0) = prime(n+1), x(1) = prime(n).

%C x(i) is a strictly decreasing sequence of nonnegative integers by definition of modular reduction. So at some point x(t) = 0. Let j be the previous positive value, i.e., x(t-1) = j. Then as x(0) mod j = prime(n+1) mod j = x(t) = 0, j|prime(n+1). Since j < prime(n+1), j = 1.

%e For n=4, x(0) = p(5) = 11, x(1) = p(4) = 7. 11 mod 7 = 4 ==> 11 mod 4 = 3 ==> 11 mod 3 = 2 ==> 11 mod 2 = 1. Since there are four modular reductions, a(4) = 4.

%o #(Sage)

%o A = []

%o q = 1

%o for i in range(100):

%o q = next_prime(q)

%o p = next_prime(q)

%o r = p%q

%o ctr = 1

%o while r!=1:

%o r = p%r

%o ctr += 1

%o A.append(ctr)

%o print A

%Y Cf. A051010, A072030, A278744.

%K nonn

%O 1,2

%A _Adnan Baysal_, Dec 04 2016

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 April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)