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.

A332731 a(n) is the smallest positive k such that n!*prime(n) - k is a prime.

This page as a plain text file.
%I A332731 #24 Sep 01 2024 12:23:41
%S A332731 1,1,1,1,11,11,1,13,1,17,1,1,53,17,1,29,23,31,23,1,29,67,31,31,43,29,
%T A332731 181,1,83,41,101,79,179,79,43,83,47,83,163,79,53,73,59,67,347,223,67,
%U A332731 53,97,1,157,73,1,229,101,1,263,103,101,163,139,599,103,197,73,433,313,73
%N A332731 a(n) is the smallest positive k such that n!*prime(n) - k is a prime.
%C A332731 Equivalently, a(n) = n!*prime(n) minus the previous prime.
%F A332731 a(n) = n!*prime(n) - A007917(n!*prime(n)).
%e A332731 For n=3, n!*prime(n) = 3!*prime(3) = 6*5 = 30, and the largest prime < 30 is 29, so a(3) = 30 - 29 = 1.
%t A332731 Table[With[{c=n!Prime[n]},c-NextPrime[c,-1]],{n,2,70}] (* _Harvey P. Dale_, Sep 01 2024 *)
%o A332731 (PARI) a(n) = my(x=n!*prime(n)); x - precprime(x); \\ _Michel Marcus_, Feb 22 2020
%Y A332731 Cf. A000040, A000142, A007917, A332733.
%K A332731 nonn
%O A332731 2,5
%A A332731 _Mohamed Sami Gattoufi_, Feb 21 2020