login
a(n) = sqrt(A347594(n-1)^2 + n^2 + A347594(n)).
5

%I #18 Sep 14 2021 03:56:04

%S 2,3,4,8,14,28,21,33,65,50,97,73,14,30,32,22,18,32,31,32,53,68,50,43,

%T 55,100,112,154,135,226,449,832,640,194,382,302,509,665,1213,905,213,

%U 43,57,113,49,99,126,217,269,269,173,116,153,161,212,309,540,1057,863,1690,3157,2593,1343,1401,1506,1797,2829,1170,87

%N a(n) = sqrt(A347594(n-1)^2 + n^2 + A347594(n)).

%H Seiichi Manyama, <a href="/A347754/b347754.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = floor(sqrt(A347594(n-1)^2 + n^2)) + 1.

%t b[0]=1;b[m_]:=b[m]=(k=1;While[!IntegerQ@Sqrt[b[m-1]^2+m^2+k],k++];k);

%t a[n_]:=a[n]=Sqrt[b[n-1]^2+n^2+b[n]];Array[a,100] (* _Giorgos Kalogeropoulos_, Sep 12 2021 *)

%o (Ruby)

%o def A347754(n)

%o s = 1

%o ary = []

%o (1..n).each{|i|

%o j = i * i + s * s

%o k = Math.sqrt(j).floor + 1

%o ary << k

%o s = k * k - j

%o }

%o ary

%o end

%o p A347754(100)

%o (Python)

%o from math import isqrt

%o A347754_list, a = [], 1

%o for n in range(1,10**3):

%o m = a**2+n**2

%o k = isqrt(m)+1

%o a = k**2-m

%o A347754_list.append(k) # _Chai Wah Wu_, Sep 13 2021

%o (PARI) lista(nn) = {my(prec = 1, list=List(), x); for (n=1, nn, my(k = 1); while (!issquare(x = prec^2+n^2+k), k++); listput(list, sqrtint(x)); prec = k;); Vec(list);} \\ _Michel Marcus_, Sep 13 2021

%Y Cf. A347594.

%K nonn

%O 1,1

%A _Seiichi Manyama_, Sep 12 2021