login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078699 Primes p such that p^2-1 is a triangular number. 2
2, 11, 23, 373, 12671, 901273, 19472752251611, 53072032161200090602953513048447623, 5027153581127740201460650182713355379768873, 11604855412241025458500993236724193227031777965785837784548351709747881343573 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Equivalently, primes in A006452.
The sequence of corresponding triangular numbers begins 3, 120, 528, 139128, 160554240, 812293020528, 379188080252621270252095320, ... [Shreevatsa R, Jul 12 2013]
LINKS
MATHEMATICA
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` *)
PROG
(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" ")))
(PARI) istriang(n)=issquare(8*n+1);
forprime(p=2, 10^10, if(istriang(p^2-1), print1(p, ", ")));
\\ Joerg Arndt, Jul 15 2013
(PARI) /* much more efficient: */
N=1166; f=( 1+x-4*x^2-2*x^3 ) / ( (x^2+2*x-1)*(x^2-2*x-1) )+O(x^N);
for(n=0, N-1, my(c=polcoeff(f, n)); if(isprime(c), print1(c, ", ")));
\\ Joerg Arndt, Jul 15 2013
CROSSREFS
Sequence in context: A342185 A217309 A115374 * A291679 A239741 A042347
KEYWORD
nonn
AUTHOR
Jason Earls, Dec 18 2002
EXTENSIONS
Edited by Dean Hickerson, Dec 19 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)