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.

Showing 1-8 of 8 results.

A255370 Position of the n-th prime in A257112.

Original entry on oeis.org

2, 11, 15, 19, 3, 105, 58, 83, 296, 291, 157, 667, 123, 325, 211, 273, 133, 122, 184, 421, 183, 2767, 170, 703, 2060, 2437, 442, 785, 401, 2203, 931, 678, 1795, 1226, 382, 2732, 381
Offset: 1

Views

Author

Keywords

Comments

We conjecture that the sequence is infinite or, equivalently, A257112 contains all primes.
Records: 1, 2, 11, 55, 165, 231, 275, 299, 325, 1547, 1909, 7943, 8215, 14335, 18815, 35953, 70303, 81793, 114481, 190999, 954995, 2021021, 10105105, 22231231, ..., . - Robert G. Wilson v, May 05 2015

Crossrefs

Formula

A257112(a(n)) = prime(n).

A098550 The Yellowstone permutation: a(n) = n if n <= 3, otherwise the smallest number not occurring earlier having at least one common factor with a(n-2), but none with a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 15, 14, 5, 6, 25, 12, 35, 16, 7, 10, 21, 20, 27, 22, 39, 11, 13, 33, 26, 45, 28, 51, 32, 17, 18, 85, 24, 55, 34, 65, 36, 91, 30, 49, 38, 63, 19, 42, 95, 44, 57, 40, 69, 50, 23, 48, 115, 52, 75, 46, 81, 56, 87, 62, 29, 31, 58, 93, 64, 99, 68, 77, 54, 119, 60
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 14 2004

Keywords

Comments

