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!)
A064113 Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime. 35

%I #45 Feb 27 2024 11:32:19

%S 2,15,36,39,46,54,55,73,102,107,110,118,129,160,164,184,187,194,199,

%T 218,239,271,272,291,339,358,387,419,426,464,465,508,520,553,599,605,

%U 621,629,633,667,682,683,702,709,710,733,761,791,813,821,822,829,830

%N Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime.

%C n such that d(n) = d(n+1), where d(n)=prime(n+1)-prime(n), or A001223(n).

%C Of interest because when I generalize it to d(n)=d(n+2), d(n)=d(n+3), etc. I am unable to find any positive number k such that d(n)=d(n+k) has no solution.

%C From _Lei Zhou_, Dec 06 2005: (Start)

%C When (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is prime, then it is equal to prime(k+1).

%C Also, indices k such that (prime(k)+prime(k+2)/2 = prime(k+1).

%C The mathematica program is based on the alternative definition. (End)

%C A036263(a(n)) = 0; A122535(n) = A000040(a(n)); A006562(n) = A000040(a(n) + 1); A181424(n) = A000040(a(n) + 2). - _Reinhard Zumkeller_, Jan 20 2012

%C A262138(2*a(n)) = 0. - _Reinhard Zumkeller_, Sep 12 2015

%C Inflection and undulation points of the primes, i.e., positions of zeros in A036263, the second differences of the primes. - _Gus Wiseman_, Mar 24 2020

%H Harry J. Smith, <a href="/A064113/b064113.txt">Table of n, a(n) for n=1..1000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Inflection_point">Inflection point</a>

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

%e Splitting the prime gaps into anti-runs gives: (1,2), (2,4,2,4,2,4,6,2,6,4,2,4,6), (6,2,6,4,2,6,4,6,8,4,2,4,2,4,14,4,6,2,10,2,6), (6,4,6), ... Then a(n) is the n-th partial sum of the lengths of these anti-runs. - _Gus Wiseman_, Mar 24 2020

%t ct = 0; Do[If[(Prime[k] + Prime[k + 2] - 2*Prime[k + 1]) == 0, ct++; n[ct] = k], {k, 1, 2000}]; Table[n[k], {k, 1, ct}] (* _Lei Zhou_, Dec 06 2005 *)

%t Join@@Position[Differences[Array[Prime,100],2],0] (* _Gus Wiseman_, Mar 24 2020 *)

%o (PARI) d(n) = prime(n+1)-prime(n); j=[]; for(n=1,1500, if(d(n)==d(n+1), j=concat(j,n))); j

%o (PARI) d(n)= { prime(n + 1) - prime(n) } { n=0; for (m=1, 10^9, if (d(m)==d(m+1), write("b064113.txt", n++, " ", m); if (n==1000, break)) ) } \\ _Harry J. Smith_, Sep 07 2009

%o (Haskell)

%o import Data.List (elemIndices)

%o a064113 n = a064113_list !! (n-1)

%o a064113_list = map (+ 1) $ elemIndices 0 a036263_list

%o -- _Reinhard Zumkeller_, Jan 20 2012

%o (Python)

%o from itertools import count, islice

%o from sympy import prime, nextprime

%o def A064113_gen(startvalue=1): # generator of terms >= startvalue

%o c = max(startvalue,1)

%o p = prime(c)

%o q = nextprime(p)

%o r = nextprime(q)

%o for k in count(c):

%o if p+r==(q<<1):

%o yield k

%o p, q, r = q, r, nextprime(r)

%o A064113_list = list(islice(A064113_gen(),20)) # _Chai Wah Wu_, Feb 27 2024

%Y Cf. A001223, A006562, A024675, A075540, A075541.

%Y Cf. A262138.

%Y Complement of A333214.

%Y First differences are A333216.

%Y The version for strict ascents is A258025.

%Y The version for strict descents is A258026.

%Y The version for weak ascents is A333230.

%Y The version for weak descents is A333231.

%Y The second differences of the primes are A036263.

%Y A triangle for anti-runs of compositions is A106356.

%Y Lengths of maximal runs of prime gaps are A333254.

%Y Anti-runs of compositions in standard order are A333381.

%Y Cf. A000040, A084758, A124762, A124767, A238279.

%K easy,nonn

%O 1,1

%A _Jason Earls_, Sep 08 2001

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 April 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)