The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090403 Balanced primes: Primes which are both the arithmetic mean and median of a sequence of 2k+1 consecutive primes, for some k>0. 11

%I #11 Oct 21 2012 19:39:49

%S 5,17,29,37,53,71,79,89,137,149,151,157,173,179,193,211,227,229,257,

%T 263,281,349,353,359,373,383,397,409,419,421,433,439,487,491,563,577,

%U 593,607,631,643,653,659,677,701,709,733,751,757,787,823,827,877,947,953

%N Balanced primes: Primes which are both the arithmetic mean and median of a sequence of 2k+1 consecutive primes, for some k>0.

%C Union, for all k>0, of (2k+1)-balanced prime numbers, i.e., balanced prime of order k, which are primes p_n such that (2k+1)*p_n = Sum_{i=n-k..n+k} p_i, where p_i is the i-th prime.

%H Donovan Johnson, <a href="/A090403/b090403.txt">Table of n, a(n) for n = 1..10000</a>

%e 17 is in the sequence because 17 = (7 + 11 + 13 + 17 + 19 + 23 + 29)/7, (k = 3).

%e 29 is in the sequence because 29 = (5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)/15, (k = 7).

%e 37 is a member because 37 = (7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71)/17; 7 & 71 are eight primes away from 37.

%t t[n_] := (For[k=1, !(SameQ[1/(2k+1)Sum[Prime[i], {i, n-k, n+k}], Prime[n]])&& k < n-1, k++ ];k);b[n_] := If[t[n]<n-1||SameQ[1/(2n-1)Sum[Prime[i], {i, 2n-1}], Prime[n]], t[n], 0];v={};Do[If[b[n]!=0, v=Append[v, Prime[n]]], {n, 2, 168}];v

%o (PARI) is_A090403(p)={my(s=0,n); isprime(p) & for(k=1,-1+n=primepi(p),(s+=prime(n+k)+prime(n-k)-2*p)||return(1);s>p & return)} \\ _M. F. Hasler_, Oct 21 2012

%Y Cf. A096693, A006562, A082077, A082078, A082079, A096697, A096698, A096699, A096700, A096701, A096702, A096703, A096704, A096711.

%K easy,nonn

%O 1,1

%A _Farideh Firoozbakht_, Dec 07 2003

%E Definition corrected by _Franklin T. Adams-Watters_, Apr 13 2006

%E Edited by _M. F. Hasler_, Oct 21 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 00:29 EDT 2024. Contains 372921 sequences. (Running on oeis4.)