OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (n+1) / A135506(n).
MATHEMATICA
MapIndexed[GCD[First[#2] + 1, #1] &, RecurrenceTable[{a[1] == 1, a[n] == a[n - 1] + LCM[a[n - 1], n]}, a, {n, 87}] ] (* Michael De Vlieger, May 11 2023 *)
PROG
(PARI)
up_to = 65537;
A361470list(up_to_n) = { my(v=vector(up_to), x1=1, x2); for(n=2, 1+up_to_n, x2 = x1+lcm(x1, n); v[n-1] = gcd(x1, n); x1=x2); (v); };
v361470 = A361470list(up_to);
A361470(n) = v361470[n];
(Python)
from math import gcd
from itertools import count, islice
def A361470_gen(): # generator of terms
x = 1
for n in count(2):
yield (y:=gcd(x, n))
x += x*n//y
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 26 2023
STATUS
approved