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

A379248 a(1) = 1, a(2) = 2, for a(n) > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) while no exponent of each distinct prime factor of a(n) is the same as the exponent of the same prime factor of a(n-1).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 9, 3, 18, 15, 25, 5, 50, 16, 14, 20, 22, 24, 26, 28, 30, 27, 21, 36, 32, 34, 40, 38, 44, 42, 45, 33, 54, 39, 63, 48, 46, 52, 56, 49, 7, 98, 35, 75, 55, 100, 58, 60, 62, 64, 66, 68, 70, 72, 51, 81, 57, 90, 69, 99, 78, 76, 74, 80, 82, 84, 86, 88, 92, 94, 96, 104, 102, 108, 87, 117, 93, 126, 111, 135, 114, 112, 106, 116, 110, 121, 11, 242
Offset: 1

Views

Author

Scott R. Shannon, Dec 18 2024

Keywords

Comments

For the terms studied the primes appear as terms in their natural order, and when a prime p appears as a term, the preceding term is always p^2 and the following term is always 2*p^2; it is likely this is true for all primes. A similar pattern is seen in the EKG sequence A064413 except that there a prime is always preceded by 2*p and followed by 3*p.
Unlike the EKG sequence a prime can appear as a factor of a preceding term long before it appears as a term by itself - see A379291 for the indices where each prime first appears as a factor of a(n).
The indices where the primes appear show an interesting pattern of runs of consecutive primes that are separated by only 6 terms, with longer, sometimes much longer, gaps in between - see A379290 and A379296. These primes appear in regions where the terms overall show a strong oscillating pattern of jumping between terms containing a prime p and p^2 as a factor. The primes being oscillated between increase until a new prime q appears in a term q^2 which leads to the next term being q. The occurrence of a new prime q can start a run of consecutive primes appearing before these oscillations subside and the terms slowly grow again until the next oscillation. See the attached graphs which show the burst/oscillating behavior, with the primes appearing in these regions, followed by terms with a slow, more linear, growth.
In the first 500000 terms there are only six fixed points - see A379292. However, as the regions of oscillating terms crosses the a(n) = n line it is likely more exist for larger values of n.
The sequence is conjectured to be a permutation of the positive integers. See A379293 for the index where n first appears.

Examples

			a(3) = 4 as 4 is unused and shares a factor with a(2) = 2, while 4 = 2^2 which has 2 as the exponent of the prime 2, while a(2) = 2^1 which has exponent 1. As these are different 4 is acceptable.
a(5) = 8 as 8 is unused and shares a factor with a(4) = 6, while 8 = 2^3 which has 3 as the exponent of the prime 2, while a(4) = 2^1*3^1 which has exponent 1. As these are different 8 is acceptable. Note that although 3 shares a factor with 6, 3 = 3^1 which has the same exponent 1 on the prime 3 as 6 = 2^1*3^1, so 3 cannot be chosen. This is the first term to differ from A064413.
		

Crossrefs

Cf. A379290 (index where prime n appears as a term), A379296 (differences between indices where prime terms appear), A379291 (index where prime n first appears as a factor of a(n)), A379293 (index where n appears as a term), A379292 (fixed points), A379294 (record high values), A379295 (indices of record high values).

