login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082470 a(n) is the number of k >= 0 such that k! + prime(n) is prime. 7
2, 1, 3, 4, 5, 3, 6, 7, 6, 6, 9, 11, 9, 5, 10, 9, 10, 9, 9, 8, 9, 9, 11, 8, 10, 10, 12, 16, 12, 10, 10, 13, 14, 14, 16, 11, 12, 9, 15, 10, 9, 8, 12, 9, 10, 6, 8, 7, 14, 13, 10, 21, 15, 9, 13, 11, 9, 19, 12, 13, 16, 11, 19, 17, 9, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

k! + p is composite for k >= p since p divides k! for k >= p.

The first 10^6 terms are nonzero. Remarkably, the number 7426189 + m! is composite for all m <= 1793. - T. D. Noe, Mar 02 2010

Apparently it is not known whether a(n) is ever zero. - N. J. A. Sloane, Aug 11 2011

LINKS

Robert Israel, Table of n, a(n) for n = 1..227

EXAMPLE

For n = 4, 3!+7 = 13, 4!+7=31, 5!+7=127 and 6!+7 = 727 are the 4 primes in n!+7.

MAPLE

A082470 := proc(n)

local ctr, j ;

ctr := 0:

for j from 0 to ithprime(n)-1 do

if isprime(j!+ithprime(n))=true then

ctr := ctr+1

end if ;

end do ;

ctr

end proc:

seq(A082470(n), n=1..50) ;

MATHEMATICA

Table[Count[Range[0, Prime[n]-1]!+Prime[n], _?PrimeQ], {n, 70}] (* Harvey P. Dale, Feb 06 2019 *)

PROG

(Python)

from sympy import isprime, prime

from itertools import count, islice

def agen(): # generator of terms

for n in count(1):

pn, fk, an = prime(n), 1, 0

for k in range(1, pn+1):

if isprime(pn + fk): an += 1

fk *= k

yield an

print(list(islice(agen(), 40))) # Michael S. Branicky, Apr 16 2022

(PARI) nfactppct(n) = { forprime(p=1, n, c=0; for(x=0, n, y=x!+p; if(isprime(y), c++) ); print1(c", ") ) } \\ Cino Hilliard, Apr 15 2004

CROSSREFS

Cf. A092789, A175193, A175194, row lengths of A352912.

Sequence in context: A117407 A232095 A279436 * A101204 A169808 A328395

Adjacent sequences: A082467 A082468 A082469 * A082471 A082472 A082473

KEYWORD

nonn

AUTHOR

Jeff Burch, Apr 27 2003

EXTENSIONS

Edited by Franklin T. Adams-Watters, Aug 01 2006

Offset corrected by Robert Israel, May 26 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 14:51 EST 2022. Contains 358588 sequences. (Running on oeis4.)