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.

A124199 Primes of the form k(k+1)/2-2 (i.e., two less than triangular numbers).

This page as a plain text file.
%I A124199 #17 Sep 19 2022 04:53:46
%S A124199 13,19,43,53,89,103,151,229,251,349,433,463,593,701,739,859,1033,1223,
%T A124199 1429,1483,1709,1889,1951,2143,2699,3001,3079,3319,3739,4003,4093,
%U A124199 4463,4751,5563,5669,6553,7019,7873,8513,9043,10009,10151,10729,11173,11779
%N A124199 Primes of the form k(k+1)/2-2 (i.e., two less than triangular numbers).
%C A124199 Equal to primes of the form (k^2-17)/8. Also equal to primes p such that 8*p+17 is a square. - _Chai Wah Wu_, Jul 14 2014
%H A124199 Chai Wah Wu, <a href="/A124199/b124199.txt">Table of n, a(n) for n = 1..2000</a>.
%e A124199 The (first five triangular numbers)-2 are: -1,1,4,8,13. So a(1)=13 is the first prime of this form.
%t A124199 Pick[ #1, PrimeQ[ #1]]&[((1/2)*#1*(#1 + 1) - 2 & ) /@ Range[180]]
%t A124199 Select[Accumulate[Range[250]]-2,PrimeQ] (* _Harvey P. Dale_, Jun 07 2020 *)
%o A124199 (Python)
%o A124199 import sympy
%o A124199 [n*(n+1)/2-2 for n in range(10**6) if isprime(n*(n+1)/2-2)] # _Chai Wah Wu_, Jul 14 2014
%o A124199 (PARI) isok(p) = isprime(p) && ispolygonal(p+2, 3); \\ _Michel Marcus_, Sep 19 2022
%Y A124199 Cf. A055472.
%K A124199 easy,nonn
%O A124199 1,1
%A A124199 Peter Pein (petsie(AT)dordos.net), Dec 07 2006