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.

A292201 a(n) is the smallest value c such that prime(n)^c - 2 is prime, where prime(n) is the n-th prime or -1 if no such c exists.

This page as a plain text file.
%I A292201 #21 Oct 26 2017 02:59:32
%S A292201 2,2,1,1,4,1,6,1,24,2,1,2,4,1,2,4,4,1,3,2,1,38,4,2,747,4,1,2,1,10,2,2,
%T A292201 10,1,50,1,22,38,12,2,40,1,2,1,164,1,2,2,12,1,2,2,1,8,2,18,22,1,3,10,
%U A292201 1,2,102,4,1,13896,12,2,1122,1
%N A292201 a(n) is the smallest value c such that prime(n)^c - 2 is prime, where prime(n) is the n-th prime or -1 if no such c exists.
%C A292201 a(71) > 38000 (if it exists). - _Robert Price_, Oct 23 2017
%H A292201 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_887.htm">Puzzle 887. p(n)^c-2 is prime</a>, The Prime Puzzles and Problems Connection.
%e A292201 a(1) = 2 because 2^2 - 2 = 2 is prime;
%e A292201 a(2) = 2 because 3^2 - 2 = 7 is prime;
%e A292201 a(3) = 1 because 5^1 - 2 = 3 is prime;
%e A292201 a(4) = 1 because 7^1 - 2 = 5 is prime.
%e A292201 And these are the least exponents to satisfy the requested property.
%t A292201 Table[c = 1; While[! PrimeQ[Prime[n]^c - 2], c++]; c, {n, 24}] (* _Michael De Vlieger_, Sep 11 2017 *)
%o A292201 (PARI) a(n) = {my(c = 1, p = prime(n)); while(!isprime(p^c-2), c++); c;}
%Y A292201 Subsequence of A255707.
%K A292201 nonn
%O A292201 1,1
%A A292201 _Michel Marcus_, Sep 11 2017
%E A292201 a(66)-a(70) from _Robert Price_, Oct 23 2017