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!)
A056752 Distance from n! to the nearest prime. 4
1, 0, 1, 1, 7, 1, 1, 23, 13, 11, 1, 1, 23, 1, 43, 23, 31, 37, 89, 29, 31, 31, 89, 73, 41, 37, 1, 67, 31, 1, 61, 1, 1, 97, 61, 127, 1, 1, 73, 53, 1, 79, 71, 47, 53, 89, 79, 53, 59, 61, 179, 53, 59, 127, 61, 149, 107, 109, 137, 139, 71, 71, 101, 67, 127, 283, 73, 83, 103, 97 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
EXAMPLE
For both 1! and 2! the nearest prime neighbor is 2, with distances of 1 and 0, respectively. The nearest primes around 8! are 40289 and 40343 with distances of 31 and 23, so a(8)=23.
MAPLE
with(numtheory): [seq(min(nextprime(i!)-i!, i!-prevprime(i!)), i=3..100)]; # a(1) and a(2) computed individually
MATHEMATICA
Table[Function[k, Min[k - #, NextPrime@ # - k] &@If[n == 1, 0, Prime@ PrimePi@ k]][n!], {n, 16}] (* Michael De Vlieger, Jul 15 2017 *)
CROSSREFS
Cf. A006990, A037151, A033932, A033933, A053714 (signed version with a different second term).
Sequence in context: A157272 A176200 A046739 * A053714 A168290 A218695
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 19 2001
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 19 10:31 EDT 2024. Contains 371791 sequences. (Running on oeis4.)