[go: up one dir, main page]

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”).

A260815 revision #30

A260815
a(2) = 3; for n >= 3, a(n) = a(n-1) + gcd(n, a(n-1))^2.
2
3, 12, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 575, 576, 577, 578, 579, 580, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612
OFFSET
2,1
COMMENTS
The first differences of a(n) are all squares.
LINKS
EXAMPLE
a(3) = 3 + gcd(3, 3)^2 = 3 + 9 = 12.
a(4) = 12 + gcd(4, 12)^2 = 12 + 16 = 28.
a(5) = 28 + gcd(5, 28)^2 = 28 + 1 = 29.
MAPLE
N:= 100: # for a(2)..a(N)
A:= Array(2..N):
A[2]:= 3:
for n from 3 to N do
A[n]:= A[n-1]+igcd(n, A[n-1])^2
od:
seq(A[i], i=2..N); # Robert Israel, Apr 13 2021
MATHEMATICA
Nest[Append[#1, #1[[-1]] + GCD[#2, #1[[-1]]]^2] & @@ {#, Length[#] + 2} &, {3}, 50] (* Michael De Vlieger, Apr 13 2021 *)
PROG
(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);
CROSSREFS
Sequence in context: A216713 A133647 A009222 * A083543 A083538 A060781
KEYWORD
nonn,look
AUTHOR
STATUS
approved