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.

A078699 Primes p such that p^2-1 is a triangular number.

This page as a plain text file.
%I A078699 #15 Dec 15 2017 17:36:09
%S A078699 2,11,23,373,12671,901273,19472752251611,
%T A078699 53072032161200090602953513048447623,
%U A078699 5027153581127740201460650182713355379768873,11604855412241025458500993236724193227031777965785837784548351709747881343573
%N A078699 Primes p such that p^2-1 is a triangular number.
%C A078699 Equivalently, primes in A006452.
%C A078699 The sequence of corresponding triangular numbers begins 3, 120, 528, 139128, 160554240, 812293020528, 379188080252621270252095320, ... [_Shreevatsa R_, Jul 12 2013]
%H A078699 Joerg Arndt, <a href="/A078699/b078699.txt">Table of n, a(n) for n = 1..14</a>
%t A078699 a[n_] := a[n]=If[n<4, {1, 2, 4, 11}[[n+1]], 6a[n-2]-a[n-4]]; Select[a/@Range[200], ProvablePrimeQ] (* First do <<NumberTheory`PrimeQ` *)
%o A078699 (PARI) default(primelimit,10^7) istri(n) = t=floor(sqrt(2*n)); if(2*n==t*(t+1),1,0) forprime(p=2,5*10^6,if(istri(p^2-1),print1(p" ")))
%o A078699 (PARI) istriang(n)=issquare(8*n+1);
%o A078699 forprime(p=2,10^10,if(istriang(p^2-1),print1(p,", ")));
%o A078699 \\ _Joerg Arndt_, Jul 15 2013
%o A078699 (PARI)  /* much more efficient: */
%o A078699 N=1166; f=( 1+x-4*x^2-2*x^3 ) / ( (x^2+2*x-1)*(x^2-2*x-1) )+O(x^N);
%o A078699 for(n=0,N-1,my(c=polcoeff(f,n)); if(isprime(c), print1(c,", ")));
%o A078699 \\ _Joerg Arndt_, Jul 15 2013
%Y A078699 Cf. A000217, A006452.
%K A078699 nonn
%O A078699 1,1
%A A078699 _Jason Earls_, Dec 18 2002
%E A078699 Edited by _Dean Hickerson_, Dec 19 2002