Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 May 18 2019 18:27:32
%S 5,11,19,41,71,73,89,97,101,109,137,149,181,229,241,281,293,311,349,
%T 359,389,397,409,419,421,433,449,457,461,487,541,557,587,631,701,709,
%U 743,751,787,811,859,881,887,919,937,991,997,1009,1021,1033,1049,1051,1063
%N Primes such that the sum of the predecessor and successor primes is divisible by 5.
%H Harvey P. Dale, <a href="/A112794/b112794.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = prime(i) is in this sequence iff prime(i-1)+prime(i+1) = 0 mod 5. a(n) = A000040(i) is in this sequence iff A000040(i-1)+A000040(i+1) = 0 mod 5.
%e a(1) = 5 because prevprime(5) + nextprime(5) = 3 + 7 = 10 = 5 * 2.
%e a(2) = 11 because prevprime(11) + nextprime(11) = 7 + 13 = 20 = 5 * 4.
%e a(3) = 19 because prevprime(19) + nextprime(19) = 17 + 23 = 40 = 5 * 8.
%e a(4) = 41 because prevprime(41) + nextprime(41) = 37 + 43 = 80 = 5 * 16.
%t Prime@ Select[Range[2, 179], Mod[Prime[ # - 1] + Prime[ # + 1], 5] == 0 &] (* _Robert G. Wilson v_ *)
%t Select[Partition[Prime[Range[200]],3,1],Divisible[#[[1]]+#[[3]],5]&] [[All,2]] (* _Harvey P. Dale_, May 18 2019 *)
%Y Cf. A000040, A112681, A112731, A112789, A112795, A112796, A112804, A112847, A112859, A113155, A113156, A113157, A113158.
%K easy,nonn
%O 1,1
%A _Jonathan Vos Post_, Jan 01 2006
%E Corrected and extended by _Robert G. Wilson v_, Jan 05 2006