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.

A258879 Numbers k such that k is the average of four consecutive primes k-7, k-1, k+1 and k+7.

This page as a plain text file.
%I A258879 #38 Jul 07 2025 18:37:55
%S A258879 30,60,270,570,600,1230,1290,1620,2340,2550,3540,4020,4650,5850,6270,
%T A258879 6360,6570,10860,11490,14550,15270,17490,19080,19380,19470,23670,
%U A258879 26730,29130,32370,34260,41610,48480,49200,49530,51420,51480
%N A258879 Numbers k such that k is the average of four consecutive primes k-7, k-1, k+1 and k+7.
%C A258879 This sequence is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30*n).
%H A258879 Karl V. Keller, Jr., <a href="/A258879/b258879.txt">Table of n, a(n) for n = 1..10000</a>
%H A258879 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>
%F A258879 a(n) = A078854(n) + 7.
%e A258879 For k=30: 23, 29, 31, 37 are consecutive primes (k-7=23, k-1=29, k+1=31, k+7=37).
%e A258879 For k=60: 53, 59, 61, 67 are consecutive primes (k-7=53, k-1=59, k+1=61, k+7=67).
%t A258879 Select[ 5 Range@ 11000, PrimeQ[# - 7] && PrimeQ[# - 1] && PrimeQ[# + 1] && PrimeQ[# + 7] &] (* _Robert G. Wilson v_, Jun 28 2015 *)
%o A258879 (Python)
%o A258879 from sympy import isprime, prevprime, nextprime
%o A258879 for i in range(0, 10001, 2):
%o A258879   if isprime(i-1) and isprime(i+1):
%o A258879     if prevprime(i-1) == i-7 and nextprime(i+1) == i+7: print(i, end=', ')
%o A258879 (Magma) [n: n in [13..2*10^5] | IsPrime(n-7) and IsPrime(n-1) and IsPrime(n+1) and IsPrime(n+7)]; // _Vincenzo Librandi_ Jul 16 2015
%o A258879 (PARI) main(size)={my(v=vector(size),i,t=8);for(i=1,size,while(1,if(isprime(t-7)&&isprime(t-1)&&isprime(t+1)&&isprime(t+7),v[i]=t;break,t++));t++);return(v);} /* _Anders Hellström_, Jul 17 2015 */
%Y A258879 Cf. A014574, A077800 (twin primes), A078854, A249674, A256753.
%K A258879 nonn
%O A258879 1,1
%A A258879 _Karl V. Keller, Jr._, Jun 13 2015