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 31-40 of 44 results. Next

A352976 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with max(a(n-2),a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 13 2022

Keywords

Comments

Although all primes likely appear they do not occur in their natural order, e.g., 37 appears before 31. In the range studied each time a prime appears, beyond the initial 2, the previous term is a multiple of the same prime. The largest multiple in the first 500000 terms is six, first occurring at a(7782) = 8286, a(7783) = 1381. It is unknown if this ratio is unbounded for large n. As a prime term is less than its previous term the term following the prime will share a factor with previous multiple of the prime. This factor appears to always be a factor of the multiple and thus the term is not another multiple of the prime.
In the first 500000 terms the fixed points are 1, 2, 15, 25, 35. It is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 6 as max(a(2),a(3)) = max(2,4) = 4, and 6 is the smallest unused number that shares a factor with 4.
a(5) = 3 as max(a(3),a(4)) = max(4,6) = 6, and 3 is the smallest unused number that shares a factor with 6.
		

Crossrefs

Programs

A353239 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 2, a(n) has either a common factor with a(n-1) but not with a(n-2), or with a(n-2) but not with a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 08 2022

Keywords

Comments

This sequence is a hybrid of the selection rules of the Yellowstone permutation A098550 and the Enots Wolley sequence A336957. As in the latter, to ensure the sequence is infinite an additional rule is applied: a(n) cannot have the same set of prime divisors as a(n-1).
Like the EKG sequence A064413, the primes p appear in natural order, and 2p precedes p. However, unlike A064413, the term following p is not 3p, but rather a term close to 2p, typically 2p+2.
The sequence is conjectured to be a permutation of the positive integers. Because of the selection rule at most two consecutive terms can be even, although the number of consecutive odd terms is likely arbitrarily large.
In the first 100000 terms the fixed points are 1,2,3,4,12. It is likely no more exist.

Examples

			a(4) = 4 as a(2) = 2, a(3) = 3, and 4 is the smallest unused number that has a common factor with 2 but not with 3.
a(5) = 9 as a(3) = 3, a(4) = 4, and 9 is the smallest unused number that is coprime to 4 but not to 3. Note that 8 also meets the selection criteria, but its only prime factor, 2, is shared with a(4) = 4, so 8 cannot be chosen as a(5) because then a(6) would not exist.
		

Crossrefs

Programs

  • MATLAB
    function a = A353239( max_n )
        a = [1 2 3];
        m = [1:max_n];
        b = cell(1,max_n); b{1} = [1]; b{2} = [2]; b{3} = [3];
        for n = 4:max_n
            j = 4; k = m(j); f = factor(k);
            while ((isempty(intersect(b{n-2},f)) ~= ~isempty(intersect(b{n-1},f)))...
                    ||isequal(unique(b{n-1}),unique(f)))
                j = j+1;
                k = m(j);
                f = factor(k);
            end
            a(n) = k;
            b{n} = f;
            m(m==k) = []; m(end+1) = m(end)+1;
        end
    end % Thomas Scheuerle, Apr 12 2022

A353710 Smallest missing number when A353709(n) is being calculated.

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 27, 27, 27, 27, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
Offset: 0

Views

Author

N. J. A. Sloane, May 06 2022

Keywords

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    def A353710_gen(): # generator of terms
        s, a, b, c, ab = {0,1}, 0, 1, 2, 1
        yield from (0,1)
        while True:
            for n in count(c):
                if not (n & ab or n in s):
                    yield c
                    a, b = b, n
                    ab = a|b
                    s.add(n)
                    while c in s:
                        c += 1
                    break
    A353710_list = list(islice(A353710_gen(),20)) # Chai Wah Wu, May 10 2022

A249685 Indices where terms of A249684 appear in A084933.

Original entry on oeis.org

1, 2, 3, 4, 6, 10, 12, 18, 20, 24, 30, 36, 42, 54, 60, 66, 72, 78, 84, 90, 102, 108, 114, 120, 126, 138, 148, 150, 156, 168, 174, 180, 186, 192, 198, 204, 210, 222, 228, 234, 240, 246, 252, 260, 268, 270, 282, 288, 294, 300, 312, 318, 324, 330, 336, 342, 350, 354, 360, 372, 378
Offset: 1

Views

Author

N. J. A. Sloane, Nov 05 2014

Keywords

Comments

A249684 and A249685 are the RECORDS transform of A084933.

Crossrefs

A143345 Lexicographically earliest sequence such that a(n) is coprime to the preceding 4 terms (or n-1 terms if n<5) and does not occur earlier.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 4, 9, 13, 17, 19, 8, 15, 23, 29, 31, 14, 25, 27, 37, 41, 16, 35, 33, 43, 47, 26, 49, 45, 53, 59, 22, 61, 21, 65, 67, 32, 71, 51, 55, 73, 28, 79, 39, 83, 85, 38, 77, 69, 89, 97, 10, 91, 57, 101, 103, 20, 107, 63, 109, 113, 34, 95, 81, 121, 127, 46, 119, 75, 131, 137, 44, 133, 87, 115, 139, 52, 149, 93, 125, 151, 56, 143, 111, 145, 157, 62, 161, 99, 163, 167, 40, 169, 123, 173, 179, 50, 181
Offset: 1

Views

Author

M. F. Hasler, Jan 18 2011

Keywords

Comments

One possible extension of A084937, A103683 to N=4. Here, a(4)=5 is chosen such that a(n) is coprime to a(k) for 0 < k < n <= 4. Another choice is a(k)=k (k<=4), which yieds the different sequence A180348.
It appears that:
- no multiples of 6 occur in this sequence, so it is not a permutation of the integers.
- a(n)=3 (mod 6) iff n=3, n=8, n=13 or n=14+5k, k>0.
- a(n)=0 (mod 2) iff n= 2+5k, k>=0.
- powers of 2 occur in natural order.
- powers of 3 occur in natural order.
- powers of any prime p occur in natural order.
- powers of any number occur in natural order.

Programs

  • PARI
    print1("1,2,3"); a=[1,2,3,L=5]; unused=[4]; v=vector(#a,i,1); for(n=4,99, print1(","a[#a]); for(i=1,#unused,apply(x->gcd(x,unused[i]),a)==v | next; a=concat(vecextract(a,"^1"),unused[i]);unused=vecextract(unused,Str("^",i));next(2));L++;while(apply(x->gcd(x,L),a) !=v,unused=concat(unused,L++-1););a=concat(vecextract(a,"^1"),L))

A347179 a(1) = 1; for n > 1, a(n) = smallest distinct positive integer such that gcd(a(n),a(n-k)) = 1, where k is each divisor of a(n) and n - k >= 1.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 11, 13, 10, 17, 15, 14, 19, 23, 16, 21, 25, 26, 29, 31, 22, 27, 37, 20, 41, 33, 28, 39, 43, 32, 47, 49, 34, 45, 53, 35, 58, 51, 59, 46, 61, 55, 57, 62, 65, 67, 69, 38, 71, 73, 50, 77, 79, 64, 75, 83, 44, 85, 81, 76, 87, 89, 56, 97, 63, 68, 91, 95, 74, 93, 101, 52, 103
Offset: 1

Views

Author

Scott R. Shannon, Aug 21 2021

Keywords

Comments

The majority of terms are concentrated along two lines, the upper line has gradient of approximately 1.342, while the lower line, which is less well defined, has a gradient of approximately 1.05. See the linked image.
Small numbers with only 2 and 3 as prime divisors apparently take many terms to appear. For example a(64963) = 6, a(80415) = 18, while 12 and 24 have not appeared after 250000 terms.

Examples

			a(3) = 3 as the divisors of 3 are 1 and 3, and a(3-1) = 2 which has no common divisor with 3. As a(3-3) = a(0) is not defined this term is ignored.
a(5) = 4 as the divisors of 4 are 1, 2 and 4, and a(5-1) = a(4) = 5, a(5-2) = a(3) = 3, and a(5-4) = a(1) = 1, and the gcd of 4 and these three numbers is 1.
a(11) = 10 as the divisors of 10 are 1, 2, 5 and 10, and a(11-1) = a(10) = 13, a(11-2) = a(9) = 11, a(11-5) = a(6) = 7, and a(11-10) = a(1) = 1, and the gcd of 10 and these four numbers is 1.
		

Crossrefs

A347406 Earliest sequence of distinct positive integers such that both gcd(a(n),a(n-k)) = 1 and gcd(a(n),a(n+k)) = 1, where k is each divisor of a(n) and n - k >= 1.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 11, 13, 10, 17, 19, 14, 15, 23, 16, 29, 21, 26, 27, 25, 22, 31, 35, 32, 33, 37, 38, 41, 39, 34, 43, 47, 28, 53, 51, 20, 57, 59, 40, 61, 49, 44, 63, 67, 46, 71, 73, 52, 69, 79, 50, 83, 81, 55, 58, 77, 65, 82, 87, 85, 89, 74, 93, 95, 91, 86, 97, 101, 62, 103, 45, 64, 75
Offset: 1

Views

Author

Scott R. Shannon, Aug 30 2021

Keywords

Comments

The majority of terms are concentrated along two lines, the upper line has gradient of approximately 1.37 while the lower line has a gradient of approximately 1.02. Between these a third more random line also appear. See the linked image.
Small numbers with only 2 and 3 as prime divisors apparently take many terms to appear. For example a(210613) = 6, a(224221) = 18, while 12 and 24 have not appeared after 250000 terms.

Examples

			a(3) = 3 as the divisors of 3 are 1 and 3, and a(3-1) = a(2) = 2, a(3+1) = a(4) = 5, and a(3+3) = a(6) = 7, and the gcd of 3 and each of these three numbers is 1. As a(3-3) = a(0) is not defined this term is ignored.
a(11) = 10 as the divisors of 10 are 1, 2, 5 and 10, and a(11-1) = a(10) = 13, a(11-2) = a(9) = 11, a(11-5) = a(6) = 7, a(11-10) = a(1) = 1, a(11+1) = a(12) = 17, a(11+2) = a(13) = 19, a(11+5) = a(16) = 23, and a(11+10) = a(21) = 27, and the gcd of 10 and each of these eight numbers is 1.
a(13) = 19 as the divisors of 19 are 1 and 19, and a(13-1) = a(12) = 17, a(13+1) = a(14) = 14, and a(13+19) = a(32) = 34, and the gcd of 19 and each of these three numbers is 1. Note that as a(11) = 10, and a(11+2) = a(13), where 2 is a divisor of 10, a(13) cannot equal 15 as gcd(10,15) > 1. This is the first term that differs from A347179.
		

Crossrefs

A352935 a(n) = A121216(n) - n.

Original entry on oeis.org

0, 0, 0, 1, -1, 0, 0, 3, -1, -1, 2, -2, -1, 3, 4, -2, -2, 5, -3, -2, 0, 3, -3, -2, 2, 3, -1, -4, 2, 5, -3, 0, 0, 3, -1, -6, 2, 3, -1, -4, 2, 5, -3, -2, 4, 7, -3, -3, 2, -4, -1, 3, 4, -6, -3, 3, 4, -4, -3, 5, 6, -4, -3, -1, 6, -4, -3, 1, 4, -2, -5, 3, 6, 0, -5, 1, 4, -6, -3, 3, 4, -4, -1, 5, 2, -6, -1, 3, 4, -2, 1, 3, 4, -10, -5, 5, 6, -4, -3, -1
Offset: 1

Views

Author

N. J. A. Sloane, May 05 2022

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A338618 Lexicographically earliest sequence of distinct positive integers such that three consecutive terms are never pairwise coprime.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 04 2020

Keywords

Comments

In other words, for any n > 0, at least one of gcd(a(n), a(n+1)), gcd(a(n), a(n+2)), gcd(a(n+1), a(n+2)) is strictly greater than 1.
This sequence has connections with the Yellowstone permutation (A098550).
Conjecture: this sequence is a permutation of the natural numbers.

Examples

			The first terms, alongside associated GCD's, are:
  n   a(n)  gcd(a(n),a(n+1))  gcd(a(n),a(n+2))  gcd(a(n+1),a(n+2))
  --  ----  ----------------  ----------------  ------------------
   1     1                 1                 1                   2
   2     2                 2                 1                   1
   3     4                 1                 2                   3
   4     3                 3                 1                   1
   5     6                 1                 2                   1
   6     5                 1                 5                   2
   7     8                 2                 1                   1
   8    10                 1                 2                   1
   9     7                 1                 1                   3
  10    12                 3                 1                   1
		

Crossrefs

See A338619 for a similar sequence.

Programs

  • PARI
    See Links section.

A338619 Lexicographically earliest sequence of distinct positive terms such that among three consecutive terms there is exactly one pair of terms that are not coprime.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 04 2020

Keywords

Comments

In other words, for any n > 0, exactly one of gcd(a(n), a(n+1)), gcd(a(n), a(n+2)), gcd(a(n+1), a(n+2)) is strictly greater than 1.
This sequence has connections with the Yellowstone permutation (A098550).
Conjecture: this sequence is a permutation of the natural numbers.

Examples

			The first terms, alongside associated GCD's, are:
  n   a(n)  gcd(a(n),a(n+1))  gcd(a(n),a(n+2))  gcd(a(n+1),a(n+2))
  --  ----  ----------------  ----------------  ------------------
   1     1                 1                 1                   2
   2     2                 2                 1                   1
   3     4                 1                 4                   1
   4     3                 1                 3                   1
   5     8                 1                 2                   1
   6     9                 1                 1                   5
   7    10                 5                 1                   1
   8     5                 1                 1                   7
   9     7                 7                 1                   1
  10    14                 1                 2                   1
		

Crossrefs

See A338618 for a similar sequence.

Programs

  • PARI
    See Links section.
Previous Showing 31-40 of 44 results. Next