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.

A134736 a(1) = 5; for n >1, a(n) = a(n-1) + gcd(n, a(n-1)).

Original entry on oeis.org

5, 6, 9, 10, 15, 18, 19, 20, 21, 22, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 141, 144, 145, 150, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168
Offset: 1

Views

Author

N. J. A. Sloane, Jan 28 2008

Keywords

References

  • Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc., 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).

Crossrefs

See A106108 for other cross-references.
Cf. A230504, A134743 (first differences), A084662, A084663.

Programs

  • Haskell
    a134736 n = a134736_list !! (n-1)
    a134736_list =
       5 : zipWith (+) a134736_list (zipWith gcd a134736_list [2..])
    -- Reinhard Zumkeller, Nov 15 2013
  • Mathematica
    a[1] = 5; a[n_] := a[n] = a[n-1] + GCD[n, a[n-1]];
    Array[a, 66] (* Jean-François Alcover, Oct 01 2018 *)
    RecurrenceTable[{a[1]==5,a[n]==a[n-1]+GCD[n,a[n-1]]},a,{n,70}] (* Harvey P. Dale, Nov 24 2018 *)