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.

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.

This page as a plain text file.
%I A379051 #38 Dec 18 2024 01:08:06
%S A379051 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,
%T A379051 33,34,35,31,36,38,39,40,42,44,45,41,46,48,49,50,51,47,52,54,55,56,57,
%U A379051 58,60,62,63,59,64,65,66,68,69,70,72,67,74,75,76,77,78,80
%N 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.
%C A379051 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.
%C A379051 Let P be a property of the nonnegative integers, such as being a prime.
%C A379051 The OEIS contains many entries whose definitions have the following form.
%C A379051 "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."
%C A379051 That is, the terms of the sequence tell you which terms of the sequence have the property. A121053 is the classical example.
%C A379051 Since these are lists, the offset is usually 1.
%C A379051 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.
%C A379051 Examples:
%C A379051   Property P    Unrestricted    Increasing
%C A379051   ----------------------------------------
%C A379051   Prime         A121053         A079254, A334067 (offset 0)
%C A379051   Even          A080032         A079253
%C A379051   Odd           A079313         A079000
%C A379051   Composite     A379051         A099797
%C A379051   Not composite A377901         A099798
%C A379051   Not prime     A379053         A085925
%H A379051 Michael De Vlieger, <a href="/A379051/b379051.txt">Table of n, a(n) for n = 1..65536</a> [Terms 1 to 10000 from Scott R. Shannon]
%F A379051 When sorted, this appears to be the complement of [1, 3, 11, and prime(2*t), t >= 3]. - _Scott R. Shannon_, Dec 18 2024
%t A379051 nn = 120; u = 3; v = {}; w = {2}; c = 4;
%t A379051 {2}~Join~Reap[Do[
%t A379051   If[MemberQ[w, n],
%t A379051     k = c; w = DeleteCases[w, n],
%t A379051     m = Min[c, u, v]; If[And[CompositeQ[m], n < m],
%t A379051       AppendTo[v, n]];
%t A379051       If[Length[v] > 0,
%t A379051         If[v[[1]] == m,
%t A379051         v = Rest[v] ] ]; k = m];
%t A379051     AppendTo[w, k];
%t A379051     If[k == c, c++; While[PrimeQ[c], c++] ]; Sow[k];
%t A379051 If[n + 1 >= u, u++; While[CompositeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* _Michael De Vlieger_, Dec 17 2024 *)
%Y A379051 Cf. A079000, A079253, A079254, A079313, A080032, A085925, A099797, A099798, A121053, A334067, A377901, A379053.
%Y A379051 See also A080033.
%K A379051 nonn
%O A379051 1,1
%A A379051 _N. J. A. Sloane_, Dec 17 2024
%E A379051 More terms from _Michael De Vlieger_, Dec 17 2024