The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A351871 a(1) = 1, a(2) = 2; a(n) = gcd(a(n-1), a(n-2)) + (a(n-1) + a(n-2))/gcd(a(n-1), a(n-2)). 6
 1, 2, 4, 5, 10, 8, 11, 20, 32, 17, 50, 68, 61, 130, 192, 163, 356, 520, 223, 744, 968, 222, 597, 276, 294, 101, 396, 498, 155, 654, 810, 250, 116, 185, 302, 488, 397, 886, 1284, 1087, 2372, 3460, 1462, 2463, 3926, 6390, 5160, 415, 1120, 312, 187, 500, 688, 301, 66, 368, 219, 588, 272, 219, 492, 240, 73, 314, 388 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS After the first 277 terms, the sequence values repeat periodically with a period of 2901. The maximum value of a(n) is 2269429312765395470820, whose first occurrence appears at n = 2006. Changing the initial terms a(1) and a(2) generates other periodic sequences. The periods found empirically are 3, 9, 155, 2901. It is not known whether the number of possible periods is finite. Manuel Valdivia informs me that the possible periods 53 and 84 mentioned earlier are in fact impossible. - N. J. A. Sloane, Sep 08 2022 Comments from Robert Gerbicz Sep 18 2022 (Start) Let a(1), a(2) be the first two (positive) integers, and for n>2 define a(n)=g+(a(n-1)+(a-2))/g, where g=gcd(a(n-1),a(n-2)). If a(1) and a(2) are odd then it is easy to see that all numbers in the sequence are odd. If a(1) or a(2) is even, then by induction out of every two consecutive numbers in the sequence at least one of them is even. This partitions the sequences into two groups. Conjecture: In the first group the sequence always goes to infinity (as in A355898), and in the second group it always goes to a cycle (as in the present sequence). Here are three more cycle lengths: For a(1)=52, a(2)=378 the sequence starts with: 52, 378, 217, 92, 310, 203, 514, 718, 618, 670, 646, 660, 655, 268, 924, 302, 615, 918, 514, 718, ... and has a cycle length of 12, starting at 514. For a(1)=264, a(2)=1037 the sequence starts with 264, 1037, 1302, 2340, 613, 2954, 3568, 3263, 6832, 10096, 1074, 5587, 6662, 12250, 9458, 10856, 10159, 21016, 31176, 6532, 9431, 15964, 25396, 10344, 8939, 19284, 28224, 3971, 32196, 36168, 5709, 1302, 2340, ... and has a cycle length of 29, starting at 1302. for a(1)=542, a(2)=6017 the cycle has length 802 and the maximum term is 557981456058. (End) LINKS Augusto Santi, Table of n, a(n) for n = 1..10000 Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^15, with red showing records, demonstrating periodicity. Augusto Santi, A singular variant of the OEIS sequence A349576, Mathematics Stack Exchange, 2022. Index entries for linear recurrences with constant coefficients, order 2901. FORMULA For n >= 278, a(2901 + n) = a(n). EXAMPLE a(3) = gcd(1,2) + (1+2)/gcd(1,2) = 1 + 3/1 = 4. a(4) = gcd(2,4) + (2+4)/gcd(2,4) = 2 + 6/2 = 5. a(5) = gcd(4,5) + (4+5)/gcd(4,5) = 1 + 9/1 = 10. a(6) = gcd(5,10) + (5+10)/gcd(5,10) = 5 + 15/5 = 8. ... a(3179) = a(2901 + 278) = a(278) = 40. MAPLE A351871 := proc(u, v, M) local n, r, s, g, t, a; a:=[u, v]; r:=u; s:=v; for n from 1 to M do g:=gcd(r, s); t:=g+(r+s)/g; a:=[op(a), t]; r:=s; s:=t; od; a; end proc; A351871(1, 2, 100); # N. J. A. Sloane, Sep 01 2022 MATHEMATICA a[1] = 1; a[2] = 2; a[n_] := a[n] = GCD[a[n - 1], a[n - 2]] + (a[n - 1] + a[n - 2])/GCD[a[n - 1], a[n - 2]]; Array[a, 50] (* Amiram Eldar, Feb 24 2022 *) PROG (Python) from math import gcd a, terms = [1, 2], 65 [a.append(gcd(a[-1], a[-2]) + (a[-1] + a[-2])//gcd(a[-1], a[-2])) for n in range(3, terms+1)] print(a) # Michael S. Branicky, Sep 01 2022 (PARI) {a351871(N=65, A1=1, A2=2)= my(a=vector(N)); a[1]=A1; a[2]=A2; for(n=1, N, if(n>2, my(g=gcd(a[n-1], a[n-2])); a[n]=g+(a[n-1]+a[n-2])/g); print1(a[n], ", ")) } \\ Ruud H.G. van Tol, Sep 19 2022 CROSSREFS Cf. A349576, A349982, A355898, A355914 (the successive gcds). Sequence in context: A245512 A232616 A125728 * A276608 A173660 A353384 Adjacent sequences: A351868 A351869 A351870 * A351872 A351873 A351874 KEYWORD nonn,easy AUTHOR Augusto Santi, Feb 22 2022 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 26 15:32 EDT 2023. Contains 365660 sequences. (Running on oeis4.)