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.

A113605 a(1) = a(2) = a(3) = 1; a(n) = a(n-3) + gcd(a(n-1), a(n-2)).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 5, 4, 4, 9, 5, 5, 14, 6, 7, 15, 7, 8, 16, 15, 9, 19, 16, 10, 21, 17, 11, 22, 28, 13, 23, 29, 14, 24, 31, 15, 25, 36, 16, 29, 37, 17, 30, 38, 19, 49, 39, 20, 50, 49, 21, 57, 52, 22, 59, 53, 23, 60, 54, 29, 61, 55, 30, 66, 61, 31, 67, 62, 32, 69, 63, 35, 76, 64
Offset: 1

Views

Author

Leroy Quet, Jan 26 2006

Keywords

Examples

			a(16) = a(13) + gcd(a(15), a(14)) = 5 + gcd(6,14) = 7.
		

Programs

  • Maple
    a[1]:=1: a[2]:=1: a[3]:=1: for n from 4 to 100 do a[n]:=a[n-3]+gcd(a[n-1],a[n-2]) od: seq(a[n],n=1..90); # Emeric Deutsch, Feb 01 2006
  • Mathematica
    a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[n - 3] + GCD[a[n - 1], a[n - 2]]; Array[a, 75] (* Robert G. Wilson v *)
    nxt[{a_,b_,c_}]:={b,c,a+GCD[b,c]}; Transpose[NestList[nxt,{1,1,1},80]] [[1]] (* Harvey P. Dale, Sep 02 2015 *)

Extensions

More terms from Robert G. Wilson v and Emeric Deutsch, Feb 01 2006