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.

A181428 a(n) = prime(n+2) + prime(n+1) - prime(n).

Original entry on oeis.org

6, 9, 13, 17, 19, 23, 25, 33, 37, 39, 47, 47, 49, 57, 65, 67, 69, 77, 77, 81, 89, 93, 103, 109, 107, 109, 113, 115, 131, 145, 141, 145, 151, 161, 159, 169, 173, 177, 185, 187, 193, 203, 199, 203, 213, 235, 239, 233, 235, 243, 247, 253, 267, 269, 275, 277, 279, 287, 287, 295, 317, 325, 317, 319, 335, 351, 353
Offset: 1

Views

Author

Amir H. Farrahi, Jan 29 2011

Keywords

Programs

  • Maple
    A181428 := proc(n)
        ithprime(n+1)-ithprime(n)+ithprime(n+2) ;
    end proc:
    seq(A181428(n),n=1..80) ; # R. J. Mathar, Sep 10 2016
  • Mathematica
    #[[3]]+#[[2]]-#[[1]]&/@Partition[Prime[Range[100]],3,1]  (* Harvey P. Dale, Feb 01 2011 *)
    ListConvolve[{1, 1, -1}, Prime[Range[100]]]
  • PARI
    first(n)=my(v=primes(n+2)); for(k=1,n, v[k]=v[k+2]+v[k+1]-v[k]); v[1..n] \\ Charles R Greathouse IV, Feb 23 2017