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!)
A339691 a(n) is the least prime p > prime(n+1) such that p == -prime(n+1) (mod prime(n)). 1

%I #11 Dec 14 2020 05:14:37

%S 5,7,13,17,31,61,83,53,109,317,149,107,367,211,229,577,293,421,197,

%T 211,359,233,409,971,1063,503,1129,2459,541,1229,631,911,409,2909,743,

%U 1051,1093,811,829,859,1609,1619,571,1733,983,983,2309,2003,6581,683,2557,1193,5051,1249,1279,2887,2957

%N a(n) is the least prime p > prime(n+1) such that p == -prime(n+1) (mod prime(n)).

%C a(n) >= 4*prime(n)-prime(n+1), with equality when prime(n) is in A227907.

%H Robert Israel, <a href="/A339691/b339691.txt">Table of n, a(n) for n = 1..10000</a>

%e For n=5 we have prime(5)=11 and prime(6)=13, and a(5)=31 because of the numbers == -13 (mod 11) and greater than 13 (20, 31, ...), 31 is the first prime.

%p f:= proc(n) local p,q,r0, r;

%p p:= ithprime(n);

%p q:= nextprime(p);

%p for r from 4*p-q by p do if isprime(r) then return r fi od;

%p end proc:

%p map(f, [$1..100]);

%o (PARI) a(n) = my(p=prime(n+2)); while(Mod(p, prime(n)) != -prime(n+1), p = nextprime(p+1)); p; \\ _Michel Marcus_, Dec 13 2020

%Y Cf. A227907.

%K nonn,look

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Dec 13 2020

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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)