%I #32 Sep 08 2022 08:45:06
%S 0,0,3,4,2,12,13,3,3,17,30,25,13,41,26,49,17,0,25,17,61,41,2,8,25,13,
%T 25,13,73,27,41,49,25,121,17,73,61,41,73,49,25,121,13,25,29,90,193,25,
%U 13,41,49,25,161,73,73,49,17,61,25,25,241,253,25,13,73,281,97,121,13
%N a(n) = prime(n+1)*prime(n+2)+1 mod prime(n), where prime(n) is the n-th prime.
%D R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, NY, (2002 printing), Research problem 1.85, p. 73.
%H Vincenzo Librandi, <a href="/A072565/b072565.txt">Table of n, a(n) for n = 1..5000</a>
%F a(n) = A023523(n+1) mod A000040(n). - _Michel Marcus_, Feb 28 2018
%e a(18) = prime(19)*prime(20)+1 mod prime(18) = 67*71+1 mod 61 = 0.
%p p:=ithprime; seq((p(n+1)*p(n+2)+1) mod p(n),n=1..70); # _Muniru A Asiru_, Mar 09 2018
%t a[n_] := Mod[Prime[n+1] Prime[n+2] + 1, Prime[n]]
%t Mod[#[[2]]#[[3]]+1,#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* _Harvey P. Dale_, Dec 19 2018 *)
%o (PARI) a(n) = (prime(n+1)*prime(n+2) + 1) % prime(n); \\ _Michel Marcus_, Feb 28 2018
%o (Magma) [(NthPrime(n+1)*NthPrime(n+2)+1) mod NthPrime(n): n in [1..100]]; // _Vincenzo Librandi_, Feb 28 2018
%o (GAP) P:=Filtered([1..1000],IsPrime);;
%o List([1..70],n->(P[n+1]*P[n+2]+1) mod P[n]); # _Muniru A Asiru_, Mar 09 2018
%Y Cf. A000040, A023523, A022461.
%K nonn
%O 1,3
%A _G. L. Honaker, Jr._, Aug 06 2002
%E Edited by _Dean Hickerson_ and _Robert G. Wilson v_, Aug 10 2002