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.

Previous Showing 21-30 of 54 results. Next

A285181 Index m such that A280864(m) = n^2.

Original entry on oeis.org

1, 3, 10, 13, 35, 33, 48, 65, 94, 100, 86, 142, 144, 157, 148, 258, 399, 300, 453, 395, 319, 483, 358, 565, 720, 665, 845, 755, 893, 864, 924, 1009, 1033, 1133, 1216, 1262, 1293, 1437, 1375, 1603, 1724, 1720, 2015, 1898, 2154, 2078, 2071, 2257, 2547, 2422, 2687, 2618, 2714, 2807, 3055, 3034
Offset: 1

Views

Author

N. J. A. Sloane, Apr 14 2017

Keywords

Crossrefs

Cf. A280864.

Programs

  • Maple
    # Let b280864 contain a list of the terms of A280864
    a:=[];
    for n from 1 to 500 do
    if member(n^2, b280864,'p') then a:=[op(a),p]; else  \
    lprint("error",n); break; fi; od:
    a;
  • Mathematica
    nn = 3600; c[] := False; m[] := 1;
    Set[{i, j, s, t, c[1], c[2]}, {1, 2, {}, {2}, True, True}];
    s = Sort[{{1, 1}}~Join~Reap[Do[
      r = Times @@ Select[t, FreeQ[s, #] &];
      v = Times @@ Intersection[s, t];
      k = m[r]; While[Or[c[#], ! CoprimeQ[v, #]] &[k*r], k++]; k *= r;
      Set[{c[k], i, j, s, t}, {True, j, k, t, FactorInteger[k][[All, 1]]}];
      If[k == u, While[c[u], u++]]; While[c[r*m[r]], m[r]++];
      If[IntegerQ@ Sqrt[k], Sow[{Sqrt[k], n}]], {n, 3, nn}] ][[-1, 1]] ];
    s[[;; #, -1]] &@ LengthWhile[Differences@ s[[;; , 1]], # == 1 &] (* Michael De Vlieger, Apr 11 2025 *)

A372514 Index k such that A280864(k) = A019565(n) or 0 if A019565(n) does not appear in A280864.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 17, 26, 11, 12, 20, 37, 36, 72, 73, 207, 14, 15, 43, 68, 42, 106, 107, 310, 47, 151, 152, 442, 294, 745, 746, 2227, 23, 22, 44, 53, 52, 130, 114, 386, 83, 188, 156, 519, 189, 884, 754, 2573, 115, 269, 270, 816, 387, 1405, 1406, 4134, 563, 1954
Offset: 0

Views

Author

Michael De Vlieger, Jul 29 2024

Keywords

Comments

Offset matches A019565.
Based on Selcoe's comment in A280864 regarding k in sequences S_r = { k = m*r : rad(m) | r }, squarefree r > 1, appearing in order. The appearance of r itself introduces the lineage S_r, followed by lpf(r)*r, etc., if A280864 is a permutation of natural numbers.
Conjecture: there are no zeros in this sequence, which is equivalent to the conjecture that A280864 is a permutation of natural numbers. Minor corollary: a(127) > 2^18.

Examples

			Let s = A019565 and let t = A280864.
a(0) = 1 since s(0) = 1 = t(1).
a(1) = 2 since s(1) = 2 = t(2).
a(2) = 4 since s(2) = 3 = t(4).
a(3) = 5 since s(3) = 5 = t(5).
Table relating this sequence to s and t. The last column shows Y if s(n) is divisible by the prime in the heading, otherwise ".":
   n   s(n)  a(n)   2357
  ----------------------
   0     1     1    .
   1     2     2    Y
   2     3     4    .Y
   3     6     5    YY
   4     5     7    ..Y
   5    10     8    Y.Y
   6    15    17    .YY
   7    30    26    YYY
   8     7    11    ...Y
   9    14    12    Y..Y
  10    21    20    .Y.Y
  11    42    37    YY.Y
  12    35    36    .YYY
  13    70    72    Y.YY
  14   105    73    .YYY
  15   210   207    YYYY
  ...
		

Crossrefs

Programs

  • Mathematica
    nn = 2^13; r = s = 1; c[_] := False;
    rad[n_] := rad[n] = Times @@ FactorInteger[n][[All, 1]];
    a = Monitor[Reap[Do[w = GCD[r, s]; k = m = r/w;
        While[Or[c[k], ! CoprimeQ[w, k] ], k += m]; Sow[k]; c[k] = True;
        s = r; r = rad[k], {i, nn}]][[-1, 1]], i];
    Array[FirstPosition[a, Times @@ Prime@ Position[Reverse[IntegerDigits[#, 2]], 1][[All, 1]] ][[1]] &, 61, 0]

Formula

a(2^k) > 0 and a(2*m+1) > 0, consequences of Theorem 1 in A280864.

A373800 a(n) = max{b(1),...,b(n)}, where b = A280864.

Original entry on oeis.org

1, 2, 4, 4, 6, 8, 8, 10, 12, 12, 12, 14, 16, 16, 22, 22, 22, 22, 24, 24, 28, 28, 28, 28, 34, 34, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 48, 48, 58, 58, 58, 58, 58, 58, 58, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 82, 82, 82, 86, 86, 99, 99, 99, 99, 105, 105, 105, 105, 105
Offset: 1

Views

Author

N. J. A. Sloane, Aug 03 2024

Keywords

Crossrefs

Cf. A280864. Used in A373797.

A280773 Primes p such that A280864(k) = 5p for some k yet A280864(k+1) != 6p.

Original entry on oeis.org

3, 5, 11, 23, 31, 73, 79, 83, 109, 127, 139, 181, 191, 193, 197, 199, 211, 241, 227, 229, 233, 239, 251, 257, 271, 263, 269, 277, 281, 293
Offset: 1

Views

Author

N. J. A. Sloane, Jan 18 2017

Keywords

Comments

Let Q be a fixed odd prime. It appears that with only finitely many exceptions, when there is a term A280864(k) = Q*p, p prime, then the next term in A280864, A280864(k+1), is (Q+1)*p.
The present sequence lists the exceptions in the case Q=5. It is quite likely that there are no further terms.
If Q=3, it appears that there are just five exceptions, 3, 11, 31, 59, 71.
If Q=7, the complete list of exceptions appears to be 3, 5, 7, 11, 23, 37, 43, 73, 79, 83, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 251, 257, 263, 269, 277, 1021, 1069, 1103, 1153.
If Q=11, the complete list of exceptions appears to be 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 47, 53, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 127, 139, 149, 151, 167, 173, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 251, 257, 263, 269, 277, 281, 293, 311, 353, 431, 557, 563, 571, 619, 1289, 1291, 1307, 1499, 1571, 1579, 1583, 1621, 1627, 2011, 2029, 2131, 2207, 2221, 2281, 2287, 2311, 2341, 2347, 2357, 2399, 2551.
All four of these searches were carried out using the first 100000 terms of A280864.

Examples

			A280864(42) = 55 = 5*11, yet A280864(43) = 33 (not 66), so 11 is a term.
The more typical behavior is illustrated by A280864(52) = 65 = 5*13 and A280864(53) = 78 = 6*13 (and so 13 is not a term).
		

Crossrefs

Cf. A280964.

A282024 Define k by A280864(k) = 2^n; then a(n) = A280864(k-1)/2, or -1 if that is not an integer.

Original entry on oeis.org

1, 3, 7, 19, 41, 74, 131, 302, 523, 1031, 2458, 4132, 8209, 16381, 32832, 84614, 131101, 262139
Offset: 2

Views

Author

N. J. A. Sloane, Feb 10 2017

Keywords

Comments

It is known that every even number appears in A280864, and that the powers of 2 appear in increasing order.
If it were known that A280864(k-1) were always even, this would prove that A280864 contains every odd number, and so complete the proof that A280864 contains every positive number.

Crossrefs

A284785 a(n) = rad(A280864(n)).

Original entry on oeis.org

1, 2, 2, 3, 6, 2, 5, 10, 6, 3, 7, 14, 2, 11, 22, 6, 15, 10, 6, 21, 14, 26, 13, 17, 34, 30, 15, 19, 38, 2, 23, 46, 6, 3, 5, 35, 42, 6, 29, 58, 10, 55, 33, 39, 26, 22, 77, 7, 31, 62, 10, 65, 78, 6, 37, 74, 14, 21, 51, 34, 30, 15, 41, 82, 2, 43, 86
Offset: 1

Views

Author

Bob Selcoe, Apr 02 2017

Keywords

Comments

By definition, all terms are squarefree (see A007947); repeated terms here are the squarefree kernels of A280864(n).
All even squarefree numbers appear infinitely often.
1 appears only at a(1).
Even terms appear consecutively in pairs, each pair followed by one or more odd terms.
Conjecture: all odd squarefree numbers > 1 appear infinitely often. If so, then A280864 is a permutation of the natural numbers.
Theorem: a(n) = b(n-1)*b(n) where b = A280738. - N. J. A. Sloane, Apr 11 2017

Examples

			a(61) = 30 because A280864(61) = 60, and rad(60) = 30.
		

Crossrefs

A338359 First differences of A280864.

Original entry on oeis.org

1, 2, -1, 3, 2, -3, 5, 2, -3, -2, 7, 2, -5, 11, -4, -3, 5, 4, -3, 7, -2, -13, 4, 17, -4, 15, -26, 19, -6, -9, 23, -10, -9, -2, 10, 7, 6, -19, 29, -18, 15, -22, 6, 13, -8, 33, -28, -18, 31, -12, 15, 13, -24, -17, 37, -18, 7, -12, 17, -8, 15, -34, 41, -18, -21, 43, -20, 33, -52, 47, -24
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2020

Keywords

Crossrefs

Cf. A280864.

A370628 a(n) = GCD(A280864(n), A280864(n+1)).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 5, 2, 3, 1, 7, 2, 1, 11, 2, 3, 5, 4, 3, 7, 2, 13, 1, 17, 2, 15, 1, 19, 2, 1, 23, 2, 9, 1, 5, 7, 6, 1, 29, 2, 5, 11, 3, 13, 4, 11, 7, 1, 31, 2, 5, 13, 6, 1, 37, 2, 7, 3, 17, 4, 15, 1, 41, 2, 1, 43, 2, 33, 1, 47, 2, 35, 3, 19, 4, 3, 23, 4, 5
Offset: 1

Views

Author

Rémy Sigrist, May 01 2024

Keywords

Examples

			a(89) = GCD(A280864(89), A280864(90)) = GCD(90, 135) = 45.
		

Crossrefs

Programs

  • Mathematica
    terms = 100;
    rad[n_] := Times @@ FactorInteger[n][[All, 1]];
    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]];
    Clear[a];
    a[n_] := GCD[A280864[[n]], A280864[[n + 1]]];
    Table[a[n], {n, 1, terms - 1}] (* Jean-François Alcover, May 10 2024, adapted from Rémy Sigrist's PARI program *)
  • PARI
    \\ See Links section.

Formula

GCD(a(n), a(n+1)) = 1.
A007947(a(n)) = A280738(n).
a(n) = 1 iff n belongs to A280774.

A374191 Triangle read by rows: T(n) is a permutation of [0, 1, 2, ..., n] subject to an extended Sigrist condition (A280864).

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 1, 2, 0, 3, 0, 3, 1, 2, 4, 1, 2, 4, 3, 0, 5, 1, 2, 0, 5, 3, 6, 4, 2, 1, 3, 6, 4, 5, 0, 7, 1, 2, 4, 3, 6, 8, 5, 0, 7, 3, 1, 2, 4, 5, 0, 7, 8, 6, 9, 1, 2, 4, 3, 9, 5, 10, 8, 7, 0, 6, 6, 1, 2, 4, 3, 9, 5, 10, 8, 7, 0, 11, 1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 0, 11
Offset: 0

Views

Author

Peter Luschny, Jul 31 2024

Keywords

Comments

In a series of submissions (A280864, A280866, A375029, A375030) Rémy Sigrist studies sequences whose terms are locally connected via their prime factors, i.e., where neighbors influence each other in their divisibility.
Sigrist chooses IN = {1, 2,...} as domain. The triangle discussed here is based on Sigrist's idea but chooses IN = {0, 1, 2,...} as the domain. We recall that all numbers divide 0, but 0 only divides 0. Neither 0 nor 1 have prime factors.
For a row of the triangle T(n) = [T(n, k) | k=0..n] and for a term t in this row, let 't be its predecessor and t' its successor. The terms of a row are subject to the following two conditions:
(1) For all k in 1..n-1 and t = T(n, k), t has no prime factor, or it is not the case that there is a prime factor of t such that (p | 't) <=> (p | t'). Expressed more succinctly (in pseudo-Python):
all(not any((p | 't) <=> (p | t') for p in primefactors(t)) for k = 1..n-1).
(2) If t = T(n, n), then t has no prime factor or for all prime factors of t, (p | t) => (p | t').
The row itself must also satisfy two conditions:
(3) T(n) is a permutation of {0, 1, 2, ..., n}.
(4) T(n) is the lexicographically earliest list among all lists whose terms satisfy conditions (1) and (2).
From Peter Luschny, Aug 05 2024: (Start)
On StackExchange (see link), user Bubbler found by exhaustive analysis for n < 29 that only n <= 14 and n = 16 have a solution. Bubbler also states that "since the 4th Ramanujan prime is 29, there are at least four primes that are greater than n/2 (i.e., prime factors that appear only once) when n >= 29 but there are only 3 positions that such primes can go (both sides of 0 and the first element), which proves that there is no solution when n >= 29."
We set all terms of row 15 equal to 0 by convention to make the sequence finite and full. (End)

Examples

			Triangle starts:
  [ 0] (0)
  [ 1] (0, 1)
  [ 2] (0, 2, 1)
  [ 3] (1, 2, 0, 3)
  [ 4] (0, 3, 1, 2, 4)
  [ 5] (1, 2, 4, 3, 0, 5)
  [ 6] (1, 2, 0, 5, 3, 6,  4)
  [ 7] (2, 1, 3, 6, 4, 5,  0,  7)
  [ 8] (1, 2, 4, 3, 6, 8,  5,  0,  7)
  [ 9] (3, 1, 2, 4, 5, 0,  7,  8,  6,  9)
  [10] (1, 2, 4, 3, 9, 5, 10,  8,  7,  0,  6)
  [11] (6, 1, 2, 4, 3, 9,  5, 10,  8,  7,  0, 11)
  [12] (1, 2, 4, 3, 6, 8,  5, 10, 12,  9,  7,  0, 11)
  [13] (7, 1, 2, 4, 3, 6,  8,  5, 10, 12,  9, 11,  0, 13)
  [14] (2, 1, 3, 6, 4, 5, 10,  8,  7, 14, 12,  9, 11,  0, 13)         (*)
  [15] (0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 0)
  [16](11, 1, 2, 4, 3, 6,  8,  5, 10, 12,  9,  7, 14, 16, 13, 0, 15)  (*)
  (*) Found by Bubbler (see link).
.
The terms of T(11, k) alongside their prime factors are:
    k   T(11,k)   prime factors
  --  -------  ---------------
   0     6      2  3
   1     1
   2     2      2
   3     4      2
   4     3         3
   5     9         3
   6     5            5
   7    10      2     5
   8     8      2
   9     7              7
  10     0
  11    11                11
		

Crossrefs

Programs

  • Python
    from sympy import primefactors
    from itertools import permutations
    def test(a: int, b: int, p: int) -> bool:
        return (a % p == 0) == (b % p == 0)
    def isSolution(S: tuple[int,...]) -> bool:
        if len(S) == 1: return True
        if not all(test(S[-2], S[-1], p)
               for p in primefactors(S[-1])):
            return False
        return all(not any(test(S[i-1], S[i+1], p)
               for p in primefactors(S[i]))
               for i in range(1, len(S) - 1))
    def Trow(r: int) -> tuple[int,...] | None:
        C = list(range(r + 1))
        for P in permutations(C):
            if isSolution(P): return P
    for n in range(9): print(Trow(n))

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).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Suggested by the Yellowstone permutation A098550 except that now the key conditions in the definition have been reversed.
Let Ker(k), the kernel of k, denote the set of primes dividing k. Thus Ker(36) = {2,3}, Ker(1) = {}. Then Product_{p in Ker(k)} p = A000265(k), which is denoted by ker(k).
Theorem 1: For n>2, a(n) is the smallest number m not yet in the sequence such that
(i) Ker(m) intersect Ker(a(n-1)) is nonempty,
(ii) Ker(m) intersect Ker(a(n-2)) is empty, and
(iii) The set Ker(m) \ Ker(a(n-1)) is nonempty.
(Without condition (iii), every prime dividing m might also divide a(n-1), which would make it impossible to find a(n+1).)
Idea of proof: m always exists and is unique; no smaller choice for a(n) is possible; and taking a(n)=m does not lead to a contradiction. So a(n) must be m.
Theorem 2: For n>2, Ker(a(n)) contains at least two primes. (Immediate from Theorem 1, since a(n) must contain a prime in a(n-1) and a prime not in a(n-1).)
It follows that no odd prime p or even-or-odd prime power q^k, k>1, appears in the sequence. Obviously this sequence is not a permutation of the positive integers.
Theorem 3. For any M there is an n_0 such that n > n_0 implies a(n) > M. (This is a standard property of any sequence of distinct positive terms - see the Yellowstone paper).
Theorem 4. For any prime p, some term is divisible by p.
Proof. Take p=17 for concreteness. If 17 does not divide any term, then 19 cannot either (because the first time 19 appears, we could have used 17 instead).
So all terms are products only of 2,3,5,7,11,13. Go out a long way, use Theorem 2, and consider two huge successive terms, A*B, C*D, where Ker(B) = Ker(C) and Ker(A) intersect Ker(D) is empty. Either C or D must contain a huge prime power q^k, 2 <= q <= 13. If it is in C, replace it by q and multiply D by 17. If it is in D, replace it by 17. Either way we get a smaller legal candidate for C*D that is a multiple of 17. QED
Theorem 5. There are infinitely many even terms.
Proof. Suppose the prime p appears for the first times as a factor of a(n). Then we have a(n-1) = x*q^i, a(n) = q*p, where q

= 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

Theorem 6: For any prime p, infinitely many terms are divisible by p. - N. J. A. Sloane, Sep 09 2020. (I thought I had a proof that for any odd prime p, there is a term equal to 2p, but there was a gap in the argument. - N. J. A. Sloane, Sep 23 2020)
Theorem 7: There are infinitely many odd terms. - N. J. A. Sloane, Sep 12 2020
Conjecture 1: Every number with at least two distinct prime factors is in the sequence. In other words, apart from 1 and 2, this sequence is the complement of A000961.
[It seems very likely that the arguments used to prove Theorem 1 of the Yellowstone Permutation paper can be modified to prove the conjecture.]
The conditions permit us to start with a(1)=1, a(2)=2, and that does not lead to a contradiction, so those are the first two terms.
After 1, 2, the next term cannot be 4 or 5, but a(3) = 6 works.
For a(4), we can rule out 3, 4, 5, 7, 8, 9 11, 13 (powers of primes), and 10, 12, and 14 have a common factor with a(2). So a(4) = 15.
The graph of the first 100000 terms (see link) is similar to that of the Yellowstone permutation, but here the points lie on more lines.
The sequence has fixed points at n = 1, 2, 10, 90, 106, 150, 162, 246, 394, 398, 406, 410, ... (see A338050). - Scott R. Shannon, Aug 13 2020
The initial pattern of odd and even terms: (odd, even, even, odd), repeat, is misleading as it does not persist. (See A337644 for more about this point.)
Discussion of when primes first divide some term, from N. J. A. Sloane, Oct 21 2020: (Start)
When an odd prime p first divides a term of the Enots Wolley sequence (the present sequence), that term a(n) is equal to q*p where q
We conjecture that even if p is introduced by some prime q>2, 2*p appears later.
Sequence A337275 lists the index k such that a(k) = 2*prime(n), or -1 if 2*prime(n) is missing, and A338074 lists the indices k such that a(k) is twice a prime.
Comparison of those two sequences shows that they appear to be essentially identical (see the table in A337275).
The differences between the two sequences are caused by the fact that although normally if p and q are odd primes with p < q, then 2p precedes 2q, this is not true for the following primes: (7,5), (31,29), and (109, 113, 107), which appear in the order shown. We conjecture that these are the only exceptions.
Combining the above observations, we conjecture that for n >= 755 (at which point we have seen all the primes <= 367), every prime p is introduced by 2*p, and the terms 2*p appear in their natural order.
(End)

Crossrefs

A337007 and A337008 describe the overlap between successive terms.
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.
See A338053 & A338054 for the "early" terms.
Further properties of the present sequence are studied in A338062-A338071.
A338059 has the missing prime powers inserted (see also A338060, A338061).
See A338055, A338351 for variants.
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
Previous Showing 21-30 of 54 results. Next