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.

A094933 Primes prime(k) such that (prime(k-1) + prime(k+1) + prime(k+2))/prime(k) = 3.

Original entry on oeis.org

127, 149, 431, 967, 1031, 1061, 1597, 2437, 2833, 2953, 3793, 5923, 6449, 6701, 6959, 7103, 8803, 11467, 11617, 11717, 11923, 12611, 13291, 13327, 13397, 13679, 13721, 14533, 14713, 15787, 16087, 17417, 17921, 18539, 20021, 21269, 21467, 22027
Offset: 1

Views

Author

Roger L. Bagula, Jun 17 2004

Keywords

Examples

			127 is OK since 127 is p(31) and (p(n-1) + p(n+1)+ p(n+2))/p(n)=(113+131+137)/127=3. - _Zak Seidov_, Aug 04 2006
		

Crossrefs

Cf. A119381.

Programs

  • MATLAB
    p=primes(30000);
    m=1;
    for u=2:length(p)-2
      if p(u-1)+p(u+1)+p(u+2)-3*p(u)==0;
         sol(m)=p(u);  m=m+1;
      end
    end
    sol % Marius A. Burtea, May 06 2019
  • Magma
    [NthPrime(n):n in [2..3000]|NthPrime(n-1)+NthPrime(n+1)+NthPrime(n+2)- 3*NthPrime(n) eq 0]; // Marius A. Burtea, May 06 2019
    
  • Maple
    p:= 2: q:= 3: r:= 5: s:= 7:
    count:= 0: Res:= NULL:
    while count < 100 do
      if p + r + s = 3*q then count:= count+1; Res:= Res, q fi;
      p:= q; q:= r; r:= s; s:= nextprime(s)
    od:
    Res; # Robert Israel, May 06 2019
  • Mathematica
    a=Table[If[(Prime[n-3]+Prime[n-2]+Prime[n-1]+Prime[n])/4-Prime[n-2]==0, Prime[n-2], 0], {n, 4, 2004}] a0=Delete[Union[Sort[a]], 1]
    Select[Prime[Range[2,3000]],Prime[PrimePi[ # ]-1]+Prime[PrimePi[ # ]+1]+Prime[PrimePi[ # ]+2]==3#&] (* Zak Seidov, Aug 04 2006 *)

Extensions

More terms from Zak Seidov, Aug 04 2006
Edited by N. J. A. Sloane, Aug 08 2008