For n > 3, gcd(a(n), a(n-1)) = 1 and gcd(a(n), a(n-2)) > 1. (This is just a restatement of the definition.)
This is now known to be a permutation of the natural numbers: see the 2015 article by Applegate, Havermann, Selcoe, Shevelev, Sloane, and Zumkeller.
From N. J. A. Sloane, Nov 28 2014: (Start)
Some of the known properties (but see the above-mentioned article for a fuller treatment):
1. The sequence is infinite. Proof: We can always take a(n) = a(n-2)*p, where p is a prime that is larger than any prime dividing a(1), ..., a(n-1). QED
2. At least one-third of the terms are composite. Proof: The sequence cannot contain three consecutive primes. So at least one term in three is composite. QED
3. For any prime p, there is a term that is divisible by p. Proof: Suppose not. (i) No prime q > p can divide any term. For if a(n)=kq is the first multiple of q to appear, then we could have used kp < kq instead, a contradiction. So every term a(n) is a product of primes < p. (ii) Choose N such that a(n) > p^2 for all n > N. For n > N, let a(n)=bg, a(n+1)=c, a(n+2)=dg, where g=gcd(a(n),a(n+2)). Let q be the largest prime factor of g. We know q < p, so qp < p^2 < dg, so we could have used qp instead of dg, a contradiction. QED
3a. Let a(n_p) be the first term that is divisible by p (this is A251541). Then a(n_p) = q*p where q is a prime less than p. If p < r are primes then n_p < n_r. Proof: Immediate consequences of the definition.
4. (From David Applegate, Nov 27 2014) There are infinitely many even terms. Proof:
Suppose not. Then let 2x be the maximum even entry. Because the sequence is infinite, there exists an N such that for any n > N, a(n) is odd, and a(n) > x^2.
In addition, there must be some n > N such that a(n) < a(n+2). For that n, let g = gcd(a(n),a(n+2)), a(n) = bg, a(n+1)=c, a(n+2)=dg, with all of b,c,d,g relatively prime, and odd.
Since dg > bg, d > b >= 1, so d >= 3. Also, g >= 3.
Since a(n) = bg > x^2, one of b or g is > x.
Case 1: b > x. Then 2b > 2x, so 2b has not yet occurred in the sequence. And gcd(bg,2b)=b > x > 1, gcd(2b,c)=1, and since g >= 3, 2b < bg < dg. So a(n+2) should have been 2b instead of dg.
Case 2: g > x. Then 2g > 2x, so 2g has not yet occurred in the sequence. And gcd(bg,2g)=g > 1, gcd(2g,c)=1, and since d >= 3, 2g < dg. So a(n+2) should have been 2g instead of dg.
In either case, we derive a contradiction. QED
Conjectures:
5. For any prime p > 97, the first time we see p, it is in the subsequence a(n) = 2b, a(n+2) = 2p, a(n+4) = p for some n, b, where n is about 2.14*p and gcd(b,p)=1.
6. The value of |{k=1,..,n: a(k)<=k}|/n tends to 1/2. - Jon Perry, Nov 22 2014 [Comment edited by N. J. A. Sloane, Nov 23 2014 and Dec 26 2014]
7. Based on the first 250000 terms, I conjectured on Nov 30 2014 that a(n)/n <= (Pi/2)*log n.
8. The primes in the sequence appear in their natural order. This conjecture is very plausible but as yet there is no proof. - N. J. A. Sloane, Jan 29 2015
(End)
The only fixed points seem to be {1, 2, 3, 4, 12, 50, 86} - see A251411. Checked up to n=10^4. - L. Edson Jeffery, Nov 30 2014. No further terms up to 10^5 - M. F. Hasler, Dec 01 2014; up to 250000 - Reinhard Zumkeller; up to 300000 (see graph) - Hans Havermann, Dec 01 2014; up to 10^6 - Chai Wah Wu, Dec 06 2014; up to 10^8 - David Applegate, Dec 08 2014.
From N. J. A. Sloane, Dec 04 2014: (Start)
The first 250000 points lie on about 8 roughly straight lines, whose slopes are approximately 0.467, 0.957, 1.15, 1.43, 2.40, 3.38, 5.25 and 6.20.
The first six lines seem well-established, but the two lines with highest slope at present are rather sparse. Presumably as the number of points increases, there will be more and more lines of ever-increasing slopes.
These lines can be seen in the Havermann link. See the "slopes" link for a list of the first 250000 terms sorted according to slope (the four columns in the table give n, a(n), the slope a(n)/n, and the number of divisors of a(n), respectively).
The primes (with two divisors) all lie on the lowest line, and the lines of slopes 1.43 and higher essentially consist of the products of two primes (with four divisors).
(End)
The eight roughly straight lines mentioned above are actually curves. A good fit for the "line" with slope ~= 1.15 is a(n)~=n(1+1.0/log(n/24.2)), and a good fit for the other "lines" is a(n)~= (c/2)*n(1-0.5/log(n/3.67)), for c = 1,2,3,5,7,11,13. The first of these curves consists of most of the odd terms in the sequence. The second family consists of the primes (c=1), even terms (c=2), and c*prime (c=3,5,7,11,13,...). This functional form for the fit is motivated by the observed pattern (after the first 204 terms) of alternating even and odd terms, except for the sequence pattern 2*p, odd, p, even, q*p when reaching a prime (with q a prime < p). - Jon E. Schoenfield and David Applegate, Dec 15 2014
For a generalization, see the sequence of monomials of primes in the comment in A247225. - Vladimir Shevelev, Jan 19 2015
From Vladimir Shevelev, Feb 24 2015: (Start)
Let P be prime. Denote by S_P*P the first multiple of P appearing in the sequence. Then
1) For P >= 5, S_P is prime.
Indeed, let
a(n-2)=v, a(n-1)=w, a(n)=S_P*P. (*)
Note that gcd(v,P)=1. Therefore, by the definition of the sequence, S_P*P should be the smallest number such that gcd(v,S_P) > 1.
So S_P is the smallest prime factor of v.
2) The first multiples of all primes appear in the natural order.
Suppose not. Then there is a pair of primes P < Q such that S_Q*Q appears earlier than S_P*P. Let
a(m-2)=v_1, a(m-1)=w_1, a(m)=S_Q*Q. (**)
Then, as in (*), S_Q is the smallest prime factor of v_1. But this does not depend on Q. So S_Q*P is a smaller candidate in (**), a contradiction.
3) S_P < P.
Indeed, from (*) it follows that the first multiple of S_P appears earlier than the first multiple of P. So, by 2), S_P < P.
(End)
For any given set S of primes, the subsequence consisting of numbers whose prime factors are exactly the primes in S appears in increasing order. For example, if S = {2,3}, 6 appears first, in due course followed by 12, 18, 24, 36, 48, 54, 72, etc. The smallest numbers in each subsequence (i.e., those that appear first) are the squarefree numbers A005117(n), n > 1. - Bob Selcoe, Mar 06 2015

