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.

Previous Showing 11-13 of 13 results.

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

A360931 a(1) = 2, a(2) = 3; for n > 2, a(n) is the smallest number greater than 1 that has not appeared such that |a(n) - a(n-1)| has a common factor with a(n-2).

Original entry on oeis.org

2, 3, 5, 8, 13, 7, 20, 6, 4, 10, 12, 14, 11, 9, 31, 16, 47, 15, 62, 17, 19, 36, 55, 21, 26, 23, 25, 48, 18, 22, 24, 28, 30, 32, 27, 29, 35, 64, 34, 38, 40, 42, 37, 33, 70, 43, 39, 82, 46, 44, 50, 52, 54, 41, 45, 86, 51, 49, 58, 65, 53, 63, 116, 56, 60, 66, 57, 59, 68, 127, 61, 188, 249, 67, 73, 140
Offset: 1

Views

Author

Scott R. Shannon, Feb 25 2023

Keywords

Comments

In the first 100000 terms the fixed points are 10, 16, 42, 52, 66; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers > 1.

Examples

			a(6) = 7 as |7 - a(5)| = |7 - 13| = 6 which shares a common factor with a(4) = 8.
		

Crossrefs

Programs

A363198 a(n) = n for n <= 3; for n >= 4, a(n) is the smallest positive integer that has not appeared previously in this sequence and shares a factor with a(n-1) + a(n-2) + a(n-3).

Original entry on oeis.org

1, 2, 3, 4, 6, 13, 23, 7, 43, 73, 9, 5, 12, 8, 10, 14, 16, 15, 18, 21, 20, 59, 22, 101, 24, 27, 19, 25, 71, 30, 26, 127, 33, 28, 32, 31, 35, 34, 36, 39, 109, 38, 40, 11, 89, 42, 44, 45, 131, 46, 37, 48, 262, 347, 51, 50, 49, 52, 151, 54, 257, 55, 56, 58, 65
Offset: 1

Views

Author

Yifan Xie, May 21 2023

Keywords

Comments

Conjecture: This sequence is a permutation of the natural numbers.

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[2] = 2; a[3] = 3; a[n_] := a[n] = Module[{s, i = 1}, s = a[n - 1] + a[n - 2] + a[n - 3]; While[MemberQ[a /@ Range[1, n - 1], i] || GCD[s, i] == 1, i++]; i];
    Table[a[n], {n, 1, 65}] (* Robert P. P. McKone, Dec 30 2023 *)
  • PARI
    lista(nn) = {my(v = [1, 2, 3]); for(n=4, nn, my(t=1); while(prod(X=1, n-1, v[X]-t)==0 || gcd(v[n-3]+v[n-2]+v[n-1], t)==1, t++); v=concat(v, t)); v;}
    
  • Python
    from math import gcd
    a = [1, 2, 3]
    t = set(a)
    def next_element():
        s = a[-1] + a[-2] + a[-3]
        n = 1
        while n in t or gcd(s, n) == 1:
            n += 1
        return n
    def a_seq(ul):
        for _ in range(4, ul + 1):
            nn = next_element()
            a.append(nn)
            t.add(nn)
        return a
    print(a_seq(65)) # Robert P. P. McKone, Dec 30 2023
Previous Showing 11-13 of 13 results.