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.

A297996 a(1)=2, a(2)=3, a(3)=5 and a(n) = (a(1) + a(2) + a(3) + ... + a(n-1))/a(n-1).

Original entry on oeis.org

2, 3, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 9, 13, 10, 14, 11, 15, 12, 16, 13, 17, 14, 18, 15, 19, 16, 20, 17, 21, 18, 22, 19, 23, 20, 24, 21, 25, 22, 26, 23, 27, 24, 28, 25, 29, 26, 30, 27, 31, 28, 32, 29, 33, 30, 34, 31, 35, 32, 36, 33, 37, 34, 38, 35
Offset: 1

Views

Author

Mateusz Pasternak, Jan 10 2018

Keywords

Crossrefs

Cf. A168230.

Programs

  • Mathematica
    Nest[Append[#, Total[#]/Last[#]] &, Prime@ Range@ 3, 67] (* Michael De Vlieger, Jan 10 2018 *)
    LinearRecurrence[{1,1,-1},{2,3,5,2,6},70] (* Harvey P. Dale, Dec 31 2021 *)
  • PARI
    lista(nn) = {va = vector(nn); for (n=1, 3, va[n] = prime(n)); for (n=4, nn, va[n] = sum(k=1, n-1, va[k])/va[n-1];); va;} \\ Michel Marcus, Jan 10 2018
    
  • PARI
    Vec(x*(2 + x - 4*x^3 + 2*x^4) / ((1 - x)^2*(1 + x)) + O(x^100)) \\ Colin Barker, Jan 29 2018

Formula

a(n) = A168230(n+1) for n >= 3.
From Colin Barker, Jan 29 2018: (Start)
G.f.: x*(2 + x - 4*x^3 + 2*x^4) / ((1 - x)^2*(1 + x)).
a(n) = n/2 for n>2 and even.
a(n) = (n+7)/2 for n>2 and odd.
a(n) = a(n-1) + a(n-2) - a(n-3) for n>5.
(End)

Extensions

More terms from Michel Marcus, Jan 10 2018