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.

A336238 a(1) = 3; if n>1, and gcd(a(n-1), n) > 1 then a(n) = a(n-1)/gcd(a(n-1), n), otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

3, 5, 8, 2, 7, 13, 20, 5, 14, 7, 18, 3, 16, 8, 23, 39, 56, 28, 47, 67, 88, 4, 27, 9, 34, 17, 44, 11, 40, 4, 35, 67, 100, 50, 10, 5, 42, 21, 7, 47, 88, 44, 87, 131, 176, 88, 135, 45, 94, 47, 98, 49, 102, 17, 72, 9, 3, 61, 120, 2, 63, 125, 188, 47, 112, 56, 123, 191
Offset: 1

Views

Author

Todor Szimeonov, Jul 13 2020

Keywords

Crossrefs

Cf. A093178.

Programs

  • PARI
    a(n) = if (n==1, 3, my(prec=a(n-1)); if (gcd(prec, n) > 1, prec/gcd(prec,n), n+prec)); \\ Michel Marcus, Jul 13 2020