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!)
A175193 a(n) is the smallest positive integer such that (the n-th prime)+a(n)! is prime, or -1 if no such prime exists. 4
1, 2, 2, 3, 2, 3, 2, 4, 3, 2, 3, 3, 2, 4, 3, 3, 2, 3, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 5, 4, 4, 3, 2, 4, 2, 3, 3, 5, 3, 3, 2, 9, 2, 3, 2, 4, 5, 3, 2, 5, 3, 2, 7, 3, 3, 3, 2, 3, 3, 2, 4, 4, 3, 2, 4, 8, 3, 5, 2, 4, 3, 4, 3, 3, 5, 3, 5, 4, 5, 4, 2, 5, 2, 3, 4, 3, 5, 3, 2, 4, 4, 4, 5, 7, 4, 3, 6, 2, 4, 3, 4, 3, 3, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A175194(n) = a(n)!.
LINKS
FORMULA
A092789(n) = A000040(n) + a(n)!.
EXAMPLE
From Michael De Vlieger, Nov 24 2017: (Start)
Records and their indices in a(n):
i n a(n)
--------------------
1 1 1
2 2 2
3 4 3
4 8 4
5 29 5
6 42 9
7 233 10
8 254 42
9 4508 49
10 7003 124
11 7385 276
12 60650 311
13 97146 542
(End)
MATHEMATICA
Fold[Append[#1, SelectFirst[Range[12], Function[k, PrimeQ[Prime[#2] + k!]]]] &, {1}, Range[2, 105]] (* Michael De Vlieger, Nov 24 2017 *)
PROG
(PARI) a(n) = {my(k = 1, p = prime(n)); while (!isprime(p + k!), k++); k; } \\ Michel Marcus, Nov 25 2017
CROSSREFS
Sequence in context: A338720 A320013 A299990 * A353861 A073093 A326196
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 01 2010
EXTENSIONS
Extended by Ray Chandler, Mar 04 2010
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 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)