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.

A357218 Primes p such that T(p) - 2 is prime, where T(p) is the triangular number (A000217) with index p.

This page as a plain text file.
%I A357218 #28 Sep 21 2022 01:38:23
%S A357218 5,13,17,29,37,41,53,61,73,89,97,149,157,193,197,233,257,269,277,281,
%T A357218 313,337,389,401,409,457,509,521,541,613,641,673,701,797,857,877,881,
%U A357218 929,953,997,1009,1033,1093,1109,1117,1129,1153,1193,1297,1301,1373,1381,1433,1481,1493
%N A357218 Primes p such that T(p) - 2 is prime, where T(p) is the triangular number (A000217) with index p.
%C A357218 T(p) must be odd, so these primes p satisfy p == 1 (mod 4) (A002144).
%C A357218 Corresponding values of T(p)-2 are in A357219.
%C A357218 The first eleven primes == 1 (mod 4) are terms. The smallest Pythagorean prime that is not a term is A002144(12) = 101 because T(101) = 5151 and 5151 - 2 = 5149 = 19 * 271 (see Wells reference).
%D A357218 David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, Penguin Books, London, England, 1997, entry 496, page 142.
%e A357218 T(5) - 2 = 5*6/2 - 2 = 13, hence 5 is a term.
%p A357218 filter := p -> isprime(p) and irem(p-1, 4) = 0 and isprime(p*(p+1)/2 -2) : select(filter, [$1 .. 1500]);
%t A357218 Select[Prime[Range[240]], PrimeQ[#*(# + 1)/2 - 2] &] (* _Amiram Eldar_, Sep 18 2022 *)
%Y A357218 Cf. A000217, A231847, A357219.
%Y A357218 Subsequence of A002144.
%K A357218 nonn
%O A357218 1,1
%A A357218 _Bernard Schott_, Sep 18 2022