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 A373891 #8 Jun 27 2024 12:56:45 %S A373891 0,0,1,0,2,1,3,2,0,4,1,3,5,4,2,3,6,4,5,7,5,6,6,0,7,8,8,9,9,0,10,7,10, %T A373891 0,11,8,9,11,10,11,12,1,13,12,14,0,1,13,15,14,12,16,2,13,14,15,17,16, %U A373891 15,18,3,1,16,19,17,2,17,4,20,18,18,1,19,20,19,21,2,20,3,5 %N A373891 Number of primes less than prime(n) having the same difference between consecutive primes as prime(n). %H A373891 <a href="/index/Pri#gaps">Index entries for primes, gaps between</a> %F A373891 a(n) = |{j < n : A001223(j) = A001223(n)}|. %F A373891 a(n) = A274121(n) - 1. %e A373891 a(7) = 3 because A001223(7) = 2 and also A001223(2) = A001223(3) = A001223(5) = 2. %t A373891 Table[Length[Select[Range[n - 1], Prime[# + 1] - Prime[#] == Prime[n + 1] - Prime[n] &]], {n, 80}] %o A373891 (PARI) a(n) = my(vp = primes(n+1), dvp = vector(#vp-1, k, vp[k+1]-vp[k])); sum(i=1, #dvp-1, dvp[i] == dvp[#dvp]); \\ _Michel Marcus_, Jun 27 2024 %Y A373891 Cf. A000040, A001223, A274121. %K A373891 nonn %O A373891 1,5 %A A373891 _Ilya Gutkovskiy_, Jun 21 2024