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.
%I A064113 #59 Oct 16 2024 09:23:45 %S A064113 2,15,36,39,46,54,55,73,102,107,110,118,129,160,164,184,187,194,199, %T A064113 218,239,271,272,291,339,358,387,419,426,464,465,508,520,553,599,605, %U A064113 621,629,633,667,682,683,702,709,710,733,761,791,813,821,822,829,830 %N A064113 Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime. %C A064113 n such that d(n) = d(n+1), where d(n) = prime(n+1) - prime(n) = A001223(n). %C A064113 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 A064113 From _Lei Zhou_, Dec 06 2005: (Start) %C A064113 When (1/3)*(prime(k) + prime(k+1) + prime(k+2)) is prime, then it is equal to prime(k+1). %C A064113 Also, indices k such that (prime(k)+prime(k+2))/2 = prime(k+1). %C A064113 The Mathematica program is based on the alternative definition. (End) %C A064113 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 A064113 Harry J. Smith, <a href="/A064113/b064113.txt">Table of n, a(n) for n=1..1000</a> %H A064113 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inflection_point">Inflection point</a> %F A064113 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 %F A064113 A262138(2*a(n)) = 0. - _Reinhard Zumkeller_, Sep 12 2015 %F A064113 a(n) = A000720(A006562(n)) - 1, where A000720 = (prime)pi, A006562 = balanced primes. - _M. F. Hasler_, Oct 15 2024 %e A064113 a(2) = 15 because (p(15)+p(16)+p(17)) = 1/3(47 + 53 + 59) = 53 (prime average of three successive primes). %e A064113 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 A064113 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 A064113 Join@@Position[Differences[Array[Prime,100],2],0] (* _Gus Wiseman_, Mar 24 2020 *) %o A064113 (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 A064113 (PARI) { n=0; for (m=1, 10^9, if (d(m)==d(m+1), write("b064113.txt", n++, " ", m); if (n==1000, break)) ) } \\ Using d(n) above. - _Harry J. Smith_, Sep 07 2009 %o A064113 (PARI) [n | n<-[1..888], !A036263(n)] \\ _M. F. Hasler_, Oct 15 2024 %o A064113 (PARI) \\ More efficient for larges range of n: %o A064113 A064113_upto(N, n=1, L=List(), q=prime(n+1), d=q-prime(n))={forprime(p=1+q,, if(d==d=p-q, listput(L,n); #L<N||break); n++; q=p); L} \\ _M. F. Hasler_, Oct 15 2024 %o A064113 (Haskell) %o A064113 import Data.List (elemIndices) %o A064113 a064113 n = a064113_list !! (n-1) %o A064113 a064113_list = map (+ 1) $ elemIndices 0 a036263_list %o A064113 -- _Reinhard Zumkeller_, Jan 20 2012 %o A064113 (Python) %o A064113 from itertools import count, islice %o A064113 from sympy import prime, nextprime %o A064113 def A064113_gen(startvalue=1): # generator of terms >= startvalue %o A064113 c = max(startvalue,1) %o A064113 p = prime(c) %o A064113 q = nextprime(p) %o A064113 r = nextprime(q) %o A064113 for k in count(c): %o A064113 if p+r==(q<<1): %o A064113 yield k %o A064113 p, q, r = q, r, nextprime(r) %o A064113 A064113_list = list(islice(A064113_gen(),20)) # _Chai Wah Wu_, Feb 27 2024 %Y A064113 Indices of zeros in A036263 (second differences of primes). %Y A064113 Indices (A000720 = primepi) of balanced primes A006562, minus 1. %Y A064113 Cf. A001223, A024675, A075540, A075541. %Y A064113 Cf. A262138. %Y A064113 Complement of A333214. %Y A064113 First differences are A333216. %Y A064113 The version for strict ascents is A258025. %Y A064113 The version for strict descents is A258026. %Y A064113 The version for weak ascents is A333230. %Y A064113 The version for weak descents is A333231. %Y A064113 A triangle for anti-runs of compositions is A106356. %Y A064113 Lengths of maximal runs of prime gaps are A333254. %Y A064113 Anti-runs of compositions in standard order are A333381. %Y A064113 Cf. A000040, A084758, A124762, A124767, A238279. %K A064113 easy,nonn %O A064113 1,1 %A A064113 _Jason Earls_, Sep 08 2001