login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

%I

%S 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,

%T 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,

%U 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

%N a(n) is the smallest positive integer such that (the n-th prime)+a(n)! is prime, or -1 if no such prime exists.

%C A175194(n) = a(n)!.

%H Michael De Vlieger, <a href="/A175193/b175193.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A175193/a175193.txt">First positions of values and records in a(n).</a>

%F A092789(n) = A000040(n) + a(n)!.

%e From _Michael De Vlieger_, Nov 24 2017: (Start)

%e Records and their indices in a(n):

%e i n a(n)

%e --------------------

%e 1 1 1

%e 2 2 2

%e 3 4 3

%e 4 8 4

%e 5 29 5

%e 6 42 9

%e 7 233 10

%e 8 254 42

%e 9 4508 49

%e 10 7003 124

%e 11 7385 276

%e 12 60650 311

%e 13 97146 542

%e (End)

%t Fold[Append[#1, SelectFirst[Range[12], Function[k, PrimeQ[Prime[#2] + k!]]]] &, {1}, Range[2, 105]] (* _Michael De Vlieger_, Nov 24 2017 *)

%o (PARI) a(n) = {my(k = 1, p = prime(n)); while (!isprime(p + k!), k++); k;} \\ _Michel Marcus_, Nov 25 2017

%Y Cf. A082470, A092789, A175194.

%K nonn

%O 1,2

%A _Leroy Quet_, Mar 01 2010

%E Extended by _Ray Chandler_, Mar 04 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 1 00:23 EDT 2020. Contains 337440 sequences. (Running on oeis4.)