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.

Original entry on oeis.org

24, 64, 104, 136, 168, 192, 240, 320, 384, 408, 448, 480, 536, 576, 616, 672, 720, 792, 816, 840, 952, 1008, 1040, 1072, 1088, 1120, 1240, 1280, 1392, 1416, 1528, 1584, 1624, 1680, 1760, 1792, 1840, 1896, 1944, 1968, 2064, 2112, 2144, 2224
Offset: 1

Views

Author

Keywords

Examples

			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.
Thus a(1) = 7 + 17  = 24.
a(2) = 23 + 41 = 64.
a(3) = 31 + 73 = 104.
a(4) = 47 + 89 = 136.
		

Crossrefs

Programs

  • Mathematica
    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]
    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 *)