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.

A242961 The smallest prime p > prime(n) such that p mod prime(n) == - 1.

This page as a plain text file.
%I A242961 #41 Feb 25 2024 05:59:14
%S A242961 3,5,19,13,43,103,67,37,137,173,61,73,163,257,281,211,353,487,401,283,
%T A242961 1021,157,331,1423,193,1009,617,641,653,677,761,523,547,277,1489,1811,
%U A242961 313,977,1669,691,1789,1447,4201,1543,787,397,421,1783,907,457,3727
%N A242961 The smallest prime p > prime(n) such that p mod prime(n) == - 1.
%C A242961 If the condition a(n) > prime(n) is removed, then we get sequence A032448.  This differs only at n = 2 since if p <= prime(n) and p == -1 (mod prime(n)), then p must be prime(n) - 1.  The only solution is p = 2, prime(n) = 3. - _Michael B. Porter_, Jul 01 2014 and _Michel Marcus_, May 28 2014
%H A242961 Paolo P. Lava, <a href="/A242961/b242961.txt">Table of n, a(n) for n = 1..1000</a>
%F A242961 a(n) = min(p: p mod prime(n) == - 1 and p > prime(n)).
%e A242961 a(1) = 3, because for the first prime, 2, we have 3 mod 2 = 2 - 1.
%e A242961 a(2) = 5, because for the second prime, 3, we have 5 mod 3 = 3 - 1.
%e A242961 a(3) = 19, because for the third prime, 5, we have 19 mod 5 = 5 - 1.
%o A242961 (PARI) a(n) = {q = prime(n); forprime(p=q, ,if (p % q == q - 1, return (p);););} \\ _Michel Marcus_, May 28 2014
%Y A242961 Cf. A032448.
%K A242961 nonn
%O A242961 1,1
%A A242961 _Torlach Rush_, May 27 2014
%E A242961 More terms from _Michel Marcus_, May 28 2014