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.

A144231 Prime numbers of the form 3^k +- 2 for k >= 1.

Original entry on oeis.org

5, 7, 11, 29, 79, 83, 241, 727, 6563, 19681, 59051, 4782971, 14348909, 31381059607, 282429536483, 2541865828331, 150094635296999123, 450283905890997361, 36472996377170786401, 1144561273430837494885949696429
Offset: 1

Views

Author

Reikku Kulon, Sep 15 2008

Keywords

Comments

a(49) = 3^2224 - 2 and a(50) = 3^2521 - 2 are too big for a b-file. - Robert Israel, Nov 22 2015

Crossrefs

Programs

  • Maple
    A:= NULL:
    for k from 1 to 1000 do
      t:= 3^k;
      if isprime(t-2) then A:= A, t-2 fi;
      if isprime(t+2) then A:= A, t+2 fi;
    od:
    A; # Robert Israel, Nov 22 2015
  • Mathematica
    Reap[For[k = 1, k <= 100, k++, p = 3^k-2; If[PrimeQ[p], Sow[p]]; If[PrimeQ[p+4], Sow[p+4]]]][[2, 1]] (* Jean-François Alcover, Dec 18 2013 *)