cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049563 a(n) = ((prime(n)-1)! + 1) mod (prime(n) + 2).

This page as a plain text file.
%I A049563 #23 Mar 13 2025 08:56:18
%S A049563 2,3,4,1,7,1,10,1,1,16,1,1,22,1,1,1,31,1,1,37,1,1,1,1,1,52,1,55,1,1,1,
%T A049563 1,70,1,76,1,1,1,1,1,91,1,97,1,100,1,1,1,115,1,1,121,1,1,1,1,136,1,1,
%U A049563 142,1,1,1,157,1,1,1,1,175,1,1,1,1,1,1,1,1,1,1,1,211,1,217,1,1,1,1,1
%N A049563 a(n) = ((prime(n)-1)! + 1) mod (prime(n) + 2).
%C A049563 Residue of (prime(n)-1)!+1 modulo prime(n)+2.
%H A049563 Amiram Eldar, <a href="/A049563/b049563.txt">Table of n, a(n) for n = 1..10000</a>
%F A049563 a(n) = A060371(n) mod A052147(n). - _Amiram Eldar_, Mar 13 2025
%e A049563 a(3) = 4 since prime(3) = 5, and 4! + 1 = 25 gives residue 4 when divided by prime(3) + 2 = 7.
%t A049563 Table[Mod[(Prime[k] - 1)! + 1, Prime[k] + 2], {k, 1, 200}]
%o A049563 (Sage) [Mod(factorial(p-1)+1,p+2) for p in primes(500)] # _Bruno Berselli_, Apr 10 2015
%o A049563 (Magma) [(Factorial(p-1)+1) mod (p+2): p in PrimesUpTo(500)]; // _Bruno Berselli_, Apr 10 2015
%o A049563 (PARI) a(n) = ((prime(n)-1)! + 1) % (prime(n) + 2); \\ _Michel Marcus_, May 28 2018
%Y A049563 Cf. A052147, A060371.
%K A049563 nonn
%O A049563 1,1
%A A049563 _Labos Elemer_