OFFSET
1,1
COMMENTS
Gaps of length congruent to 20 mod 40 do not exist. All full reptend primes are either 7, 11, 17, 19, 21, 23, 29, or 33 mod 40, and no difference of 20 exists between any of these numbers.
LINKS
Martin Raab, Table of n, a(n) for n = 1..583
Eric Weisstein's World of Mathematics, Full Reptend Prime
EXAMPLE
a(9) = 29 because there is a gap of 2*9 = 18 between 29 and the next full reptend prime 47.
a(10) = 0 because no gap of 2*10 = 20 exists between full reptend primes.
PROG
(PARI) is(p) = Mod(10, p)^(p\2)==-1 && znorder(Mod(10, p))+1==p;
isok(p, n) = {if (! is(p), return (0)); if (isprime(p+n) && is(p+n), forprime(q=p+1, p+n-1, if (is(q), return (0)); ); return (1); ); }
a(n) = {n *= 2; if ((n % 40) == 20, return (0)); my (p = 2); while (! isok(p, n), p = nextprime(p+1)); p; } \\ Michel Marcus, Apr 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Raab, Apr 21 2020
STATUS
approved