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.

A242041 Number of k >= 1 that make n + k! and n - k! both prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 2, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Derek Orr, Aug 12 2014

Keywords

Comments

0 <= a(n) <= min{A125162(n), A175940(n)}.
a(n) < A020639(n). - Robert Israel, Aug 12 2014

Crossrefs

Programs

  • Maple
    a:= n ->  nops(select(k -> isprime(n+k!) and isprime(n-k!),
          [$1 ..min(numtheory:-factorset(n))-1])):
    0, seq(a(n),n=2..100); # Robert Israel, Aug 12 2014
  • PARI
    a(n)=c=0;for(k=1,n,if(ispseudoprime(n+k!)&&ispseudoprime(n-k!),c++));return(c)
    vector(100,n,a(n))