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.

A092789 a(n) = smallest prime of the form prime(n)+m! for some m >= 0.

This page as a plain text file.
%I A092789 #16 Sep 08 2022 08:45:13
%S A092789 3,5,7,13,13,19,19,43,29,31,37,43,43,67,53,59,61,67,73,73,79,103,89,
%T A092789 113,103,103,109,109,229,137,151,137,139,163,151,157,163,283,173,179,
%U A092789 181,363061,193,199,199,223,331,229,229,349,239,241,5281,257,263,269,271
%N A092789 a(n) = smallest prime of the form prime(n)+m! for some m >= 0.
%C A092789 n! + p is composite for n >= p since p divides n! for n >= p.
%C A092789 Is it known that such a prime always exists? If not the definition should say "or -1 if no such prime exists". - _N. J. A. Sloane_, Aug 11 2011
%p A092789 A092789 := proc(n) local q,m ; for m from 0 do q := ithprime(n)+m! ; if isprime(q) then return q; end if; end do ; end proc:
%p A092789 seq(A092789(n),n=1..80) ; # _R. J. Mathar_, Mar 02 2010
%o A092789 (PARI) nfactpm3(n) = { forprime(p=1,n, c=0; for(x=0,n,y=x!+p;if(isprime(y),c++;print1(y",");break)); ) }
%o A092789 (Magma) SmallestP:=function(p) for m in [0..p-1] do q:=p+Factorial(m); if IsPrime(q) then return q; end if; end for; return -1; end function; [ SmallestP(NthPrime(n)): n in [1..80] ]; // _Klaus Brockhaus_, Mar 02 2010
%Y A092789 Cf. A175193, A175194, A082470.
%K A092789 nonn
%O A092789 1,1
%A A092789 _Cino Hilliard_, Apr 14 2004
%E A092789 Definition and offset corrected following a suggestion from _Leroy Quet_. - _Klaus Brockhaus_, Mar 02 2010