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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154661 Numbers n such that n! + 257 and abs(n! - 257) are both prime. 4
3, 4, 6, 7, 8, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sequence is the intersection of two sequences: n such that n! + 257 is prime (i.e., 3, 4, 6, 7, 8, 18, 22, 35, 93, 97, 125, 137, 153, ...) and n such that abs(n! - 257) is prime (i.e., 3, 4, 5, 6, 7, 8, 15, 18, 20, 25, 28, 51, 79, 80, ...). - Jon E. Schoenfield, Mar 12 2017
Sequence is complete since there no other terms up to 256 included, and then n! + 257 and abs(n! - 257) are both multiples of 257 for n>=257. - Michel Marcus, Mar 12 2017
LINKS
EXAMPLE
6! - 257 = 463 and 6! + 257 = 977, both prime, so 6 is a term.
MATHEMATICA
lst={}; a=257; Do[If[PrimeQ[n!-a]&&PrimeQ[n!+a], AppendTo[lst, n]], {n, 2*5!}]; lst
PROG
(PARI) isok(n) = isprime(abs(n!-257)) && isprime(n!+257); \\ Michel Marcus, Mar 12 2017
CROSSREFS
Sequence in context: A007370 A322376 A044813 * A275672 A087753 A233334
KEYWORD
nonn,fini,full
AUTHOR
EXTENSIONS
Name corrected and fini, full keywords by Michel Marcus, Mar 12 2017
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)