OFFSET
1,3
REFERENCES
R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, NY, (2002 printing), Research problem 1.85, p. 73.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
FORMULA
EXAMPLE
a(18) = prime(19)*prime(20)+1 mod prime(18) = 67*71+1 mod 61 = 0.
MAPLE
p:=ithprime; seq((p(n+1)*p(n+2)+1) mod p(n), n=1..70); # Muniru A Asiru, Mar 09 2018
MATHEMATICA
a[n_] := Mod[Prime[n+1] Prime[n+2] + 1, Prime[n]]
Mod[#[[2]]#[[3]]+1, #[[1]]]&/@Partition[Prime[Range[80]], 3, 1] (* Harvey P. Dale, Dec 19 2018 *)
PROG
(PARI) a(n) = (prime(n+1)*prime(n+2) + 1) % prime(n); \\ Michel Marcus, Feb 28 2018
(Magma) [(NthPrime(n+1)*NthPrime(n+2)+1) mod NthPrime(n): n in [1..100]]; // Vincenzo Librandi, Feb 28 2018
(GAP) P:=Filtered([1..1000], IsPrime);;
List([1..70], n->(P[n+1]*P[n+2]+1) mod P[n]); # Muniru A Asiru, Mar 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
G. L. Honaker, Jr., Aug 06 2002
EXTENSIONS
Edited by Dean Hickerson and Robert G. Wilson v, Aug 10 2002
STATUS
approved