Programs

  • Mathematica
    nn = 120; c[_] := False;
    f[x_] := f[x] = FactorInteger[x]; j = 2; u = 3;
    {1, 2}~Join~Reap[Do[
      k = u; While[Or[c[k], CoprimeQ[j, k], AnyTrue[f[k], MemberQ[f[j], #] &]], k++];
        Set[{j, c[k]}, {k, True}]; Sow[k];
    If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 21 2024 *)
  • Python
    from sympy import factorint
    from itertools import islice
    from collections import Counter
    fcache = dict()
    def myfactors(n):
        global fcache
        if n in fcache: return fcache[n]
        ans = Counter({p:e for p, e in factorint(n).items()})
        fcache[n] = ans
        return ans
    def agen(): # generator of terms
        yield 1
        an, a, m = 2, {1, 2}, 3
        while True:
            yield an
            k, fan = m-1, myfactors(an)
            sfan = set(fan)
            while True:
                k += 1
                if k in a: continue
                fk = myfactors(k)
                sfk = set(fk)
                if sfk & sfan and all(fk[p]!=fan[p] for p in sfan):
                    an = k
                    break
            a.add(an)
    print(list(islice(agen(), 89))) # Michael S. Branicky, Jan 05 2025

A356430 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number not occurring earlier that shares a factor with the number of divisors of a(n-1).

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 10, 12, 9, 15, 14, 16, 5, 18, 20, 21, 22, 24, 26, 28, 27, 30, 32, 33, 34, 36, 39, 38, 40, 42, 44, 45, 46, 48, 25, 51, 50, 52, 54, 56, 58, 60, 57, 62, 64, 7, 66, 68, 63, 69, 70, 72, 74, 76, 75, 78, 80, 35, 82, 84, 81, 55, 86, 88, 90, 87, 92, 93, 94, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Scott R. Shannon, Aug 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers although it may take a large number of terms for the primes to appear, e.g., 19 has not occurred after 100000 terms. In the same range the only fixed points are 1, 2, and 9, and it is likely no more exist.

Examples

			a(9) = 9 as a(8) = 12 which has six divisors, and 9 is the smallest unused number that shares a factor with 6.
		

Crossrefs

A379442 a(1) = 1, a(2) = 2, for a(n) > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) such that the exponents of each distinct prime factor of a(n-1) differ by one from those of the same prime factors of a(n), while the exponents of each distinct prime factor of a(n) differ by one from those of the same prime factors of a(n-1).

Original entry on oeis.org

1, 2, 4, 6, 9, 3, 18, 12, 8, 16, 24, 20, 14, 44, 10, 25, 5, 50, 15, 63, 27, 45, 21, 49, 7, 98, 28, 22, 52, 30, 36, 42, 68, 26, 60, 34, 76, 40, 48, 32, 64, 96, 80, 56, 92, 38, 84, 46, 116, 62, 132, 58, 124, 66, 117, 33, 90, 39, 99, 51, 126, 57, 153, 54, 81, 135, 162, 108, 72, 156, 70, 75, 35, 147, 77, 121, 11, 242, 55, 150, 65, 169, 13, 338, 91, 245, 119, 289
Offset: 1

Views

Author

Scott R. Shannon, Dec 23 2024

Keywords

Comments

The sequence shows similar behavior to A379248 - prime terms p are preceded by p^2 and followed by 2*p^2, primes appear in their natural order, primes can be divisors of terms long before they appear as a term themselves, there are long runs of prime terms that are separated by six terms, and prime terms appear when the terms overall go through intermittent periods of large oscillations in value.
The most significant difference is the terms are concentrated along two different lines when between the periods of large oscillation. These appear to be comprised of terms that jump between values of 2*k and 2^2*k' or 3*k and 3^2*k', with k,k'>1. Sometimes between these lines are successive terms comprised of multiples of large powers of 2 or 3; see the attached image.
In the first 100000 terms there are eleven fixed points. However, as the regions of oscillating terms crosses the a(n) = n line it is possible more exist for larger values of n.
The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(3) = 4 as 4 is unused and shares a factor with a(2) = 2, while 4 = 2^2 which has 2 as the exponent of the prime 2, while a(2) = 2^1 which has exponent 1. As these exponents differ by one, 4 is acceptable.
a(5) = 9 as 9 is unused and shares a factor with a(4) = 6, while 9 = 3^2 which has 2 as the exponent of the prime 3 and exponent 0 for the prime 2, while a(4) = 2^1*3^1 which has exponent 1 for both primes 2 and 3. As these both differ by one, 9 is acceptable. Note that although 8 shares a factor with 6, 8 = 2^3 which has exponent 3 for the prime 2, and as that does not differ by one from the exponent 1 for the prime 2 in 6, 8 cannot be chosen. This is the first term to differ from A379248.
		

Crossrefs

Cf. A379557 (fixed points), A379558 (index where prime n appears as a term), A379559 (index where n appears as a term).

Programs

  • Python
    from sympy import factorint
    from itertools import islice
    from collections import Counter
    fcache = dict()
    def myfactors(n):
        global fcache
        if n in fcache: return fcache[n]
        ans = Counter({p:e for p, e in factorint(n).items()})
        fcache[n] = ans
        return ans
    def agen(): # generator of terms
        yield 1
        an, a, m = 2, {1, 2}, 3
        while True:
            yield an
            k, fan = m-1, myfactors(an)
            sfan = set(fan)
            while True:
                k += 1
                if k in a: continue
                fk = myfactors(k)
                sfk = set(fk)
                if sfk & sfan and all(abs(fk[p]-fan[p])==1 for p in sfk | sfan):
                    an = k
                    break
            a.add(an)
    print(list(islice(agen(), 88))) # Michael S. Branicky, Jan 05 2025

A356431 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number not occurring earlier that shares a factor with both a(n-1) and the number of divisors of a(n-1).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 3, 18, 9, 15, 20, 14, 16, 30, 22, 24, 26, 28, 21, 36, 27, 42, 32, 34, 38, 40, 44, 33, 48, 45, 39, 52, 46, 50, 54, 56, 58, 60, 51, 66, 62, 64, 70, 68, 72, 57, 76, 74, 78, 80, 5, 90, 63, 69, 84, 75, 81, 105, 96, 82, 86, 88, 92, 94, 98, 100, 102, 104, 106, 108, 87, 114, 110
Offset: 1

Views

Author

Scott R. Shannon, Aug 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers although it may take a large number of terms for the primes to appear, e.g., 17 has not occurred after 100000 terms. In the same range the only fixed points are the first two terms; it is likely no more exist although this is unknown.

Examples

			a(8) = 3 as a(7) = 12 which has six divisors, and 3 is the smallest unused number that shares a factor with both 12 and 6.
		

Crossrefs

A356432 a(1) = 1; for n > 1, a(n) is the smallest positive number not occurring earlier that shares a factor with a(n-1) plus the number of divisors of a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Aug 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 250000 terms there are twenty-three fixed points: 1, 2, 12, 16, 27 ..., 2279, 5401, 7339. It is possibly no more exist although this is unknown.

Examples

			a(7) = 14 as a(6) = 5 which has two divisors, and 14 is the smallest unused number that shares a factor with 5 + 2 = 7.
		

Crossrefs

Programs

  • Maple
    A[1]:= 1; S:= {$2..5000}:
    for i from 2 do
      found:= false;
      t:= A[i-1] + numtheory:-tau(A[i-1]);
      for s in S do
        if igcd(s,t) > 1 then
          A[i]:= s;
          found:= true;
          S:= S minus {s};
          break
        fi
      od;
      if not found then break fi;
    od:
    seq(A[j],j=1..i-1); # Robert Israel, Jan 16 2023

A379440 a(1) = 1, a(2) = 2, for a(n) > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) such that the exponents of each distinct prime factor of a(n) differ by one from those of the same prime factors of a(n-1).

Original entry on oeis.org

1, 2, 4, 6, 9, 3, 18, 12, 8, 16, 24, 20, 14, 44, 10, 25, 5, 50, 15, 63, 27, 45, 21, 49, 7, 98, 28, 22, 52, 30, 36, 26, 60, 34, 76, 40, 48, 32, 64, 96, 80, 56, 68, 38, 84, 46, 116, 42, 92, 58, 124, 66, 117, 33, 90, 39, 99, 51, 126, 57, 153, 54, 81, 135, 162, 108, 62, 132, 70, 75, 35, 147, 77, 121, 11, 242, 55, 150, 65, 169, 13, 338, 91, 245, 119, 289, 17
Offset: 1

Views

Author

Scott R. Shannon, Dec 23 2024

Keywords

Comments

Like A379442, for the terms studied, prime terms p are preceded by p^2 and followed by 2*p^2, can be divisors of terms before they appear as a term themselves, and are distributed in groups of primes, with many primes within the groups differing by six terms. Unlike A379442 not all primes appear in their natural order, although the occurrence of such primes is rare - only four primes are out of order in the first 250000 terms, namely a(6787) = 179, a(18355) = 353, a(43516) = 593, a(201498) = 1579. In the same range the fixed points are 1, 2, 30, 34, 46, 130, 352, 456, although more may exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(14) = 44 as 44 = 2^2*11^1, and a(13) = 14 = 2*7 which contains 2^1 as a factor, whose power differs by one from 2^2, while not containing any power of 11. This is the smallest unused number satisfying these criteria. Note that 36 = 2^2*3^2 cannot be chosen as a(13) contains no power of 3 - this is the first term to differ from A379441.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    from itertools import islice
    from collections import Counter
    fcache = dict()
    def myfactors(n):
        global fcache
        if n in fcache: return fcache[n]
        ans = Counter({p:e for p, e in factorint(n).items()})
        fcache[n] = ans
        return ans
    def agen(): # generator of terms
        yield 1
        an, a, m = 2, {1, 2}, 3
        while True:
            yield an
            k, fan = m-1, myfactors(an)
            sfan = set(fan)
            while True:
                k += 1
                if k in a: continue
                fk = myfactors(k)
                sfk = set(fk)
                if sfk & sfan and all(abs(fk[p]-fan[p])==1 for p in sfk):
                    an = k
                    break
            a.add(an)
    print(list(islice(agen(), 87))) # Michael S. Branicky, May 25 2025

A379441 a(1) = 1, a(2) = 2, for a(n) > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) such that the exponents of each distinct prime factor of a(n-1) differ by one from those of the same prime factors of a(n).

Original entry on oeis.org

1, 2, 4, 6, 9, 3, 18, 12, 8, 16, 24, 20, 14, 36, 30, 25, 5, 50, 15, 63, 27, 45, 21, 49, 7, 98, 28, 10, 44, 26, 60, 22, 52, 34, 76, 40, 48, 32, 64, 96, 80, 56, 68, 38, 84, 46, 100, 70, 75, 35, 147, 77, 121, 11, 242, 33, 72, 108, 90, 39, 99, 42, 92, 54, 81, 135, 117, 51, 126, 57, 144, 120, 112, 88, 116, 62, 132, 58, 124, 66, 140, 74, 156, 82, 148, 78, 153, 69
Offset: 1

Views

Author

Scott R. Shannon, Dec 23 2024

Keywords

Comments

Like A379442, for the terms studied, prime terms p are preceded by p^2 and followed by 2*p^2, can be divisors of terms before they appear as a term themselves, and are distributed in groups of primes, with many primes within the groups differing by six terms. Unlike A379442 not all primes appear in their natural order, although the occurrence of such primes is rare - only three primes are out of order in the first 250000 terms, namely a(13350) = 149, a(18410) = 179, a(21382) = 191. The sequence contains numerous fixed points, these being 1, 2, 34, 46, 218, 370, 410, 462, 474, 1954, 5592, 19186,... . The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(14) = 36 as 36 = 2^2*3^2 while a(13) = 14 = 2*7 which contains 2^1 as a factor, whose power differs by one from 2^2, and 7^1 as a factor, and 36 contains no power of 7. This is the smallest unused number satisfying these criteria. This is the first term to differ from A379440.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    from itertools import islice
    from collections import Counter
    fcache = dict()
    def myfactors(n):
        global fcache
        if n in fcache: return fcache[n]
        ans = Counter({p:e for p, e in factorint(n).items()})
        fcache[n] = ans
        return ans
    def agen(): # generator of terms
        yield 1
        an, a, m = 2, {1, 2}, 3
        while True:
            yield an
            k, fan = m-1, myfactors(an)
            sfan = set(fan)
            while True:
                k += 1
                if k in a: continue
                fk = myfactors(k)
                sfk = set(fk)
                if sfk & sfan and all(abs(fk[p]-fan[p])==1 for p in sfan):
                    an = k
                    break
            a.add(an)
    print(list(islice(agen(), 88))) # Michael S. Branicky, May 25 2025

A362842 a(1) = 1; a(2) = 2; for n > 2, a(n) is the smallest positive number that has not yet appeared that shares a factor with a(n-1) when both a(n-1) and a(n) are read as numbers in bases from one more than the maximum digit in a(n-1) and a(n), up to base 10.

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 24, 8, 20, 10, 30, 33, 11, 22, 26, 13, 39, 15, 48, 28, 14, 49, 7, 70, 16, 38, 19, 57, 69, 18, 56, 76, 36, 60, 40, 42, 21, 63, 66, 44, 46, 23, 92, 32, 64, 62, 31, 93, 27, 90, 5, 50, 55, 77, 84, 35, 80, 68, 17, 119, 34, 94, 47, 329, 91, 52, 96, 45, 95, 25, 190, 54, 98, 58, 29
Offset: 1

Views

Author

Scott R. Shannon, May 05 2023

Keywords

Comments

This is a base variation of the EKG sequence A064413. Despite numbers with larger digits having to share a factor with a(n-1) in fewer bases than those with only small digits, and would therefore seemingly appear more frequently, the frequency of the digits 8 and 9, for example, in the first 200000 terms is the same as the smaller digits 0 to 7, so surprisingly this does not appear to influence the determination of a(n).
In the first 200000 terms the smallest unused number is 25411, which implies all numbers will eventually appear. In the same range the fixed points are 1, 2, 424, 507, 1261, 1577, 2461, 4311; it is likely no more appear.

Examples

			a(7) = 12 as the maximum digit in a(6) = 9 and 12 is 9, so a(6) and a(7) are only read as base 10 numbers, and 12 is the smallest unused number which shares a factor with 9 in base 10.
a(8) = 24 as the maximum digit in a(7) = 12 and 24 is 4, and 12_k shares a factor with 24_k when they are read as numbers in all bases k = 5,6,7,8,9,10. No unused smaller number has this property, e.g. a(8) cannot equal 8 as a(7) in base 9 is 12_9 = 11, which does not share a factor with 8_9 = 8. This is the first term to differ from A064413.
a(9) = 8 as the maximum digit in a(8) = 24 and 8 is 8, and 24_k shares a factor with 8_k when they are read as numbers in all bases k = 9,10.
		

Crossrefs

Showing 1-8 of 8 results.