A355900 Indices of records in A355899.
1, 5, 10, 33, 51, 84, 107, 849
Offset: 1
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.
nn = 2^16; j = k = r = 1; {1}~Join~Reap[Do[m = # + (j + k)/# &@ GCD[j, k]; If[# > r, r = #; Sow[r]] &[GCD[k, m]]; j = k; k = m, {n, 3, nn}]][[-1, -1]] (* Michael De Vlieger, Sep 03 2022 *)
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,1,100);
Nest[Append[#1, #3 + Total[#2]/#3] & @@ {#1, #2, GCD @@ #2} & @@ {#, #[[-2 ;; -1]], GCD[#[[-2 ;; -1]]]} &, {1, 1}, 48] (* Michael De Vlieger, Sep 03 2022 *)
{a355898(N=50,A1=1,A2=1)= 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
from math import gcd from itertools import islice def A355898_gen(): # generator of terms yield from (a:=(1,1)) while True: yield (a:=(a[1],(b:=gcd(*a))+sum(a)//b))[1] A355898_list = list(islice(A355898_gen(),30)) # Chai Wah Wu, Sep 01 2022
from math import gcd from itertools import islice def agen(): a = [1, 2] while True: g = gcd(*a); yield g; a = [a[-1], g + sum(a)//g] print(list(islice(agen(), 85))) # Michael S. Branicky, Sep 19 2022
Comments