Crossrefs

Cf. A098548, A098551, A249943 (first time all 1..n appear), A251553.
The inverse permutation is in A098551.
A098552(n) = a(a(n)).
A251102(n) = GCD(a(n+2),a(n)).
Cf. A251101 (smallest prime factor), A251103 (largest prime factor), A251138 (number of distinct prime factors), A251140 (total number of prime factors), A251045 (squarefree part), A251089 (squarefree kernel), A250127 and A251415 (records for a(n)/n), A251411 (fixed points), A248647 (records).
Cf. also A251412 (trajectory of 11), A251556 (finite cycles), A251413 and A251414 (variant involving odd numbers), A249357 ("Fibonacci" variant).
Smallest missing numbers: A251416, A251417, A251546-A251552, A247253. See also A251557, A241558, A251559.
Indices of some pertinent subsequences: A251237 (even numbers), A251238 (odd numbers), A251391 (squarefree), A251541 and A251239 (primes), A251240 (squares of primes), A251241 (prime powers), A251393 (powers of 2), A251392 (nonprimes), A253297 (primes p for which some multiple k*p > 2*p precedes p).
Three arrays concerning the occurrences of multiples of primes: A251637, A251715, A251716.
Two sequences related to the numbers which immediately follow a prime: A253048, A253049. Seven sequences related to the numbers that appear two steps after primes: A251542, A251543, A251544, A251545, A253052, A253053, A253054. See also A253055 and A253056.
Other starting values: A251554, A251555.
See also A064413 (EKG sequence), A255582, A121216 (similar sequences), A257112 (two-dimensional analog).
See also A253765 and A253766 (bisections), A250299 (parity), A253768 (partial sums).
See A336957 for a variation.

