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.

A124065 Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.

This page as a plain text file.
%I A124065 #32 Sep 08 2022 08:45:28
%S A124065 9,24,30,39,54,75,129,144,165,186,201,234,261,264,324,336,339,375,390,
%T A124065 396,420,441,459,471,516,534,600,621,654,660,690,705,735,795,819,849,
%U A124065 870,891,936,945,1011,1029,1125,1155,1179,1215,1221,1251,1284,1395,1419
%N A124065 Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.
%H A124065 Amiram Eldar, <a href="/A124065/b124065.txt">Table of n, a(n) for n = 1..10000</a>
%e A124065 9 is in the sequence since 8*9 - 1 = 71 and 8*9 + 1 = 73 are twin primes.
%t A124065 Select[Range[1500], And @@ PrimeQ[{-1, 1} + 8# ] &] (* _Ray Chandler_, Nov 16 2006 *)
%o A124065 (Magma) [n: n in [1..2000] | IsPrime(8*n+1) and IsPrime(8*n-1)] // _Vincenzo Librandi_, Mar 08 2010
%o A124065 (Python)
%o A124065 from sympy import isprime
%o A124065 def ok(n): return isprime(8*n - 1) and isprime(8*n + 1)
%o A124065 print(list(filter(ok, range(1420)))) # _Michael S. Branicky_, Sep 24 2021
%Y A124065 Intersection of A005122 and A005123.
%Y A124065 Cf. A040040, A045753, A002822, A124518, A124519, A124520, A124521, A124522, A063983.
%K A124065 nonn
%O A124065 1,1
%A A124065 _Artur Jasinski_, Nov 04 2006
%E A124065 Extended by _Ray Chandler_, Nov 16 2006