login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371216
a(0) = 1, a(1) = 1; for n >= 2, a(n) = Min(a(n - 1), a(n - 2)) + GCD(a(n - 1), n - 1).
0
1, 1, 2, 3, 5, 4, 5, 5, 6, 7, 7, 8, 8, 12, 9, 10, 14, 12, 13, 13, 14, 15, 17, 16, 17, 17, 18, 19, 19, 20, 20, 30, 21, 22, 32, 24, 25, 25, 26, 27, 29, 28, 29, 29, 30, 31, 31, 32, 32, 48, 33, 34, 50, 36, 37, 37, 38, 39, 41, 40, 41, 41, 42, 43, 43, 44, 44, 66, 45, 46, 68
OFFSET
0,3
COMMENTS
The plots of a(n) and a(n) - a(n-1) are interesting. Empirically 2*n/3 <= a(n) <= (n-1) and 2/3 <= a(n)/a(n-1) <= 3/2.
EXAMPLE
a(0) = 1;
a(1) = 1;
a(2) = Min(1, 1) + GCD(1, 1) = 2;
a(3) = Min(2, 1) + GCD(2, 2) = 3;
a(4) = Min(3, 2) + GCD(3, 3) = 5;
and so on.
MATHEMATICA
a[0] = a[1] = 1; a[n_] := a[n] = Min[a[n - 1], a[n - 2]] + GCD[a[n - 1], n - 1]; Array[a, 100, 0] (* Amiram Eldar, Mar 15 2024 *)
CROSSREFS
Cf. A364918.
Sequence in context: A321782 A104204 A131296 * A267808 A239852 A263279
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Mar 15 2024
STATUS
approved