Programs

  • Haskell
    import Data.List (delete)
    a098550 n = a098550_list !! (n-1)
    a098550_list = 1 : 2 : 3 : f 2 3 [4..] where
       f u v ws = g ws where
         g (x:xs) = if gcd x u > 1 && gcd x v == 1
                       then x : f v x (delete x ws) else g xs
    -- Reinhard Zumkeller, Nov 21 2014
    
  • Maple
    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 3 do A[n]:= n: od:
    for n from 4 do
      for k from 4 to N do
        if B[k] = 0 and igcd(k,A[n-1]) = 1 and igcd(k,A[n-2]) > 1 then
           A[n]:= k;
           B[k]:= 1;
           break
        fi
      od:
      if k > N then break fi
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Nov 21 2014
  • Mathematica
    f[lst_List] := Block[{k = 4}, While[ GCD[ lst[[-2]], k] == 1 || GCD[ lst[[-1]], k] > 1 || MemberQ[lst, k], k++]; Append[lst, k]]; Nest[f, {1, 2, 3}, 68] (* Robert G. Wilson v, Nov 21 2014 *)
    NN = Range[4, 1000]; a098550 = {1, 2, 3}; g = {-1}; While[g[[1]] != 0, g = Flatten[{FirstPosition[NN, v_ /; GCD[a098550[[-1]], v] == 1 && GCD[a098550[[-2]], v] > 1, 0]}]; If[g[[1]] != 0, d = NN[[g]]; a098550 = Flatten[Append[a098550, d[[1]]]]; NN = Delete[NN, g[[1]]]]]; Table[a098550[[n]], {n, 71}] (* L. Edson Jeffery, Jan 01 2015 *)
  • PARI
    a(n, show=1, a=3, o=2, u=[])={n<3&&return(n); show&&print1("1, 2"); for(i=4,n, show&&print1(","a); u=setunion(u, Set(a)); while(#u>1 && u[2]==u[1]+1, u=vecextract(u,"^1")); for(k=u[1]+1, 9e9, gcd(k,o)>1||next; setsearch(u,k)&&next; gcd(k,a)==1||next; o=a; a=k; break)); a} \\ Replace "show" by "a+1==i" in the main loop to print only fixed points. - M. F. Hasler, Dec 01 2014
    
  • Python
    from math import gcd
    A098550_list, l1, l2, s, b = [1,2,3], 3, 2, 4, {}
    for _ in range(1,10**6):
        i = s
        while True:
            if not i in b and gcd(i,l1) == 1 and gcd(i,l2) > 1:
                A098550_list.append(i)
                l2, l1, b[i] = l1, i, 1
                while s in b:
                    b.pop(s)
                    s += 1
                break
            i += 1 # Chai Wah Wu, Dec 04 2014

A253279 Arrange numbers in a clockwise spiral with initial terms a(1)=1, a(2)=2, a(4)=3, a(6)=4, a(8)=5; thereafter each number shares a factor with each of its four (N,S,E,W) neighbors.

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 10, 5, 20, 8, 14, 16, 18, 9, 15, 21, 7, 28, 22, 24, 26, 30, 25, 35, 40, 32, 34, 36, 38, 42, 27, 33, 39, 45, 48, 56, 44, 70, 46, 50, 52, 13, 65, 60, 51, 75, 55, 66, 54, 57, 72, 58, 62, 64, 68, 78, 63, 69, 81, 84, 80, 74, 76, 82, 41
Offset: 1

Views

Author

Vladimir Shevelev, May 02 2015

Keywords

Comments

Start with smallest number which has not yet appeared and satisfies the conditions: a(3)=6; thereafter always choose smallest number which has not yet appeared and satisfies the conditions.
This is a two-dimensional spiral analog of EKG sequence A064413.
In A064413 we have initial terms in the positions 1,2.
In the two-dimensional case we have 4 sides.
So the initial TERMS are
5
4 1 2 (1)
3
But the POSITIONS in the spiral are indexed thus:
.
7--8--9--10
|
6 1--2
| |
5--4--3
.
So the initial terms, by (1), are a(1)=1, a(2)=2, a(4)=3, a(6)=4, a(8)=5.
Conjecture: The sequence is a permutation of the positive integers. - Vladimir Shevelev, May 06 2015

Examples

			The spiral begins
.
   26--30--25--35--40--32  etc.
    |
   24  10---5--20---8
    |   |           |
   22   4   1---2  14
    |   |       |   |
   28  12---3---6  16
    |               |
    7--21--15---9--18
		

Crossrefs

Extensions

Correction of a(42) and more terms from Peter J. C. Moses, May 03 2015

A354434 a(1) = 1; for n > 1, a(n) is the smallest unused square spiral number such that a(n) shares a factor with all existing numbers in its Moore neighborhood.

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 18, 8, 10, 14, 16, 20, 22, 24, 15, 21, 27, 30, 33, 36, 39, 26, 28, 32, 34, 38, 40, 42, 44, 46, 48, 50, 54, 45, 35, 7, 63, 51, 57, 60, 66, 52, 72, 78, 84, 56, 58, 62, 64, 68, 70, 74, 76, 80, 82, 86, 88, 90, 75, 96, 100, 105, 49, 77, 91, 119, 102, 69, 81, 108, 92, 94, 98, 104
Offset: 1

Views

Author

Scott R. Shannon, May 28 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers, although it takes many terms for most primes to appear, e.g. a(1807) = 13, a(35156) = 179. The primes do not occur in their natural order. In the first 200000 terms the smallest unused prime is 181, while the smallest unused composite number is 11881, which is itself a prime power.

Examples

			The spiral begins
                                .
                                .
    7--35--45--54--50--48--46  82
    |                       |   |
   63  21--15--24--22--20  44  80
    |   |               |   |   |
   51  27   3---6---4  16  42  76
    |   |   |       |   |   |   |
   57  30   9   1---2  14  40  74
    |   |   |           |   |   |
   60  33  12--18---8--10  38  70
    |   |                   |   |
   66  36--39--26--28--32--34  68
    |                           |
   52--72--78--84--56--58--62--64
.
.
a(11) = 14 as the existing numbers in the Moore neighborhood when a(11) is being placed are 4,2,8,10, and 14 is the smallest unused number that shares a factor with all these numbers.
		

Crossrefs

A336946 a(1) = 1; for n > 1, a(n) is the next square spiral number not already used such that a(n) shares a factor with a(n-1) and also with the adjacent number on the inner spiral arm if such a number exists.

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 20, 14, 7, 28, 16, 18, 15, 21, 24, 22, 11, 33, 30, 25, 35, 40, 45, 36, 26, 42, 27, 63, 48, 32, 34, 50, 38, 54, 39, 51, 60, 44, 46, 66, 55, 65, 70, 49, 56, 52, 58, 72, 57, 76, 62, 78, 13, 117, 69, 75, 80, 64, 68, 74, 37, 148
Offset: 1

Views

Author

Scott R. Shannon, Aug 08 2020

Keywords

Comments

This is a variation of the EKG sequence A064413 where the numbers are written on the square spiral such that each new number must share a common factor with not only the previous number but also with the adjacent inner spiral number, in one of the four axial directions, if such a number exists. This additional restriction causes the numbers to violate some of the patterns the numbers form in the standard EKG sequence, e.g., an odd prime p does not need to be preceded by 2p or followed by 3p, and the primes do not appear in increasing order.
For the first 100000 terms the smallest unseen number is 433.

Examples

			The spiral begins
                                .
                                .
   38--50--34--32--48--63--27  78
    |                       |   |
   54  15--18--16--28---7  42  62
    |   |               |   |   |
   39  21   3---6---4  14  26  76
    |   |   |       |   |   |   |
   51  24   9   1---2  20  36  57
    |   |   |           |   |   |
   60  22  12---8--10---5  45  72
    |   |                   |   |
   44  11--33--30--25--35--40  58
    |                           |
   46--66--55--65--70--49--56--52
.
a(1)-a(8) = 1,2,4,6,3,9,12,8. The adjacent inner spiral number is 1 which all numbers share a factor with so the numbers are the same as A064413(n).
a(9) = 10. This is the first number that must have a common factor with two numbers, the previous number a(8) = 8 and the adjacent spiral number a(2) = 2. The lowest unused number satisfying this requirement is 10.
a(10) = 5. As this number is on the corner of a square spiral arm it only needs to share a divisor with a(9) = 10. The lowest unseen number satisfying this is 5.
a(11) = 20.  This number must have a common factor with the previous number a(10) = 5 and the adjacent spiral number a(2) = 2. The lowest unused number satisfying this requirement is 20. This is also the first number to differ from  A064413 which only needs to find the lowest unused number sharing a factor with 5, which is 15.
		

Crossrefs

A255348 a(1)=1, a(2) = 2; for n > 2, a(n) is the smallest number not already used such that the set of prime divisors of one of the numbers {a(n-1), a(n)} is a subset of the set of prime divisors of the other.

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 25, 20, 16, 14, 7, 21, 27, 18, 24, 30, 32, 22, 11, 33, 66, 36, 42, 28, 49, 35, 70, 40, 50, 60, 45, 75, 81, 39, 13, 26, 52, 64, 34, 17, 51, 102, 48, 54, 72, 78, 96, 84, 56, 98, 112, 126, 63, 105, 125, 55, 110, 44, 88, 121, 77
Offset: 1

Views

Author

Vladimir Shevelev, May 05 2015

Keywords

Comments

The sequence is an analog of EKG-sequence A064413 with more hard condition on neighbor terms. However, we conjecture that, as A064413, it is a permutation of the positive integers.
By the definition, every two neighbor terms are strictly connected numbers defined in comment in A257112.

Crossrefs

Extensions

More terms from Peter J. C. Moses, May 05 2015

A257862 a(n) = n if n <= 3, otherwise a(n) is the smallest number not already used and relatively prime to a(n-1) such that the set of prime divisors of one of the numbers {a(n-2), a(n)} is a subset of the set of prime divisors of the other.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 15, 14, 5, 7, 10, 21, 16, 27, 20, 33, 25, 11, 30, 77, 6, 49, 12, 35, 18, 125, 24, 55, 32, 121, 26, 99, 13, 66, 65, 22, 169, 44, 39, 64, 81, 28, 45, 56, 75, 98, 135, 112, 165, 128, 225, 34, 105, 17, 63, 68, 147, 136, 189, 170, 231, 40, 243, 50
Offset: 1

Views

Author

Vladimir Shevelev, May 11 2015

Keywords

Comments

The sequence is an analog of the Yellowstone sequence A098550 with a more stringent condition on neighboriong terms at distance 2. However, we conjecture that, as with A098550, this is a permutation of the positive integers.
By definition, every pair of neighboring terms at distance 2 are strictly connected numbers as defined in comment in A257112.

Crossrefs

Extensions

More terms from Peter J. C. Moses, May 11 2015

A358153 Lexicographically earliest infinite sequence of distinct positive integers on a square spiral such that each number shares a factor with its four orthogonally nearest neighbors but shares no factor with its four diagonal next-nearest neighbors.

Original entry on oeis.org

6, 10, 35, 21, 77, 22, 143, 39, 65, 117, 12, 63, 18, 20, 24, 44, 26, 273, 30, 195, 36, 88, 42, 40, 48, 14, 455, 50, 175, 80, 55, 33, 385, 147, 539, 91, 105, 110, 847, 176, 1001, 28, 119, 51, 187, 153, 85, 459, 595, 15, 54, 351, 66, 189, 72, 99, 57, 95, 114, 100, 78, 220, 52, 60, 34, 833
Offset: 1

Views

Author

Scott R. Shannon, Nov 01 2022

Keywords

Comments

This sequence is a 2D square lattice version of the Enots Wolley sequence A336957. Like that sequence, for this sequence to be infinite no number can be a prime or prime power - the first term must therefore be 6. Likewise, for each of its orthogonal nearest neighbors, a new number must have at least one prime factor that is not a factor of that neighbor. When choosing each new number a further test must also be performed against the previous number that is two squares ahead of the current number and on the edge of the spiral - this number is outside the eight nearest neighbors of the number being determined. See the examples below.
Like A336957 is it conjectured that all nonprime powers eventually appear. In the first 10000 terms the largest value is a(6975) = 3005315.

Examples

			The spiral begins:
.                                             .
                                              .
   105----91---539---147---385----33----55    99
    |                                   |     |
   110    26----44----24----20----18    80    72
    |     |                       |     |     |
   847   273    77----21----35    63   175   189
    |     |     |           |     |     |     |
   176    30    22     6----10    12    50    66
    |     |     |                 |     |     |
  1001   195   143----39----65---117   455   351
    |     |                             |     |
    28    36----88----42----40----48----14    54
    |                                         |
   119----51---187---153----85---459---595----15
.
.
a(5) = 22. The two orthogonal nearest neighbors to the square at (-1,0), relative to the starting central square 6, are 6 and 77. Therefore the new number at that position must share a factor with both of these numbers while containing a factor they do not have. Also the new number must have no factor in common with any diagonal next-nearest neighbors. Only one exists in this case, namely 21. The smallest unused number satisfying all of these conditions is 22.
a(6) = 143. For the square at (-1,-1) the orthogonal nearest neighbor is 22, while the diagonal next-nearest neighbor is 6. As 22 has 2 and 11 as factors, while 6 has 2 and 3, the new number can only be a multiple of 11, must have a factor other than 2 and 11 while not being a multiple of 2 or 3. The smallest unused number satisfying these conditions is 55. However this is where another check must be performed, namely against the number two squares ahead on the spiral from the current number - the number at (1,0) which in this case is 10. The reason this must be checked is that if 55 is chosen as the new number at (-1,-1) then that would force the next number at (0,-1) to be a multiple of 5 - only 5 and 11 are factors of 55 but 11 cannot be a factor of the new number at (0,-1) since it is an orthogonal neighbor to 22 with which it cannot share a factor. But forcing the number at (0,-1) to have 5 as a factor is not permitted since it would then share a factor with its diagonal neighbor 10 at (1,0). This is why the prime factors of the number two squares ahead on the spiral need to be checked when choosing the current number. Once a candidate number for the current square is chosen a list of the prime factors it has that are not factors of the previous number, 22 in this case, is created. This list is then compared against the factors of the number two squares ahead on the spiral, if such a number exists. If that number has as factors all the numbers in the list, then a new candidate number must be chosen else it would lead to the issue described above when the next new number is created. In this case choosing 55 leads to a list containing only 5, but that is a factor of 10, so 55 cannot be chosen. The next valid number that satisfies all the factor requirements and also has a factor not in either 22 or 10 is 11*13 = 143.
		

Crossrefs

Showing 1-8 of 8 results.