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.

A151573 a(0)=1, a(1)=1; a(2^i + j) = a(j) + 2*a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 1, 3, 7, 3, 7, 17, 13, 3, 7, 17, 13, 17, 41, 43, 19, 3, 7, 17, 13, 17, 41, 43, 19, 17, 41, 43, 47, 99, 127, 81, 25, 3, 7, 17, 13, 17, 41, 43, 19, 17, 41, 43, 47, 99, 127, 81, 25, 17, 41, 43, 47, 99, 127, 81, 53, 99, 127, 137, 245, 353, 289, 131, 31, 3, 7, 17, 13, 17, 41, 43, 19, 17
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Equals A151572 + A151703.

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Maple
    N:= 10: # to get a(0) to a(2^(N+1)-1)
    a[0]:= 1:
    a[1]:= 1:
    for i from 1 to N do
      for j from 0 to 2^i-1 do
        a[2^i+j]:= a[j]+2*a[j+1]
      od
    od:
    seq(a[i],i=0..2^(N+1)-1); # Robert Israel, May 28 2014
  • Mathematica
    a = {1, 1}; Do[AppendTo[a, a[[j]] + 2 a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)