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.

A081832 a(1)=a(2)=1, a(n) = a(n+1-2*a(n-1)) + a(n-2*a(n-2)).

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22
Offset: 1

Views

Author

Benoit Cloitre, Apr 10 2003

Keywords

Comments

Unlike the Hofstadter Q-sequence, this one seems to be an increasing sequence.
Sequence increases slowly and each term repeats at least three times except at the start. - Altug Alkan, Jun 07 2018

Crossrefs

Cf. A005185.

Programs

  • GAP
    a:=[1,1];; for n in [3..80] do a[n]:=a[n+1-2*a[n-1]]+a[n-2*a[n-2]]; od; a; # Muniru A Asiru, Jun 06 2018
  • Maple
    a:=proc(n) option remember: if n<3 then 1 else procname(n+1-2*procname(n-1))+procname(n-2*procname(n-2)) fi; end; seq(a(n),n=1..80); # Muniru A Asiru, Jun 06 2018
  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = a[n + 1 - 2 a[n - 1]] + a[n - 2 a[n - 2]]; Array[a, 80] (* Robert G. Wilson v, Jun 13 2018 *)

Formula

Conjectures: a(n)/n -> C=1/4; a(n+1)-a(n)=1 or 0, first differences are 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, ....
a(n+1)-a(n)=1 or 0, see Links section for proof. - Altug Alkan, Jun 07 2018