OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(1) = 149 because prevprime(149) + nextprime(149) = 139 + 151 = 290 = 29 * 10.
a(2) = 433 because prevprime(433) + nextprime(433) = 431 + 439 = 870 = 29 * 30.
a(3) = 463 because prevprime(463) + nextprime(463) = 461 + 467 = 928 = 29 * 32.
a(4) = 491 because prevprime(491) + nextprime(491) = 487 + 499 = 986 = 29 * 34.
MAPLE
Primes:= select(isprime, [seq(i, i=3..20000, 2)]):
R:= select(t -> Primes[t-1]+Primes[t+1] mod 29 = 0, [$2..nops(Primes)-1]):
Primes[R]; # Robert Israel, May 02 2017
MATHEMATICA
Prime@ Select[Range[2, 1372], Mod[Prime[ # - 1] + Prime[ # + 1], 29] == 0 &] (* Robert G. Wilson v, Jan 05 2006 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Jan 01 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jan 05 2006
STATUS
approved