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.

A172072 Numbers k such that either prime(k) - 5/2 +- 7/2 is prime.

This page as a plain text file.
%I A172072 #23 Aug 17 2025 17:49:05
%S A172072 1,5,6,7,8,9,10,12,14,15,16,17,19,21,22,24,27,28,29,30,33,37,38,40,41,
%T A172072 45,46,50,51,52,55,56,57,59,61,65,66,68,71,72,74,75,77,85,87,90,91,97,
%U A172072 101,103,104,106,108,109,111,112,114,118,119,120,124,130,131,134,144
%N A172072 Numbers k such that either prime(k) - 5/2 +- 7/2 is prime.
%C A172072 Also: 1 plus numbers k such that prime(k) - 6 is prime. - _Michael S. Branicky_, Aug 16 2025
%H A172072 Charles R Greathouse IV, <a href="/A172072/b172072.txt">Table of n, a(n) for n = 1..10000</a>
%e A172072 a(1) = 1 because prime(1)-5/2-7/2 = 2-5/2-7/2 = -4 (nonprime) and prime(1)-5/2+7/2 = 2-5/2+7/2 = 3 (prime).
%t A172072 Join[{1}, Select[Range[5, 150], PrimeQ[Prime[#] - 6] &]] (*  _Paolo Xausa_, Aug 17 2025 *)
%o A172072 (PARI) is(n,p=prime(n))=isprime(p-6) || isprime(p+1) \\ _Charles R Greathouse IV_, Jun 13 2017
%o A172072 (Python)
%o A172072 from sympy import isprime, prime
%o A172072 def ok(n): return n == 1 or isprime(prime(n)-6)
%o A172072 print([k for k in range(1, 145) if ok(k)]) # _Michael S. Branicky_, Aug 16 2025
%Y A172072 Cf. A000040, A046117, A172071.
%K A172072 nonn
%O A172072 1,2
%A A172072 _Juri-Stepan Gerasimov_, Jan 25 2010
%E A172072 Corrected (57 inserted) by _R. J. Mathar_, May 02 2010