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.

A258326 a(1) = 3; for n > 1, a(n) = a(n-1) + prime(n+2) - 2*prime(n+1) + 2*prime(n) - prime(n-1).

Original entry on oeis.org

3, 4, 8, 8, 14, 14, 20, 24, 24, 34, 34, 38, 44, 48, 52, 54, 64, 64, 68, 76, 76, 84, 90, 92, 98, 104, 104, 110, 122, 116, 132, 132, 146, 140, 154, 156, 160, 168, 172, 174, 188, 182, 194, 194, 208, 210, 214, 224, 230, 234, 234, 248, 246, 256, 262, 264, 274, 274
Offset: 1

Views

Author

Gionata Neri, May 26 2015

Keywords

Comments

Conjecture: except for a(3)=8 and a(8)=24, this is the same as A073271.

Programs

  • Mathematica
    f[n_] := Block[{a = {3}}, g[x_] := a[[x - 1]] + Prime[x + 2] - 2 Prime[x + 1] + 2 Prime@ x - Prime[x - 1]; Do[AppendTo[a, g@ k], {k, 2, n}]; a]; f@ 60 (* Michael De Vlieger, Jun 02 2015 *)
    RecurrenceTable[{a[1]==3,a[n]==a[n-1]+Prime[n+2]-2Prime[n+1]+2Prime[n]-Prime[n-1]},a,{n,60}] (* Harvey P. Dale, Mar 25 2019 *)
  • PARI
    v=[3];n=2;while(n<50,v=concat(v,v[#v]+prime(n+2) - 2*prime(n+1)+2*prime(n)-prime(n-1));n++);v \\ Derek Orr, May 30 2015

Formula

For n>1, a(n) = a(n-1) - A062234(n+1) + A062234(n). - Michel Marcus, May 31 2015