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

A379051 Lexicographically earliest infinite sequence of distinct positive numbers with the property that n is a member of the sequence iff a(n) is composite.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 17 2024

Keywords

Comments

The sequence tells you exactly which terms of the sequence are composite: the second, fourth, fifth, sixth, etc. terms are composite, and this is the lexicographically earliest sequence with this property.
Let P be a property of the nonnegative integers, such as being a prime.
The OEIS contains many entries whose definitions have the following form.
"The sequence is the lexicographically earliest infinite sequence of distinct positive (or sometimes nonnegative) integers with the property that n is a term of the sequence iff a(n) has property P."
That is, the terms of the sequence tell you which terms of the sequence have the property. A121053 is the classical example.
Since these are lists, the offset is usually 1.
There are two versions, one where the sequence is required to be strictly increasing, and an unrestricted version which is not required to be increasing.
Examples:
Property P Unrestricted Increasing
----------------------------------------
Prime A121053 A079254, A334067 (offset 0)
Composite A379051 A099797
Not composite A377901 A099798
Not prime A379053 A085925

Crossrefs

Programs

  • Mathematica
    nn = 120; u = 3; v = {}; w = {2}; c = 4;
    {2}~Join~Reap[Do[
      If[MemberQ[w, n],
        k = c; w = DeleteCases[w, n],
        m = Min[c, u, v]; If[And[CompositeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0,
            If[v[[1]] == m,
            v = Rest[v] ] ]; k = m];
        AppendTo[w, k];
        If[k == c, c++; While[PrimeQ[c], c++] ]; Sow[k];
    If[n + 1 >= u, u++; While[CompositeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 17 2024 *)

Formula

When sorted, this appears to be the complement of [1, 3, 11, and prime(2*t), t >= 3]. - Scott R. Shannon, Dec 18 2024

Extensions

More terms from Michael De Vlieger, Dec 17 2024

A379053 Lexicographically earliest infinite sequence of distinct positive numbers with the property that n is a member of the sequence iff a(n) is not a prime.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 17 2024

Keywords

Comments

The sequence tells you exactly which terms of the sequence are either 1 or composite.
See the Comments in A379051 for further information.

Crossrefs

Programs

  • Mathematica
    nn = 120; u = 3; v = {}; w = {}; c = 4;
    {1}~Join~Reap[Do[
      If[MemberQ[w, n],
        k = c; w = DeleteCases[w, n],
        m = Min[{c, u, v}]; If[And[CompositeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0,
            If[v[[1]] == m,
            v = Rest[v]]]; k = m];
        AppendTo[w, k]; If[k == c, c++; While[PrimeQ[c], c++]]; Sow[k];
    If[n + 1 >= u, u++; While[CompositeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 17 2024 *)

Formula

When sorted, this appears to be the complement of [2, 5, 11, 17, 29, and prime(2*t+1), t >= 35]. - Scott R. Shannon, Dec 18 2024

Extensions

More terms from Michael De Vlieger, Dec 17 2024
Showing 1-2 of 2 results.