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.

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.

This page as a plain text file.
%I A175193 #20 Dec 02 2017 10:14:21
%S A175193 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 A175193 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 A175193 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 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.
%C A175193 A175194(n) = a(n)!.
%H A175193 Michael De Vlieger, <a href="/A175193/b175193.txt">Table of n, a(n) for n = 1..10000</a>
%H A175193 Michael De Vlieger, <a href="/A175193/a175193.txt">First positions of values and records in a(n).</a>
%F A175193 A092789(n) = A000040(n) + a(n)!.
%e A175193 From _Michael De Vlieger_, Nov 24 2017: (Start)
%e A175193 Records and their indices in a(n):
%e A175193     i          n   a(n)
%e A175193    --------------------
%e A175193     1        1      1
%e A175193     2        2      2
%e A175193     3        4      3
%e A175193     4        8      4
%e A175193     5       29      5
%e A175193     6       42      9
%e A175193     7      233     10
%e A175193     8      254     42
%e A175193     9     4508     49
%e A175193    10     7003    124
%e A175193    11     7385    276
%e A175193    12    60650    311
%e A175193    13    97146    542
%e A175193 (End)
%t A175193 Fold[Append[#1, SelectFirst[Range[12], Function[k, PrimeQ[Prime[#2] + k!]]]] &, {1}, Range[2, 105]] (* _Michael De Vlieger_, Nov 24 2017 *)
%o A175193 (PARI) a(n) = {my(k = 1, p = prime(n)); while (!isprime(p + k!), k++); k;} \\ _Michel Marcus_, Nov 25 2017
%Y A175193 Cf. A082470, A092789, A175194.
%K A175193 nonn
%O A175193 1,2
%A A175193 _Leroy Quet_, Mar 01 2010
%E A175193 Extended by _Ray Chandler_, Mar 04 2010