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.

A228669 Numbers k for which sum{prime(2*k) - prime(2*k-1)} is prime.

This page as a plain text file.
%I A228669 #6 Jul 26 2018 09:26:45
%S A228669 2,3,4,5,6,9,14,16,19,21,23,25,26,27,32,34,35,36,37,38,43,44,49,50,55,
%T A228669 63,64,65,70,73,76,81,96,101,107,113,121,126,129,132,135,145,147,152,
%U A228669 154,157,158,160,161,166,171,174,176,179,180,183,187,196,197
%N A228669 Numbers k for which sum{prime(2*k) - prime(2*k-1)} is prime.
%H A228669 Harvey P. Dale, <a href="/A228669/b228669.txt">Table of n, a(n) for n = 1..1000</a>
%e A228669 a(6) = 9 because 3-2 + 7-5 + 13-11 + 19-17 + 29-23 + 37-31 = 19 =
%e A228669 A077133(6) is a prime.
%t A228669 z = 300; f[n_] := Sum[Prime[2 k] - Prime[2 k - 1], {k, 1, n}]
%t A228669 Table[f[n], {n, 1, z}]  (* A077133 *)
%t A228669 g[n_] := If[PrimeQ[f[n]], 1, 0]; t = Table[g[n], {n, 1, z}]; Flatten[Position[t, 1]]
%t A228669 Position[Accumulate[#[[2]]-#[[1]]&/@Partition[Prime[Range[400]],2]], _?PrimeQ]//Flatten (* _Harvey P. Dale_, Jul 26 2018 *)
%Y A228669 Cf. A077133.
%K A228669 nonn
%O A228669 1,1
%A A228669 _Clark Kimberling_, Oct 01 2013