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.

A075899 Primes of the form 3^n + n^2.

Original entry on oeis.org

13, 97, 59149, 31381060093, 12157665459056930401
Offset: 1

Views

Author

Zak Seidov, Oct 17 2002

Keywords

Comments

The next term (a(6)) has 146 digits; a(7) has 755 digits. - Harvey P. Dale, May 21 2013

Crossrefs

Cf. A075898 (for the corresponding n).

Programs

  • Mathematica
    f[n_]:=3^n+n^2; lst={};Do[If[PrimeQ[f[n]],AppendTo[lst,f[n]]],{n,3*5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 24 2009 *)
    Select[Table[3^n+n^2,{n,0,2000}],PrimeQ] (* Harvey P. Dale, May 21 2013 *)
  • PARI
    list(lim)=my(v=List(),t); forstep(n=2,logint(lim\1,3),2, if(ispseudoprime(t=3^n+n^2) && t<=lim, listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Sep 14 2015
    
  • PARI
    is(n)=my(e=logint(n,3)); e%2==0 && n==3^e+e^2 && isprime(n) \\ Charles R Greathouse IV, Sep 14 2015

Extensions

a(6) (moved to b-file) from Vladimir Joseph Stephan Orlovsky, Jul 24 2009