OFFSET
1,3
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (prime(n)*A069830(n) - 1)/prime(n+1). - Bob Selcoe, Aug 21 2016
EXAMPLE
a(4) = 5 as prime(4)=7 divides 5*11+1, where 11=prime(5).
a(7) = 8 = (17*9-1)/19. - Bob Selcoe, Aug 21 2016
MAPLE
seq(-ithprime(i+1)^(-1) mod ithprime(i), i=1..100); # Robert Israel, Aug 25 2016
MATHEMATICA
Table[k = 1; While[! Divisible[k Prime[n + 1] + 1, Prime@ n], k++]; k, {n, 50}] (* Michael De Vlieger, Aug 22 2016 *)
PROG
(PARI) a(n)=my(p=prime(n), q=nextprime(p+1)); lift(Mod(-1, p)/q) \\ Charles R Greathouse IV, Sep 03 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Aug 23 2011
STATUS
approved