Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Sep 08 2022 08:46:13
%S 1,1,1,6,6,6,6,10,8,8,10,6,6,10,12,8,8,10,6,8,10,10,14,12,6,6,6,6,18,
%T 18,10,8,12,12,8,12,10,10,12,8,12,12,6,6,14,24,16,6,6,10,8,12,16,12,
%U 12,8,8,10,6,12,24,18,6,6,18,20,16,12,6,10,14,14,12
%N a(n) = prime(n+2) mod prime(n).
%F a(n) = A031131(n) = A075527(n) for n>3. - _Alois P. Heinz_, Aug 20 2015
%e a(3) = 11 mod 5 = 1.
%t a[n_]:=PowerMod[Prime[n + 2], 1, Prime[n]]; Table[a[n], {n, 80}] (* _Vincenzo Librandi_, Aug 20 2015 *)
%t Mod[#[[3]],#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* _Harvey P. Dale_, Mar 14 2020 *)
%o (PARI) first(m)=vector(m,i,prime(i+2)% prime(i)); \\ _Anders Hellström_, Aug 20 2015
%o (Magma) [NthPrime(n+2) mod NthPrime(n): n in [1..80]]; // _Vincenzo Librandi_, Aug 20 2015
%Y Cf. A031131.
%K nonn,easy
%O 1,4
%A _Altug Alkan_, Aug 20 2015