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.

A022761 n-th 8k+1 prime plus n-th 8k+7 prime.

This page as a plain text file.
%I A022761 #10 May 26 2020 11:20:06
%S A022761 24,64,104,136,168,192,240,320,384,408,448,480,536,576,616,672,720,
%T A022761 792,816,840,952,1008,1040,1072,1088,1120,1240,1280,1392,1416,1528,
%U A022761 1584,1624,1680,1760,1792,1840,1896,1944,1968,2064,2112,2144,2224
%N A022761 n-th 8k+1 prime plus n-th 8k+7 prime.
%H A022761 Harvey P. Dale, <a href="/A022761/b022761.txt">Table of n, a(n) for n = 1..1000</a>
%e A022761 The first four primes of the form 8k - 1 are 7, 23, 31, 47. The first four primes of the form 8k + 1 are 17, 41, 73, 89.
%e A022761 Thus a(1) = 7 + 17  = 24.
%e A022761 a(2) = 23 + 41 = 64.
%e A022761 a(3) = 31 + 73 = 104.
%e A022761 a(4) = 47 + 89 = 136.
%t A022761 thresh = 100; A007522 = Select[8Range[thresh] - 1, PrimeQ]; A007519 = Select[8Range[thresh] + 1, PrimeQ]; preExh = Min[Length[A007522], Length[A007519]]; Take[A007522, preExh] + Take[A007519, preExh]
%t A022761 Module[{nn=300,p1,p7,len},p1=Select[Prime[Range[nn]],IntegerQ[(#-1)/8]&];p7=Select[Prime[Range[nn]],IntegerQ[(#-7)/8]&];len=Min[ Length[ p1],Length[ p7]];Total/@Thread[{Take[p1,len],Take[p7,len]}]] (* _Harvey P. Dale_, May 26 2020 *)
%Y A022761 Cf. A007522, A007519.
%K A022761 nonn
%O A022761 1,1
%A A022761 _Clark Kimberling_