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

A381019 a(n) is the smallest positive integer not yet in the sequence such that a(n) is relatively prime to a(n-i) for all 1 <= i <= min(a(n), n-1).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 4, 13, 17, 19, 23, 29, 9, 31, 37, 8, 41, 43, 47, 53, 59, 61, 6, 67, 71, 73, 79, 83, 89, 25, 97, 101, 103, 107, 109, 12, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 10, 173, 179, 181, 191, 193, 197, 199, 49, 211, 223, 227, 229, 233
Offset: 1

Views

Author

Ali Sada and Allan C. Wechsler, Feb 12 2025

Keywords

Comments

Theorem (Russ Cox, Feb 14-16, 2025): Every positive number will eventually appear. For proof see link.
Jinyuan Wang (Feb 16, 2025) has informed us that he also proved that every number appears.

Examples

			After a(2)=2, the next term that shares a common factor with 2 is a(7)=4, which is permitted since the difference 7-2 = 5 is greater than 4.
		

Crossrefs

A381167 is a different but closely related sequence.

Programs

  • Maple
    N:= 1000: # for terms before the first term > N
    Cands:= [$2..N]: R:= [1]: x:= 1:
    for n from 2 do
      found:= false;
      for j from 1 to N - n do
        if andmap(t -> igcd(t, Cands[j]) = 1, [seq(R[n-i],i=1 .. min(Cands[j],n-1))]) then
          found:= true; x:= Cands[j]; R:= [op(R),x]; Cands:= subsop(j=NULL,Cands); break
        fi od:
      if not found then break fi
    od:
    R; # Robert Israel, Feb 14 2025
  • Mathematica
    nn = 120; c[_] = False; u = v = 2; a[1] = 1;
    Do[k = u;
      While[Or[c[k],
        ! CoprimeQ[k, Product[a[h], {h, n - Min[k, n - 1], n - 1}] ] ],
        If[k > n - 1, k = v, k++]];
      Set[{a[n], c[k]}, {k, True}];
      If[k == u, While[c[u], u++]];
      If[k == v, While[Or[c[v], CompositeQ[v]], v++]], {n, 2, nn}];
    Array[a, nn] (* Michael De Vlieger, Feb 14 2025 *)
  • Python
    # see link for faster version
    from math import gcd
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, an, m = [1], {1}, 1, 2
        for n in count(2):
            yield an
            an = next(k for k in count(m) if k not in aset and all(gcd(alst[-j], k) == 1 for j in range(1, min(k, n-1)+1)))
            alst.append(an)
            aset.add(an)
            while m in aset: m += 1
    print(list(islice(agen(), 61))) # Michael S. Branicky, Feb 13 2025

Extensions

More terms from Michael S. Branicky, Feb 13 2025

A379810 Composite numbers in A381019 which are immediately followed by another composite number, in order of their appearance.

Original entry on oeis.org

15, 46, 104, 305, 261, 1691, 380, 406, 508, 1175, 3281, 7729, 2827, 10877, 6289, 13289, 1737, 4829, 2945, 3205, 9673, 1940, 21253, 1970, 31921, 21127, 34861, 5457, 22219, 120983, 99893, 110843, 148613, 105029, 164107, 12905, 89279, 15245, 195617, 79909, 89827
Offset: 1

Views

Author

N. J. A. Sloane, Feb 15 2025

Keywords

Comments

Conjecture: For any k >= 1, A381019 contains k consecutive composite terms.
When is the first instance of three consecutive composite terms?

Crossrefs

Formula

a(n) = A381019(A381120(n)).

Extensions

a(6)-a(8) from Michael De Vlieger, Feb 15 2025
More terms from Jinyuan Wang, Feb 23 2025

A381027 Isolated primes in A381019.

Original entry on oeis.org

7643, 26357, 31643, 73517, 114073, 240263, 272347, 635821, 1719491, 2981159, 3610597, 4783469, 5294351, 7140083, 7170769, 9813593, 12521141, 13172477, 20443837, 22499627, 24098573, 24147133, 24891641, 50832209, 57741727, 60328483, 65714459, 84701363, 128297069
Offset: 1

Views

Author

Gonzalo Martínez, Mar 03 2025

Keywords

Comments

Prime numbers k in A381019 such that if k = A381019(m) for some integer m, then A381019(m - 1) and A381019(m + 1) are both composite.

Examples

			7643 is a term, since 75, 7643 and 58 are three consecutive terms of A381019, where A381019(1033) = 7643 is prime, while A381019(1032) = 75 and A381019(1034) = 58 are both composite numbers.
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Mar 09 2025
Showing 1-3 of 3 results.