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!)
A064113 Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime. 35
2, 15, 36, 39, 46, 54, 55, 73, 102, 107, 110, 118, 129, 160, 164, 184, 187, 194, 199, 218, 239, 271, 272, 291, 339, 358, 387, 419, 426, 464, 465, 508, 520, 553, 599, 605, 621, 629, 633, 667, 682, 683, 702, 709, 710, 733, 761, 791, 813, 821, 822, 829, 830 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
n such that d(n) = d(n+1), where d(n)=prime(n+1)-prime(n), or A001223(n).
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.
From Lei Zhou, Dec 06 2005: (Start)
When (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is prime, then it is equal to prime(k+1).
Also, indices k such that (prime(k)+prime(k+2)/2 = prime(k+1).
The mathematica program is based on the alternative definition. (End)
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
A262138(2*a(n)) = 0. - Reinhard Zumkeller, Sep 12 2015
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
LINKS
Wikipedia, Inflection point
EXAMPLE
a(2) = 15 because (p(15)+p(16)+p(17)) = 1/3(47 + 53 + 59) = 53 (prime average of three successive primes).
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
MATHEMATICA
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 *)
Join@@Position[Differences[Array[Prime, 100], 2], 0] (* Gus Wiseman, Mar 24 2020 *)
PROG
(PARI) d(n) = prime(n+1)-prime(n); j=[]; for(n=1, 1500, if(d(n)==d(n+1), j=concat(j, n))); j
(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
(Haskell)
import Data.List (elemIndices)
a064113 n = a064113_list !! (n-1)
a064113_list = map (+ 1) $ elemIndices 0 a036263_list
-- Reinhard Zumkeller, Jan 20 2012
(Python)
from itertools import count, islice
from sympy import prime, nextprime
def A064113_gen(startvalue=1): # generator of terms >= startvalue
c = max(startvalue, 1)
p = prime(c)
q = nextprime(p)
r = nextprime(q)
for k in count(c):
if p+r==(q<<1):
yield k
p, q, r = q, r, nextprime(r)
A064113_list = list(islice(A064113_gen(), 20)) # Chai Wah Wu, Feb 27 2024
CROSSREFS
Cf. A262138.
Complement of A333214.
First differences are A333216.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for weak ascents is A333230.
The version for weak descents is A333231.
The second differences of the primes are A036263.
A triangle for anti-runs of compositions is A106356.
Lengths of maximal runs of prime gaps are A333254.
Anti-runs of compositions in standard order are A333381.
Sequence in context: A346641 A075541 A075542 * A007217 A295367 A214541
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Sep 08 2001
STATUS
approved

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 20 08:05 EDT 2024. Contains 372703 sequences. (Running on oeis4.)