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.

A349493 a(1)=1, a(2)=2; for n > 2, a(n) is the smallest unused positive number such that gcd(a(n-2)+a(n-1), a(n)) > 1 while gcd(a(n-2), a(n)) = 1 and gcd(a(n-1), a(n)) = 1.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 13, 8, 7, 15, 11, 14, 25, 27, 16, 43, 59, 6, 35, 41, 12, 53, 55, 18, 73, 49, 10, 177, 17, 20, 37, 19, 21, 22, 215, 39, 28, 67, 45, 26, 71, 97, 24, 77, 101, 30, 131, 23, 32, 33, 65, 34, 57, 91, 40, 393, 433, 38, 51, 89, 44, 63, 107, 46, 75, 121, 52, 173, 69, 50, 119, 117, 58, 85
Offset: 1

Views

Author

Scott R. Shannon, Nov 20 2021

Keywords

Comments

In the first 100000 terms the smallest unseen number is 14657, although it is likely all numbers eventually appear. In the same range the fixed points are 3, 8, 11, 69, 207, 543, 555, 663, 687, 981. The majority of terms more than n = 100000 appear to move away from the line y = n, see the linked image, so it is unclear if more exist. The largest value in the first 100000 terms is a(87952) = 4758245.

Examples

			a(3) = 3 as a(1)+a(2) = 3, gcd(1,3) = 1, gcd(2,3) = 1, gcd(3,3) > 1 and 3 is unused.
a(4) = 5 as a(2)+a(3) = 5, gcd(2,5) = 1, gcd(3,5) = 1, gcd(5,5) > 1 and 5 is unused.
a(8) = 8 as a(6)+a(7) = 22, gcd(9,8) = 1, gcd(13,8) = 1, gcd(22,8) > 1 and 8 is unused.
		

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[2]=2; a[n_]:=a[n]=(k=2;While[MemberQ[Array[a,n-1],k]||GCD[a[n-2]+a[n-1],k]<=1||GCD[a[n-2],k]!=1||GCD[a[n-1],k]!=1,k++];k); Array[a,74] (* Giorgos Kalogeropoulos, Nov 20 2021 *)
  • Python
    from math import gcd
    terms, appears = [1, 2], {2:True}
    for n in range(3, 100):
        t = 3
        while not(appears.get(t) is None and gcd(terms[-2]+terms[-1], t)>1 and gcd(terms[-2], t)==1 and gcd(terms[-1], t)==1):
            t += 1
        appears[t] = True; terms.append(t);
    print(terms) #Gleb Ivanov, Nov 20 2021

A349492 a(1)=1, a(2)=6; for n > 2, a(n) is the smallest unused positive number such that gcd(a(n-1)+n, a(n)) > 1, gcd(a(n-1), a(n)) > 1, and gcd(n, a(n)) > 1.

Original entry on oeis.org

1, 6, 3, 42, 470, 2, 84, 4, 78, 8, 418, 10, 598, 12, 9, 30, 1598, 14, 114, 16, 222, 18, 1886, 20, 5, 310, 2022, 22, 174, 15, 186, 24, 21, 60, 25, 610, 47878, 26, 13, 1378, 246, 27, 258, 28, 438, 32, 7426, 34, 1162, 36, 33, 90, 1166, 38, 66, 40, 582, 44, 12154, 46, 13054, 48, 39, 618, 6830
Offset: 1

Views

Author

Scott R. Shannon, Nov 19 2021

Keywords

Comments

The majority of terms lie near a line of gradient 1, but some terms show extremely large jumps in value, e.g., in the first 30000 terms the largest value is a(25391) = 87893333254. It is likely all numbers eventually appear although this is unknown. In the same range, and other than a(3) = 3, there are twenty-one fixed points all between 626 to 856 inclusive. As the terms for n>30000 appear both above and below the line y = n it is possible more exist although this is unknown.

Examples

			a(3) = 3 as a(2)+3 = 9, gcd(9,3)>1, gcd(6,3)>1, gcd(3,3)>1 and 3 has not been used.
