login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077005 Smallest k such that prime(n) divides k*prime(n-1) + 1, n > 1. 3
1, 3, 4, 3, 7, 13, 10, 6, 5, 16, 31, 31, 22, 12, 9, 10, 31, 56, 18, 37, 66, 21, 15, 85, 76, 52, 27, 55, 85, 118, 33, 23, 70, 15, 76, 131, 136, 42, 29, 30, 91, 172, 97, 148, 100, 88, 93, 57, 115, 175, 40, 121, 226, 43, 44, 45, 136, 231, 211, 142, 88, 22, 78, 157, 238, 71, 281 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

COMMENTS

a(n) = inverse of (prime(n)-prime(n-1)) mod prime(n). This is the least k such that prime(n)|k*((prime(n)-prime(n-1))-1). Since prime(n)|k*prime(n), it must divide (k*prime(n-1)+1), so k = a(n). Also, a(n) = prime(n) - (x*prime(n)+1)/prime(n-1) for the least such x. - David James Sycamore, Oct 05 2018

LINKS

Table of n, a(n) for n=2..68.

FORMULA

a(n) = prime(n+1) - A069830(n). - Emmanuel Vantieghem, Aug 12 2018

EXAMPLE

a(4) = 3 as prime(5) = 11 divides 3*7 + 1, where 7 = prime(4).

MATHEMATICA

sk[a_, b_]:=Module[{k=1}, While[!Divisible[k*a+1, b], k++]; k]; sk@@@ Partition[ Prime[Range[70]], 2, 1] (* Harvey P. Dale, Jun 23 2013 *)

PROG

(PARI) a(n) = {my(k = 1, p = prime(n-1), q = prime(n)); while ((k*p+1) % q, k++); k; } \\ Michel Marcus, Aug 14 2018

CROSSREFS

Cf. A069830.

Sequence in context: A127737 A299416 A163108 * A328347 A265723 A134065

Adjacent sequences:  A077002 A077003 A077004 * A077006 A077007 A077008

KEYWORD

nonn,easy

AUTHOR

Amarnath Murthy, Oct 26 2002

EXTENSIONS

More terms from Ralf Stephan, Oct 31 2002

More terms from Ray Chandler, Oct 24 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 22:47 EDT 2019. Contains 328315 sequences. (Running on oeis4.)