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.

A013604 a(n) = 3^n - prevprime(3^n), where prevprime(x) is the largest prime < x.

Original entry on oeis.org

1, 2, 4, 2, 2, 2, 8, 8, 2, 20, 16, 58, 22, 8, 16, 98, 10, 10, 14, 8, 4, 2, 20, 28, 20, 20, 26, 22, 14, 26, 4, 34, 52, 56, 28, 10, 2, 10, 58, 38, 2, 122, 74, 34, 22, 22, 46, 44, 50, 46, 16, 124, 4, 10, 106, 10, 26, 220, 38, 160, 74, 8, 28, 104, 104, 38, 298, 94, 16
Offset: 1

Views

Author

James Kilfiger (mapdn(AT)csv.warwick.ac.uk)

Keywords

Crossrefs

Programs

  • Magma
    [3^n-PreviousPrime(3^n): n in [1..70]]; // Vincenzo Librandi, Sep 16 2016
    
  • Maple
    seq(3^i-prevprime(3^i),i=1..100);
  • Mathematica
    Table[3^i - NextPrime[3^i, - 1], {i, 70}] (* Vincenzo Librandi, Sep 16 2016 *)
  • PARI
    a(n) = 3^n - precprime(3^n-1); \\ Michel Marcus, Sep 16 2016

Formula

a(n) = A049711(3^n) = A049711(A000244(n)). - Michel Marcus, Sep 16 2016