a(4) = 42 as a(3)+4 = 7, gcd(7,42)>1, gcd(3,42)>1, gcd(4,42)>1 and 42 has not been used.
a(5) = 470 as a(4)+5 = 47, gcd(47,470)>1, gcd(42,470)>1, gcd(5,470)>1 and 470 has not been used.
a(6) = 2 as a(5)+6 = 476, gcd(476,2)>1, gcd(470,2)>1, gcd(6,2)>1 and 2 has not been used.
		

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[2]=6; a[n_]:=a[n]=(k=2;While[MemberQ[Array[a,n-1],k]||GCD[a[n-1]+n,k]<=1||GCD[a[n-1],k]<=1||GCD[n,k]<=1,k++];k); Array[a,65] (* Giorgos Kalogeropoulos, Nov 20 2021 *)
  • Python
    from math import gcd
    terms, appears = [1, 6], {6:True}
    for n in range(3, 100):
        t = 2
        while not (appears.get(t) is None and gcd(terms[-1]+n, t)>1 and gcd(terms[-1], t)>1 and gcd(n, t)>1):
            t += 1
        appears[t] = True; terms.append(t)
    print(terms) # Gleb Ivanov, Nov 20 2021

A357595 Lexicographically earliest infinite sequence of distinct positive integers such that a(n+1) is the least k != j, for which gcd(k, j) > 1; j = n + a(n).

Original entry on oeis.org

1, 4, 2, 10, 6, 22, 7, 8, 12, 3, 26, 74, 14, 9, 46, 122, 15, 16, 17, 18, 19, 5, 21, 11, 20, 24, 25, 13, 82, 27, 30, 183, 35, 28, 31, 32, 34, 142, 33, 36, 38, 158, 40, 166, 39, 42, 44, 49, 194, 45, 50, 202, 48, 303, 51, 52, 54, 37, 55, 56, 29, 57, 63, 58, 60, 65
Offset: 1

Views

Author

David James Sycamore, Oct 05 2022

Keywords

Comments

If n + a(n) = prime p, a(n+1) is the smallest multiple (>1) of p, which has not occurred earlier. Conjectured to be a permutation of the positive integers.

Examples

			a(1)=1, then 1+a(1)=2 so a(2) must be 4, the least k != 2 which shares a divisor with 2.
		

Crossrefs

Programs

A349491 a(1)=1, a(2)=4; for n > 2, a(n) is the smallest unused positive number such that gcd(a(n-1)*n,a(n)) > 1, where a(n) != a(n-1) and a(n) != n.

Original entry on oeis.org

1, 4, 2, 6, 3, 8, 10, 5, 12, 9, 15, 14, 7, 16, 18, 20, 22, 11, 33, 21, 24, 26, 13, 27, 30, 25, 35, 32, 28, 34, 17, 36, 38, 19, 40, 39, 42, 44, 45, 46, 23, 48, 50, 52, 51, 54, 56, 49, 63, 55, 57, 58, 29, 60, 62, 31, 66, 64, 68, 65, 70, 72, 69, 74, 37, 75, 78, 76, 80, 77, 84, 81, 87
Offset: 1

Views

Author

Scott R. Shannon, Nov 19 2021

Keywords

Comments

This sequence shows similar behavior to the EKG sequence A064413. See the linked image.

Examples

			a(3) = 2 as a(2)*3 = 6, 2!=4, 2!=3, 2 is unused and gcd(6,2) > 1.
a(4) = 6 as a(3)*4 = 8, 6!=2, 6!=4, 6 is unused and gcd(8,6) > 1.
		

Crossrefs

Programs

  • Python
    from math import gcd
    terms, appears = [1], {}
    for n in range(2, 100):
        t = 2
        while not(appears.get(t) is None and gcd(terms[-1]*n, t)>1 and t!=terms[-1] and t!=n):
            t += 1
        appears[t] = True; terms.append(t);
    print(terms) # Gleb Ivanov, Nov 20 2021

A357614 Lexicographically earliest infinite sequence of distinct positive integers such that a(n+1) is the least k != j, for which gcd(k, j) > 1, where j = a(n) + prime(n).

Original entry on oeis.org

1, 6, 3, 2, 12, 46, 118, 5, 4, 9, 8, 13, 10, 15, 14, 122, 7, 11, 16, 166, 18, 21, 20, 206, 25, 22, 24, 254, 19, 26, 278, 27, 28, 30, 39, 32, 33, 34, 394, 17, 35, 36, 31, 37, 23, 38, 42, 44, 45, 40, 538, 48, 41, 47, 50, 614, 1754, 49, 52, 56, 674, 29, 54, 57, 58
Offset: 1

Views

Author

David James Sycamore, Oct 06 2022

Keywords

Comments

If a(n) + prime(n) is a prime p, then a(n+1) is the smallest multiple (>1) of p that has not occurred earlier. Conjectured to be a permutation of the positive integers.

Examples

			a(1)=1; 1 + prime(1)=3, so a(2) = 6, the smallest unused number sharing a divisor with 3.
		

Crossrefs

Programs

Showing 1-5 of 5 results.