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.
%I A361672 #7 Mar 25 2023 15:28:36 %S A361672 1,1,5,10,2,1,10,5,24,12,47,71,131,216,72,9,98,49,166,83,270,135,428, %T A361672 107,560,280,867,1175,2071,3276,5378,2689,8100,4050,810,45,892,446, %U A361672 1377,1863,3281,5186,8510,4255,851,37,935,1020,2004,1002,334,167,554,277,886 %N A361672 a(1) = a(2) = 1; for n > 2, a(n) = a(n-2) + a(n-1) + n if a(n-1) and n are coprime, otherwise a(n) = a(n-1)/gcd(a(n-1), n). %t A361672 a[1]=a[2]=1; a[n_]:=a[n]=If[GCD[a[n-1],n]==1,a[n-2]+a[n-1]+n,a[n-1]/GCD[a[n-1],n]]; Array[a,55] (* _Stefano Spezia_, Mar 20 2023 *) %o A361672 (Magma) a:=[1, 1]; for n in [3..50] do if Gcd(a[n-1], n) eq 1 then Append(~a, a[n-2] + a[n-1] + n); else Append(~a, a[n-1] div Gcd(a[n-1], n)); end if; end for; [] cat a; %Y A361672 Cf. A133058, A091508, A133579, A133580, A255051, A255140. %K A361672 nonn,easy %O A361672 1,3 %A A361672 _Hubert W. Westwood_, Mar 20 2023