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.

A075541 Numbers k such that prime(k) + prime(k+1) + prime(k+2) is a multiple of 3.

Original entry on oeis.org

2, 15, 36, 39, 46, 54, 55, 73, 96, 99, 102, 107, 110, 118, 129, 160, 164, 167, 179, 184, 187, 194, 199, 202, 218, 231, 238, 239, 242, 271, 272, 273, 274, 290, 291, 292, 311, 326, 339, 356, 357, 358, 362, 387, 419, 426, 437, 438, 449, 452, 464, 465, 489, 508
Offset: 1

Views

Author

Zak Seidov, Sep 21 2002

Keywords

Comments

Not every three successive primes have an integer average. The integer averages are in A075540.
Not all of these 3-averages are prime: the prime 3-averages are in A006562 (balanced primes). There are surprisingly many prime 3-averages: among first 117 3-averages, there are 59 primes. Indices i(n) of first prime in sequence of three primes with integer average are in sequence A064113. Interprimes (s-averages with s=2) are all composite, see A024675.

Examples

			a(2) = 15 because (prime(15)+prime(16)+prime(17)) = (1/3)*(47 + 53 + 59) = 53 (integer average of three successive primes).
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    q:= 2: r:= 3:
    for i from 1 while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      if p+q+r mod 3 = 0 then
         R:= R,i; count:= count+1
      fi
    od:
    R; # Robert Israel, Nov 10 2024
  • Mathematica
    A075541= {}; Do[If[IntegerQ[s3 = (Prime[i] + Prime[i + 1] + Prime[i + 2])/3], A075541 = Append[A075541, i]], {i, 1000}]; (* 119 terms*)