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.

A360519 Let C consist of 1 together with all numbers with at least two distinct prime factors; this is the lexicographically earliest infinite sequence {a(n)} of distinct elements of C such that, for n>2, a(n) has a common factor with a(n-1) but not with a(n-2).

Original entry on oeis.org

1, 6, 10, 35, 21, 12, 20, 55, 33, 18, 14, 77, 99, 15, 40, 22, 143, 39, 24, 28, 91, 65, 30, 34, 119, 63, 36, 26, 221, 51, 42, 38, 95, 45, 48, 44, 187, 85, 50, 46, 69, 57, 76, 52, 117, 75, 70, 58, 87, 93, 62, 56, 105, 111, 74, 68, 153, 123, 82, 80, 115, 161, 84, 60, 145, 203, 98, 54, 129, 215, 100, 66, 141
Offset: 1

Views

Author

Keywords

Comments

In other words, C contains all positive numbers except powers of primes p^k, k>=1.
This is a modified version of the Enots Wolley sequence A336957. The modification ensures that the sequence does not contain the prime 2.
Let Ker(k), the kernel of k, denote the set of primes dividing k. Thus Ker(36) = {2,3}, Ker(1) = {}.
Theorem: a(1)=1, a(2)=6; thereafter, a(n) is the smallest number m not yet in the sequence such that
(i) Ker(m) intersect Ker(a(n-1)) is nonempty,
(ii) Ker(m) intersect Ker(a(n-2)) is empty, and
(iii) The set Ker(m) \ Ker(a(n-1)) is nonempty.
Conjecture: The sequence is a permutation of C.

Crossrefs

For a number of sequences related to this, see A361102 (the sequence C) and the following entries.

Programs

  • Maple
    with(numtheory);
    N:= 10^4: # to get a(1) to a(n) where a(n+1) is the first term > N
    B:= Vector(N, datatype=integer[4]):
    A[1]:=1; A[2]:=6;
    for n from 3 do
      for k from 10 to N do
        if B[k] = 0 and igcd(k, A[n-1]) > 1 and igcd(k, A[n-2]) = 1 then
              if nops(factorset(k) minus factorset(A[n-1])) > 0 then
           A[n]:= k;
           B[k]:= 1;
           break;
              fi;
        fi
      od:
      if k > N then break; fi;
    od:
    s1:=[seq(A[i], i=1..n-1)];
  • Mathematica
    nn = 2^12; c[_] = False;
    f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]];
    MapIndexed[
     Set[{a[First[#2]], c[#1]}, {#1, True}] &, {1, 6}];
     u = 10; i = a[1]; j = a[2];
    Do[k = u;
      While[Nand[! PrimePowerQ[k], ! c[k],
        CoprimeQ[i, k], ! CoprimeQ[j, k], ! Divisible[j, f[k]]], k++];
      Set[{a[n], c[k], i, j}, {k, True, j, f[k]}];
      If[k == u, While[Or[c[u], PrimePowerQ[u]], u++]]
      , {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Mar 03 2023 *)