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 A260815 #30 Sep 08 2022 08:46:13 %S A260815 3,12,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,575, %T A260815 576,577,578,579,580,1421,1422,1423,1424,1425,1426,1427,1428,1429, %U A260815 1430,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612 %N A260815 a(2) = 3; for n >= 3, a(n) = a(n-1) + gcd(n, a(n-1))^2. %C A260815 The first differences of a(n) are all squares. %H A260815 Robert Israel, <a href="/A260815/b260815.txt">Table of n, a(n) for n = 2..10000</a> %e A260815 a(3) = 3 + gcd(3, 3)^2 = 3 + 9 = 12. %e A260815 a(4) = 12 + gcd(4, 12)^2 = 12 + 16 = 28. %e A260815 a(5) = 28 + gcd(5, 28)^2 = 28 + 1 = 29. %p A260815 N:= 100: # for a(2)..a(N) %p A260815 A:= Array(2..N): %p A260815 A[2]:= 3: %p A260815 for n from 3 to N do %p A260815 A[n]:= A[n-1]+igcd(n,A[n-1])^2 %p A260815 od: %p A260815 seq(A[i],i=2..N); # _Robert Israel_, Apr 13 2021 %t A260815 Nest[Append[#1, #1[[-1]] + GCD[#2, #1[[-1]]]^2] & @@ {#, Length[#] + 2} &, {3}, 50] (* _Michael De Vlieger_, Apr 13 2021 *) %o A260815 (Magma) I:=[0, 3]; Remove([n le 2 select I[n] else Self(n-1)+Gcd(n, Self(n-1))^2: n in [1..52]], 1); %Y A260815 Cf. A167195, A343402. %K A260815 nonn,look %O A260815 2,1 %A A260815 _Arkadiusz Wesolowski_, Jul 31 2015