OFFSET
1,1
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
----------------------------------------
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..65536 [Terms 1 to 10000 from Scott R. Shannon]
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
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 17 2024
EXTENSIONS
More terms from Michael De Vlieger, Dec 17 2024
STATUS
approved