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.

A073051 Least k such that Sum_{i=1..k} (prime(i) + prime(i+2) - 2*prime(i+1)) = 2n + 1.

This page as a plain text file.
%I A073051 #16 Jun 12 2024 16:17:03
%S A073051 1,3,8,23,33,45,29,281,98,153,188,262,366,428,589,737,216,1182,3301,
%T A073051 2190,1878,1830,7969,3076,3426,2224,3792,8027,4611,4521,3643,8687,
%U A073051 14861,12541,15782,3384,34201,19025,17005,44772,23282,38589,14356
%N A073051 Least k such that Sum_{i=1..k} (prime(i) + prime(i+2) - 2*prime(i+1)) = 2n + 1.
%C A073051 Also, least k such that 2n = A001223(k-1) = prime(k+1) - prime(k), where prime(k) = A001223(n). - _Alexander Adamchuk_, Jul 30 2006
%C A073051 Also the least number k>0 such that the k-th maximal run of composite numbers has length 2n-1. For example, the 8th such run (24,25,26,27,28) is the first of length 2(3)-1, so a(3) = 8. Also positions of first appearances in A176246 (A046933 without first term). - _Gus Wiseman_, Jun 12 2024
%H A073051 Gus Wiseman, <a href="/A373403/a373403.txt">Four statistics for runs and antiruns of prime, nonprime, squarefree, and nonsquarefree numbers</a>.
%F A073051 a(n) = A038664(n) - 1. - _Filip Zaludek_, Nov 19 2016
%e A073051 a(3) = 8 because 1+0+2-2+2-2+2+2 = 5 and (5+1)/2 = 3.
%t A073051 NextPrim[n_Integer] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {50}]; s = 0; k = 1; p = 0; q = 2; r = 3; While[k < 10^6, p = q; q = r; r = NextPrim[q]; s = s + p + r - 2q; If[s < 101 && a[[(s + 1)/2]] == 0, a[[(s + 1)/2]] = k]; k++ ]; a
%o A073051 (PARI) a001223(n) = prime(n+1) - prime(n);
%o A073051 a(n) = {my(k = 1); while(2*n != A001223(k+1), k++); k;} \\ _Michel Marcus_, Nov 20 2016
%Y A073051 Cf. A000230, A001223.
%Y A073051 Position of first appearance of 2n+1 in A176246.
%Y A073051 For nonsquarefree runs we have a bisection of A373199.
%Y A073051 A000040 lists the primes, first differences A001223.
%Y A073051 A002808 lists the composite numbers, differences A073783, sums A053767.
%Y A073051 A046933 counts composite numbers between primes.
%Y A073051 A065855 counts composite numbers up to n.
%Y A073051 Cf. A005381, A027833, A038664, A045881, A068780, A174965, A371201, A373403.
%K A073051 nonn
%O A073051 1,2
%A A073051 _Robert G. Wilson v_, Aug 15 2002