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.

A112794 Primes such that the sum of the predecessor and successor primes is divisible by 5.

Original entry on oeis.org

5, 11, 19, 41, 71, 73, 89, 97, 101, 109, 137, 149, 181, 229, 241, 281, 293, 311, 349, 359, 389, 397, 409, 419, 421, 433, 449, 457, 461, 487, 541, 557, 587, 631, 701, 709, 743, 751, 787, 811, 859, 881, 887, 919, 937, 991, 997, 1009, 1021, 1033, 1049, 1051, 1063
Offset: 1

Views

Author

Jonathan Vos Post, Jan 01 2006

Keywords

Examples

			a(1) = 5 because prevprime(5) + nextprime(5) = 3 + 7 = 10 = 5 * 2.
a(2) = 11 because prevprime(11) + nextprime(11) = 7 + 13 = 20 = 5 * 4.
a(3) = 19 because prevprime(19) + nextprime(19) = 17 + 23 = 40 = 5 * 8.
a(4) = 41 because prevprime(41) + nextprime(41) = 37 + 43 = 80 = 5 * 16.
		

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[2, 179], Mod[Prime[ # - 1] + Prime[ # + 1], 5] == 0 &] (* Robert G. Wilson v *)
    Select[Partition[Prime[Range[200]],3,1],Divisible[#[[1]]+#[[3]],5]&] [[All,2]] (* Harvey P. Dale, May 18 2019 *)

Formula

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.

Extensions

Corrected and extended by Robert G. Wilson v, Jan 05 2006