cp's OEIS Frontend

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.

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

Original entry on oeis.org

2, 3, 4, 8, 14, 28, 21, 33, 65, 50, 97, 73, 14, 30, 32, 22, 18, 32, 31, 32, 53, 68, 50, 43, 55, 100, 112, 154, 135, 226, 449, 832, 640, 194, 382, 302, 509, 665, 1213, 905, 213, 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
Offset: 1

Views

Author

Seiichi Manyama, Sep 12 2021

Keywords

Crossrefs

Cf. A347594.

Programs

  • 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 *)
  • 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
  • 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
    
  • 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)
    

Formula

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