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.

A039722 a(1) = 1, a(m+1) = 2*Sum_{k=1..floor((m+1)/2)} a(k).

Original entry on oeis.org

1, 2, 2, 6, 6, 10, 10, 22, 22, 34, 34, 54, 54, 74, 74, 118, 118, 162, 162, 230, 230, 298, 298, 406, 406, 514, 514, 662, 662, 810, 810, 1046, 1046, 1282, 1282, 1606, 1606, 1930, 1930, 2390, 2390, 2850, 2850, 3446, 3446, 4042, 4042, 4854, 4854, 5666, 5666, 6694
Offset: 1

Views

Author

Leroy Quet, Dec 11 1999

Keywords

Examples

			a(6) = 2*(a(1)+a(2)+a(3)) = 2*(1+2+2) = 10.
		

Crossrefs

Cf. A039721 (similar definition).

Programs

  • Mathematica
    Fold[Append[#1, 2 Total[#1[[Range[Floor[#2/2] ] ]] ] ] &, {1}, Range[2, 52]] (* Michael De Vlieger, Dec 11 2017 *)
  • PARI
    lista(nn) = {v = vector(nn); v[1] = 1; for (n=2, nn, v[n] = 2*sum(k=1, n\2, v[k]);); v;} \\ Michel Marcus, May 18 2014

Formula

a(1)=1, a(2)=2, a(2m+1)=a(2m), a(2m+2)=a(2m+1)+2a(m+1) {m is a positive integer.}

Extensions

More terms from Michel Marcus, May 18 2014