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.

Showing 1-5 of 5 results.

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.

A347595 a(0) = 1; for n>0, a(n) is the smallest positive integer that has not previously occurred such that a(n-1)^2 + n^2 + a(n) is a square.

Original entry on oeis.org

1, 2, 8, 27, 39, 54, 73, 98, 133, 186, 273, 426, 709, 1250, 2305, 4386, 8517, 16746, 33169, 65978, 131557, 262674, 524865, 1049202, 2097829, 4195034, 8389393, 16778058, 33555333, 67109826, 134218753, 268436546, 536872069, 1073743050, 2147484945, 4294968666, 8589936037, 17179870706
Offset: 0

Views

Author

Scott R. Shannon, Sep 08 2021

Keywords

Comments

This sequence uses the same rules as A347594 except here all numbers must be unique. Up to 10^5 terms all terms are larger than the previous term; it is unknown if this holds for all terms as n->infinity.

Examples

			a(1) = 2 as a(0)^2 + 1^2 = 1 + 1 = 2, and 2 + 2 = 4 = 2^2 is the next smallest square.
a(2) = 8 as a(1)^2 + 2^2 = 4 + 4 = 8, and 8 + 8 = 16 = 4^2. Note that although 8 + 1 = 9 = 3^2, 1 cannot be chosen as a(0) = 1.
a(3) = 27 as a(2)^2 + 3^2 = 64 + 9 = 73 and 73 + 27 = 100 = 10^2.  Note that although 73 + 8 = 81 = 9^2, 8 cannot be chosen as a(2) = 8.
a(4) = 39 as a(3)^2 + 4^2 = 729 + 16 = 745, and 745 + 39 = 784 = 28^2 is the next smallest square.
		

Crossrefs

A349119 a(0) = 1; for n>0, a(n) is the smallest positive integer that has not previously occurred such that |n - a(n-1)| + a(n) is a square.

Original entry on oeis.org

1, 4, 2, 3, 8, 6, 9, 7, 15, 10, 16, 11, 24, 5, 27, 13, 22, 20, 14, 31, 25, 12, 26, 33, 40, 21, 44, 19, 55, 23, 18, 36, 32, 35, 48, 51, 34, 46, 17, 42, 47, 30, 37, 43, 63, 82, 28, 45, 61, 52, 62, 38, 50, 78, 57, 79, 41, 65, 29, 70, 39, 59, 97, 66, 98, 67, 80, 68, 49, 101, 69, 119, 53, 124, 71, 60
Offset: 0

Views

Author

Scott R. Shannon, Nov 08 2021

Keywords

Examples

			a(1) = 4 as |1 - a(0)| = |1 - 1| = 0, and 0 + 4 = 4 = 2^2 is the next smallest square. Note a(1) cannot be 1 as a(0) = 1.
a(4) = 8 as |4 - a(3)| = |4 - 3| = 1, and 1 + 8 = 9 = 3^2 is the next smallest square. Note a(4) cannot be 3 as a(3) = 3.
a(8) = 15 as |8 - a(7)| = |8 - 7| = 1, and 1 + 15 = 16 = 4^2 is the next smallest square. Note a(8) cannot be 3 or 8 as these have previously occurred.
		

Crossrefs

A349182 a(0) = 1; for n>0, a(n) is the smallest positive integer such that |n - a(n-1)| + a(n) is a square.

Original entry on oeis.org

1, 1, 3, 1, 1, 5, 3, 5, 1, 1, 7, 5, 2, 5, 7, 1, 1, 9, 7, 4, 9, 4, 7, 9, 1, 1, 11, 9, 6, 2, 8, 2, 6, 9, 11, 1, 1, 13, 11, 8, 4, 12, 6, 12, 4, 8, 11, 13, 1, 1, 15, 13, 10, 6, 1, 10, 3, 10, 1, 6, 10, 13, 15, 1, 1, 17, 15, 12, 8, 3, 14, 7, 16, 7, 14, 3, 8, 12, 15, 17, 1, 1, 19, 17, 14, 10, 5, 18, 11
Offset: 0

Views

Author

Scott R. Shannon, Nov 09 2021

Keywords

Examples

			a(1) = 1 as |1 - a(0)| = |1 - 1| = 0, and 0 + 1 = 1 = 1^2 is the next smallest square.
a(2) = 3 as |2 - a(1)| = |2 - 1| = 1, and 1 + 3 = 4 = 2^2 is the next smallest square.
a(5) = 5 as |5 - a(4)| = |5 - 1| = 4, and 4 + 5 = 9 = 3^2 is the next smallest square.
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,Module[{k=1},While[!IntegerQ[Sqrt[(Abs[n+1-a])+k]],k++];k]}; NestList[ nxt,{0,1},90][[;;,2]] (* Harvey P. Dale, Aug 20 2024 *)

A358444 a(1) = 1, a(2) = 2; for n > 2, a(n) = smallest positive number which has not appeared that has a common factor with a(n-2)^2 + a(n-1)^2.

Original entry on oeis.org

1, 2, 5, 29, 4, 857, 10, 734549, 539562233501, 6, 12433, 15, 8, 17, 353, 12, 124753, 13, 14, 20, 16, 18, 22, 24, 25, 1201, 26, 41, 2357, 28, 5556233, 37, 30, 2269, 39, 32, 35, 52, 3929, 40, 15438641, 82, 45, 65, 34, 5381, 78, 50, 36, 38, 42, 44, 46, 48, 51, 3, 9, 21, 27, 33, 54, 55, 91
Offset: 1

Views

Author

Scott R. Shannon, Nov 16 2022

Keywords

Comments

The majority of terms are concentrated along or just above the line a(n) = n, resulting in 51 fixed points in the first 5000 terms. However, some terms are much larger because the sum of the squares of the previous two terms is a prime number.
Conjecture: the sequence is a permutation of the positive integers.

Examples

			a(5) = 4 as a(3)^2 + a(4)^2 = 25 + 841 = 866, and 4 is the smallest unused number that shares a factor with 866.
a(9) = 539562233501 as a(7)^2 + a(8)^2 = 100 + 539562233401 = 539562233501, which is a prime number.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = False; q[] = 1; Do[Set[{a[i], c[i], q[i]}, {i, True, 2}], {i, 2}]; i = a[1]^2; j = a[2]^2; Do[k = i + j; s = FactorInteger[k][[All, 1]]; Do[(m = q[#]; While[c[# m], m++]; q[#] = m; If[# m < k, k = # m]) &[s[[n]]], {n, Length[s]}]; Set[{a[n], c[k], i, j}, {k, True, j, k^2}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Nov 17 2022 *)
Showing 1-5 of 5 results.