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.

A280864 Lexicographically earliest infinite sequence of distinct positive terms such that, for any prime p, any run of consecutive multiples of p has length exactly 2.

This page as a plain text file.
%I A280864 #219 Mar 08 2025 04:03:49
%S A280864 1,2,4,3,6,8,5,10,12,9,7,14,16,11,22,18,15,20,24,21,28,26,13,17,34,30,
%T A280864 45,19,38,32,23,46,36,27,25,35,42,48,29,58,40,55,33,39,52,44,77,49,31,
%U A280864 62,50,65,78,54,37,74,56,63,51,68,60,75,41,82,64,43,86
%N A280864 Lexicographically earliest infinite sequence of distinct positive terms such that, for any prime p, any run of consecutive multiples of p has length exactly 2.
%C A280864 In other words, each multiple of a prime p has exactly one neighbor that is also a multiple of p.
%C A280864 This sequence is similar to A280866; the first difference occurs at n=42: a(42)=55 whereas A280866(42)=50.
%C A280864 Conjectured to be a permutation of the positive integers.
%C A280864 Sometimes referred to as the "cup of coffee" sequence, since it feels as if just one more cup of coffee is all it would take to prove that this is indeed a permutation of the positive integers. - _N. J. A. Sloane_, Nov 04 2020
%C A280864 There are several short cycles, and apparently at least two infinite cycles. For a list see the attached file "Properties of A280864". - _N. J. A. Sloane_, Feb 03 2017
%C A280864 Properties (For proofs, see the attached file "Properties of A280864")
%C A280864 Theorem 1: This sequence contains every prime and every even number. (Added by _N. J. A. Sloane_, Jan 15 2017)
%C A280864 Theorem 2: The sequence contains infinitely many odd composite numbers. (Added by _N. J. A. Sloane_, Feb 14 2017)
%C A280864 Theorem 3: If p is an odd prime, the sequence contains infinitely many odd multiples of p. (Added by _N. J. A. Sloane_, Mar 12 2017, with corrected proof Apr 03 2017)
%C A280864 There are two types of primes in this sequence: Type I, the first time a term a(n) is divisible by p is when a(n)=p for some n; Type II, the first time a term a(n) is divisible by p is when a(n)=k*p for some n and some k>1 (the Type II primes are listed in A280745).
%C A280864 Conjecture 4: If a prime p divides a(n) then p <= n. - _N. J. A. Sloane_, Apr 07 2017 and Apr 16 2017
%C A280864 Theorem 5: The sequence is a permutation of the natural numbers iff it contains every square. - _N. J. A. Sloane_, Apr 14 2017
%C A280864 From _Bob Selcoe_, Apr 03 2017: (Start)
%C A280864 Define the "radical class" C_R to be the set of numbers which have the same radical R (or the same largest squarefree divisor - i.e., the same product of their prime factors). These are the columns in A284311. So for example C_10 is the set of numbers with radical 10 or prime factors {2,5}: {10, 20, 40, 50, 80, 100, 160, ...}.
%C A280864 If the sequence contains any members of C_R, then those members must appear in order; so for example, if 160 has appeared, {10, 20, 40, 50, 80} will have already appeared, in that order. Naturally, this holds for prime powers; for example, C_5: if 3125 has appeared, {5, 25, 125, 625} will have appeared earlier, in that order.
%C A280864 After seeing a(n), let S be smallest missing number (A280740) and let prime(G) be largest prime already appearing in the sequence. Conjecture: Prime(G) < S <= prime(G+1), and a(35) = 25 = S is the only nonprime S term (following a(31) = 23, preceding a(39) = 29). (End)
%H A280864 N. J. A. Sloane, <a href="/A280864/b280864.txt">Table of n, a(n) for n = 1..100000</a> (First 10000 terms from Rémy Sigrist)
%H A280864 Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, <a href="https://arxiv.org/abs/2012.04625">Finding structure in sequences of real numbers via graph theory: a problem list</a>, arXiv:2012.04625, Dec 08, 2020
%H A280864 Rémy Sigrist, <a href="/A280864/a280864.gp.txt">PARI program for A280864</a>
%H A280864 N. J. A. Sloane, <a href="/A280864/a280864_5.txt">Properties of A280864</a> [Revised, Apr 25 2017]
%H A280864 N. J. A. Sloane, <a href="/A280864/a280864.txt">Table of n, a(n) for n = 1..1000000</a>, computed using Sigrist's PARI program.
%H A280864 N. J. A. Sloane, <a href="/A195264/a195264.pdf">Confessions of a Sequence Addict (AofA2017)</a>, slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
%e A280864 The first terms, alongside their required and forbidden prime factors are:
%e A280864 n   a(n)  Required  Forbidden
%e A280864 --  ----  --------  ---------
%e A280864 1      1  none      none
%e A280864 2      2  none      none
%e A280864 3      4  2         none
%e A280864 4      3  none      2
%e A280864 5      6  3         none
%e A280864 6      8  2         3
%e A280864 7      5  none      2
%e A280864 8     10  5         none
%e A280864 9     12  2         5
%e A280864 10     9  3         2
%e A280864 11     7  none      3
%e A280864 12    14  7         none
%e A280864 13    16  2         7
%e A280864 14    11  none      2
%e A280864 15    22  11        none
%e A280864 16    18  2         11
%e A280864 17    15  3         2
%e A280864 18    20  5         3
%e A280864 19    24  2         5
%e A280864 20    21  3         2
%e A280864 21    28  7         3
%e A280864 22    26  2         7
%e A280864 23    13  13        2
%e A280864 24    17  none      13
%e A280864 25    34  17        none
%e A280864 26    30  2         17
%e A280864 27    45  3, 5      2
%e A280864 28    19  none      3, 5
%e A280864 29    38  19        none
%e A280864 30    32  2         19
%e A280864 31    23  none      2
%e A280864 32    46  23        none
%e A280864 33    36  2         23
%e A280864 34    27  3         2
%e A280864 35    25  none      3
%e A280864 36    35  5         none
%e A280864 37    42  7         5
%e A280864 38    48  2, 3      7
%e A280864 39    29  none      2, 3
%e A280864 40    58  29        none
%e A280864 41    40  2         29
%e A280864 42    55  5         2
%p A280864 N:= 1000: # to get all terms until the first term > N
%p A280864 A[1]:= 1:
%p A280864 A[2]:= 2:
%p A280864 G:= {}:
%p A280864 Avail:= [$3..N]:
%p A280864 found:= true:
%p A280864 lastn:= 2:
%p A280864 for n from 3 while found and nops(Avail)>0 do
%p A280864   found:= false;
%p A280864   H:= G;
%p A280864   G:= numtheory:-factorset(A[n-1]);
%p A280864   r:= convert(G minus H,`*`);
%p A280864   s:= convert(G intersect H, `*`);
%p A280864   for j from 1 to nops(Avail) do
%p A280864     if Avail[j] mod r = 0 and igcd(Avail[j],s) = 1 then
%p A280864       found:= true;
%p A280864       A[n]:= Avail[j];
%p A280864       Avail:= subsop(j=NULL,Avail);
%p A280864       lastn:= n;
%p A280864       break
%p A280864     fi
%p A280864   od;
%p A280864 od:
%p A280864 seq(A[i],i=1..lastn); # _Robert Israel_, Mar 22 2017
%t A280864 terms = 100;
%t A280864 rad[n_] := Times @@ FactorInteger[n][[All, 1]];
%t A280864 A280864 = Reap[present = 0; p = 1; pp = 1; Do[forbidden = GCD[p, pp]; mandatory = p/forbidden; a = mandatory; While[BitGet[present, a] > 0 || GCD[forbidden, a] > 1, a += mandatory]; Sow[a]; present += 2^a; pp = p; p = rad[a], terms]][[2, 1]] (* _Jean-François Alcover_, Nov 23 2017, translated from _Rémy Sigrist_'s PARI program *)
%Y A280864 See A280738, A280740, A280741 (inverse), A280742, A280743, A280744, A280745, A280746, A280755, A280770, A280771, A280773, A280774, A283832, A284724, A284725, A284726, A284785, A285181 for various subsidiary sequences.
%Y A280864 A280754 gives fixed points.
%Y A280864 Cf. A280866.
%Y A280864 In the same spirit as A064413 and A098550.
%Y A280864 A338338, A338444, and A375029 are variants.
%Y A280864 A373797 is a finite version.
%K A280864 nonn,nice
%O A280864 1,2
%A A280864 _Rémy Sigrist_, Jan 09 2017
%E A280864 Added "infinite" to definition. - _N. J. A. Sloane_, Sep 28 2019