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.

A066493 a(n) = least k such that f(k) = n, where f is the prime gaps function given by f(m) = prime(m+1)-prime(m) and prime(m) denotes the m-th prime, if k exists; 0 otherwise.

This page as a plain text file.
%I A066493 #7 Apr 29 2023 14:00:51
%S A066493 1,2,0,4,0,9,0,24,0,34,0,46,0,30,0,282,0,99,0,154,0,189,0,263,0,367,0,
%T A066493 429,0,590,0,738,0,217,0,1183,0,3302,0,2191,0,1879,0,1831,0,7970,0,
%U A066493 3077,0,3427
%N A066493 a(n) = least k such that f(k) = n, where f is the prime gaps function given by f(m) = prime(m+1)-prime(m) and prime(m) denotes the m-th prime, if k exists; 0 otherwise.
%C A066493 Obviously, a(n) = 0 for every odd n except 1. From the list, it appears that a(n) is nonzero for every even n; is this true in general? That is, for each even n, are there primes which differ by n?
%F A066493 a(2*n) = A038664(n). - _Michel Marcus_, Apr 29 2023
%e A066493 a(6) = 9 since k = 9 is the smallest k making prime(k+1)-prime(k) = 6.
%e A066493 a(3) = 0 since no two consecutive primes differ by 3.
%t A066493 f[n_] := Prime[n + 1] - Prime[n]; g[n_] := Min[Select[Range[1, 10^4], f[ # ] == n &]]; Table[g[i], {i, 1, 50}]
%Y A066493 Cf. A001223 (prime gaps), A038664.
%K A066493 nonn
%O A066493 1,2
%A A066493 _Joseph L. Pe_, Jan 03 2002