OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = floor(sqrt(A347594(n-1)^2 + n^2)) + 1.
MATHEMATICA
b[0]=1; b[m_]:=b[m]=(k=1; While[!IntegerQ@Sqrt[b[m-1]^2+m^2+k], k++]; k);
a[n_]:=a[n]=Sqrt[b[n-1]^2+n^2+b[n]]; Array[a, 100] (* Giorgos Kalogeropoulos, Sep 12 2021 *)
PROG
(Ruby)
def A347754(n)
s = 1
ary = []
(1..n).each{|i|
j = i * i + s * s
k = Math.sqrt(j).floor + 1
ary << k
s = k * k - j
}
ary
end
p A347754(100)
(Python)
from math import isqrt
A347754_list, a = [], 1
for n in range(1, 10**3):
m = a**2+n**2
k = isqrt(m)+1
a = k**2-m
A347754_list.append(k) # Chai Wah Wu, Sep 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 12 2021
STATUS
proposed