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-6 of 6 results.

A119019 Index of occurrence of n in A119018, or 0 if n is not present in A119018.

Original entry on oeis.org

1, 0, 2, 9, 4, 50, 3, 266, 6, 12, 5, 33, 8, 286, 7, 10, 16, 204, 14, 342, 15, 21, 18, 483, 20, 55, 24, 36, 22, 754, 25, 1767, 26, 11, 17, 56, 27, 666, 19, 13, 28, 861, 30, 3741, 32, 35, 23, 611, 38, 406, 42, 39, 44, 3233, 40, 66, 46, 76, 29, 4307, 45
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A119018.

Extensions

More terms from R. J. Mathar, Sep 07 2007

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

A366908 Lexicographically earliest infinite sequence of distinct positive integers such that, for n > 1, a(n) shares a factor with n but does not equal n, while not sharing a factor with a(n-1).

Original entry on oeis.org

1, 4, 9, 2, 15, 8, 21, 10, 3, 5, 22, 27, 26, 7, 25, 6, 85, 12, 95, 14, 33, 16, 69, 28, 45, 13, 18, 35, 58, 39, 155, 24, 11, 17, 20, 51, 74, 19, 36, 55, 82, 49, 86, 77, 30, 23, 94, 57, 56, 65, 34, 91, 106, 63, 40, 119, 38, 29, 118, 75, 122, 31, 81, 32, 105, 44, 201, 46, 87, 50, 213, 52, 219, 37
Offset: 1

Views

Author

Scott R. Shannon, Oct 27 2023

Keywords

Comments

To ensure the sequence is infinite a(n) must be chosen so that it does not have as prime factors all the distinct prime factors of n+1. The first time this rule is required is when determining a(15); see the examples below.
For the terms studied the primes appear in their natural order except for 11 and 13 which are reversed. The sequence is conjectured to be a permutation of the positive integers.
Observation: apart from a(4) = 2, a(9) = 3, and a(33) = 11, prime a(n) is such that n is congruent to +- 2 (mod 12). - Michael De Vlieger, Oct 29 2023

Examples

			a(4) = 2 as 2 does not equal 4, shares the factor 2 with 4 while not sharing a factor with a(3) = 9.
a(15) = 25 as 25 does not equal 15, shares the factor 5 with 15 while not sharing a factor with a(14) = 7. Note that 6 is unused and satisfies these requirements but as 15 + 1 = 16 = 2^4 only contains 2 as a distinct prime factor, a(15) cannot also contain 2 as a factor else a(16) would not exist.
		

Crossrefs

Programs

  • Mathematica
    nn = 1000;
      c[] := False; m[] := 1;
      f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]];
      a[1] = 1; j = a[2] = 4; c[1] = c[4] = True; u = 2;
      Do[k = u;
        If[PrimePowerQ[n], p = FactorInteger[n][[1, 1]]; k = m[p];
         While[
          Or[c[#], ! CoprimeQ[j, #], Divisible[#, f[n + 1]], # == n] &[k p],
           k++]; k *= p; While[c[p m[p]], m[p]++],
        While[
          Or[c[k], ! CoprimeQ[j, k], CoprimeQ[k, n], Divisible[k, f[n + 1]],
            k == n], k++] ];
        Set[{a[n], c[k], j}, {k, True, k}];
        If[k == u, While[c[u], u++]], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Oct 29 2023 *)

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

A366952 a(1) = 1, a(2) = 4; for n > 2, a(n) is the smallest positive number that has not yet appeared that shares a factor with n but does not equal n, and shares a factor with a(n-1).

Original entry on oeis.org

1, 4, 6, 2, 10, 8, 14, 12, 3, 15, 33, 9, 39, 18, 20, 22, 34, 16, 38, 24, 27, 30, 46, 26, 40, 28, 21, 7, 203, 35, 155, 50, 36, 32, 42, 44, 74, 48, 45, 5, 205, 60, 86, 52, 54, 56, 94, 58, 70, 25, 75, 65, 265, 80, 66, 62, 72, 64, 118, 68, 122, 76, 57, 78, 13, 104, 134, 82, 84, 49, 497, 63, 219
Offset: 1

Views

Author

Scott R. Shannon, Oct 29 2023

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers, although the primes typically take many terms to appear, e.g., a(95890) = 223. When a prime does appear it is often followed by a term that is significantly larger than the average-sized term. See the examples below. The primes do not occur in their natural order.

Examples

			a(3) = 6 as 6 does not equal 3, shares the factor 3 with 3 while sharing the factor 2 with a(2) = 4.
a(29) = 203 as 203 does not equal 29, shares the factor 29 with 29 while sharing the factor 7 with a(28) = 7. This is an example of both n and a(n-1) being primes which forces a(n) to be significantly larger than the average-sized term.
		

Crossrefs

A366909 Lexicographically earliest infinite sequence of distinct positive integers such that, for n > 2, a(n) shares a factor with a(n-1) but not with n.

Original entry on oeis.org

1, 5, 10, 15, 21, 35, 20, 25, 55, 33, 30, 65, 40, 85, 17, 51, 39, 13, 26, 91, 52, 117, 42, 7, 14, 49, 70, 45, 57, 19, 38, 95, 50, 75, 66, 11, 22, 77, 28, 63, 60, 115, 23, 69, 161, 105, 56, 119, 34, 187, 44, 99, 78, 143, 104, 169, 130, 125, 110, 121, 88, 165, 80, 135, 84, 133, 76, 171, 152, 209
Offset: 1

Views

Author

Scott R. Shannon, Oct 27 2023

Keywords

Comments

To ensure the sequence is infinite a(n) must be chosen so that it has at least one distinct prime factor that is not a factor of n+1. The first time this rule is required is when determining a(5); see the examples below. It also does not allow a(2) to equal 3 as that would then share its only prime factor with n = 3. As 2 and 4 share a factor with n = 2, this leaves a(2) = 5 as the first valid value.
One can easily show that no 3-smooth number, see A003586, can be a term; these are all blocked by the requirement that a(n) shares no factor with n, else are blocked as such a choice would violate this condition when choosing a(n+1).
For the terms studied beyond the prime a(855) = 277 all subsequent primes appear in their natural order. The earlier primes 7, 11, 13, 17, 19, 197, 199, 211, 223, 277, 281 are either out of order or reversed. The behavior of prime ordering for larger values of n is unknown.

Examples

			a(4) = 15 as 15 does not share a factor with 4 while sharing the factor 5 with a(3) = 10.
a(5) = 21 as 21 does not share a factor with 5 while sharing the factor 3 with a(4) = 15. Note that 3 is unused and satisfies these requirements but as 5 + 1 = 6 = 2*3 contains 3 as a prime factor, a(5) cannot contain 3 as its only distinct prime factor else a(6) would not exist. Likewise a(5) cannot equal 6, 9, 12 or 18.
		

Crossrefs

Showing 1-6 of 6 results.