login
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.
0
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,1
PROG
(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
CROSSREFS
Cf. A093178.
Sequence in context: A181910 A367453 A222494 * A181918 A010617 A016659
KEYWORD
nonn,easy
AUTHOR
Todor Szimeonov, Jul 13 2020
STATUS
approved