A336957 The Enots Wolley sequence: the lexicographically earliest infinite sequence {a(n)} of distinct positive numbers such that, for n>2, a(n) has a common factor with a(n-1) but not with a(n-2).
1, 2, 6, 15, 35, 14, 12, 33, 55, 10, 18, 21, 77, 22, 20, 45, 39, 26, 28, 63, 51, 34, 38, 57, 69, 46, 40, 65, 91, 42, 30, 85, 119, 56, 24, 75, 95, 76, 36, 87, 145, 50, 44, 99, 93, 62, 52, 117, 105, 70, 58, 261, 111, 74, 68, 153, 123, 82, 80, 115, 161, 84, 60, 155, 217, 98, 48, 129, 215, 100
Offset: 1
Keywords
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..20000.
- David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669 [math.NT], 2015. Also Journal of Integer Sequences, Vol. 18 (2015), Article 15.6.7
- Scott R. Shannon, The first million terms (7-Zip compressed file)
- Scott R. Shannon, Image of the first 100000 terms. The green line is y=x.
- Scott R. Shannon, Image of the first 1000000 terms. The green line is y=x.
- Scott R. Shannon, Graph of 11.33 million terms, based on F. Stevenson's data, plotted with colors indicating the least prime factor (lpf). Terms with an lpf of 2 are shown in white, terms with an lpf of 3,5,7,11,13,17,19 are shown as one of the seven rainbow colors from red to violet, and terms with an lpf >= 23 are shown in gray.
- Scott R. Shannon, Graph of the terms with lpf = 2. This, and the similar graphs below, are using F. Stevenson's data of 11.33 million terms. The y-axis scale is the same as the above multi-colored image. The green line is y = x.
- Scott R. Shannon, Graph of the terms with lpf = 3.
- Scott R. Shannon, Graph of the terms with lpf = 5.
- Scott R. Shannon, Graph of the terms with lpf = 7.
- Scott R. Shannon, Graph of the terms with lpf = 11.
- Scott R. Shannon, Graph of the terms with lpf = 13.
- Scott R. Shannon, Graph of the terms with lpf = 17.
- Scott R. Shannon, Graph of the terms with lpf = 19.
- Scott R. Shannon, Graph of the terms with lpf >= 23.
- N. J. A. Sloane, Table of n, a(n) for n = 1..161734
- N. J. A. Sloane, Graph of 11.33 million terms, based on F. Stevenson's table. The red line is y=x. It is hard to believe, but there are as many points above the red line as there are below it (see the next graph). Out of 11333576 points, 46% (5280697), all even, lie below the red line. All the odd points lie above the red line.
- N. J. A. Sloane, Blowup of last 1.133 million points of the previous graph. There are a very large number of points in a narrow band below the red line.
- N. J. A. Sloane, Conant's Gasket, Recamán Variations, the Enots Wolley Sequence, and Stained Glass Windows, Experimental Math Seminar, Rutgers University, Sep 10 2020 (video of Zoom talk).
- N. J. A. Sloane, "A Handbook of Integer Sequences" Fifty Years Later, arXiv:2301.03149 [math.NT], 2023, p. 16.
- Frank Stevenson, First five million terms (zipped file, starting with a(4)=15)
- Frank Stevenson, First 11333573 terms (zipped file, starting with a(4)=15)
Crossrefs
Cf. A000961, A098550, A098548, A064413, A255582, A020639, A006530, A337648, A337649, A338050 (fixed points), A338051 (a(n)-n).
See A337066 for when n appears, A337275 for when 2p appears, A337276 for when 2k appears, A337280 for when p first divides a term, A337644 for runs of three odd terms, A337645 & A338052 for smallest missing legal number, A337646 & A337647 for record high points, A338056 & A338057 for record high values for a(n)/n.
A280864 is a different but very similar lexicographically earliest sequence.
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]): for n from 1 to 2 do A[n]:= n: od: for n from 3 do for k from 3 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)]; # N. J. A. Sloane, Sep 24 2020, based on Theorem 1 and Robert Israel's program for sequence A098550
-
Mathematica
M = 1000; A[1] = 1; A[2] = 2; Clear[B]; B[_] = 0; For[n = 3, True, n++, For[k = 3, k <= M, k++, If[B[k] == 0 && GCD[k, A[n-1]] > 1 && GCD[k, A[n-2]] == 1, If[Length[ FactorInteger[k][[All, 1]] ~Complement~ FactorInteger[A[n-1]][[All, 1]]] > 0, A[n] = k; B[k] = 1; Break[]]]]; If[k > M, Break[]]]; Array[A, n-1] (* Jean-François Alcover, Oct 20 2020, after Maple *)
-
Python
from math import gcd from sympy import factorint from itertools import count, islice def agen(): # generator of terms a, seen, minan = [1, 2], {1, 2}, 3 yield from a for n in count(3): an, fset = minan, set(factorint(a[-1])) while True: if an not in seen and gcd(an, a[-1])>1 and gcd(an, a[-2])==1: if set(factorint(an)) - fset > set(): break an += 1 a.append(an); seen.add(an); yield an while minan in seen: minan += 1 print(list(islice(agen(), 70))) # Michael S. Branicky, Jan 22 2022
Extensions
Added "infinite" to definition. - N. J. A. Sloane, Sep 03 2020
Added Scott R. Shannon's name "Enots Wolley" (Yellowstone backwards) for this sequence to the definition, since that has been mentioned in several talks. - N. J. A. Sloane, Oct 11 2020
Comments
= 1. If q=2 then a(n) is even. So we may suppose q is odd. If x is odd then a(n+1) = 2*p. If x is even then obviously a(n-1) is even. So one of a(n-1), a(n), or a(n+1) is even for every prime p. So there are infinitely many even terms. QED - N. J. A. Sloane, Aug 28 2020
A337648), that there are precisely 34 instances when q = 3 (see A337649), and q>3 happens just once, at a(5) = 35 when q=5 and p=7.