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 91-100 of 127 results. Next

A354732 Lexicographically earliest infinite sequence of distinct positive integers such that in any run of four consecutive terms there is only one pair of terms which share a prime divisor, the rest are all pairwise coprime.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 11, 9, 13, 12, 17, 10, 19, 14, 23, 16, 15, 21, 29, 22, 20, 27, 31, 25, 18, 24, 37, 35, 26, 32, 33, 41, 28, 34, 39, 43, 38, 40, 47, 49, 30, 36, 53, 59, 42, 44, 61, 65, 45, 46, 67, 51, 50, 52, 71, 57, 56, 58, 55, 69, 62, 63, 73, 64, 68, 75, 77
Offset: 1

Views

Author

David James Sycamore, Jun 04 2022

Keywords

Comments

Can be regarded as the reverse of A354717, which has the opposite coprime relations to those defined here. Primes tend to be records but not all records are primes (8, 16 are nonprime records; 11,13 are primes but not records).
Conjecture: Sequence is a permutation of the positive integers in which the primes appear in their natural order.

Examples

			a(1,2,3,4) = 1,2,3,4 is the lexicographically earliest string of four consecutive terms which satisfy the definition, hence sequence starts with these terms.
a(12,13,14) = 10,17,6 respectively, and 19 is the smallest term not already seen in the sequence such that 10,17,6,19 satisfy the definition ((10,6)=2, and (10,17)=(10,19)=(17,19)=(17,6)=(6,19)=1); therefore a(15)=19.
		

Crossrefs

Programs

Extensions

More terms from David A. Corneth, Jun 05 2022

A360209 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 2, a(n) shares a factor with a(n-2) + a(n-1) but shares no factor with a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 15, 7, 8, 9, 17, 10, 12, 11, 23, 14, 37, 27, 16, 43, 59, 18, 21, 13, 20, 22, 33, 25, 26, 24, 35, 295, 32, 36, 51, 29, 28, 19, 47, 30, 44, 259, 39, 34, 73, 107, 38, 40, 45, 119, 41, 46, 42, 55, 97, 48, 50, 49, 57, 52, 109, 63, 54, 65, 77, 56, 76, 69, 75, 58, 91, 149, 60, 66
Offset: 1

Views

Author

Scott R. Shannon, Jan 29 2023

Keywords

Comments

To ensure the sequence is infinite another criterion must be satisfied when choosing a(n), namely a(n) + a(n-1) must contain a factor not in a(n-1). If this were not the case, a(n+1) = a(n) + a(n-1) would share a factor with both a(n) + a(n-1) and a(n-1), terminating the sequence.
In the first 100000 terms the fixed points for n > 2 are 3, 6, 441, 1677, 3629, 9701, 17131, although it is likely more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(7) = 15 as a(5) + a(6) = 4 + 6 = 10, and 15 is the smallest positive unused number that shares a factor with 10 but not with a(5) = 4.
a(41) = 44 as a(39) + a(40) = 47 + 30 = 77, and 44 shares a factor with 77 but not with a(39) = 47. Note that 42 also satisfies these criteria but 30 + 42 = 72 which shares all its factors with a(40) = 30, thus setting a(41) = 42 would make it impossible to find a(42).
		

Crossrefs

Cf. A251604 (does not share with a(n-1)), A098550, A336957, A337136, A359557, A353239.

Extensions

a(6) and above corrected by Scott R. Shannon, Mar 17 2023

A361104 a(n) = k such that A361103(k-1) = n, or -1 if n never appears in A361103.

Original entry on oeis.org

1, 2, 3, 17, 9, 4, 8, 31, 15, 7, 5, 47, 64, 6, 21, 10, 96, 20, 11, 13, 57, 38, 14, 16, 79, 37, 18, 12, 160, 28, 22, 19, 61, 24, 26, 23, 131, 52, 27, 25, 41, 33, 46, 29, 77, 45, 42, 34, 54, 59, 36, 32, 68, 72, 44, 40, 104, 82, 50, 49, 75, 111, 51, 35, 98, 143, 63, 30, 85
Offset: 1

Views

Author

Keywords

Comments

Imagine the offset of A361103 is 1, and assume it really is a permutation of the natural numbers. In tabular form, it is
..1..2..3..4..5..6..7..8..9.10.11...
..1..2..3..6.11.14.10..7..5.16..19...
Then the inverse permutation would be
..1..2..3.17..9..4..8.31.15..7..5.47...
which is the present sequence.

Examples

			A361103(16) = 4, so a(4) = 17.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Mar 04 2023

A361106 Numbers k such that w(k), w(k+1), and w(k+2) are all odd, where w is A360519.

Original entry on oeis.org

12, 4565, 6402, 12255, 20112, 21421, 24818, 28859, 28924, 29257, 31026, 31207, 34856, 36933, 43614, 49287, 51164, 51869, 59526, 60503, 62984, 65273, 70478, 75659, 76632, 78501, 84754, 86195, 90824, 92301, 95598, 103451, 114460, 115025, 115890, 116995, 117608, 118021, 119994, 121439, 123892
Offset: 1

Views

Author

Keywords

Crossrefs

A361323 a(n) = k such that A000469(k) = A361321(n).

Original entry on oeis.org

1, 2, 3, 12, 6, 10, 7, 4, 33, 14, 5, 18, 27, 15, 8, 22, 30, 11, 13, 19, 17, 45, 25, 9, 24, 62, 50, 36, 40, 16, 121, 55, 23, 20, 56, 38, 28, 21, 59, 43, 52, 26, 71, 63, 32, 79, 58, 29, 47, 34, 87, 69, 31, 48, 41, 105, 97, 35, 53, 61, 39, 44, 67, 70, 46, 49, 76, 77, 51, 54, 84, 89, 57, 60, 96
Offset: 1

Views

Author

Keywords

Comments

Conjectured to be a permutation of the natural numbers (if not then there exists a k such that A000469(k) does not appear in A361321).

Crossrefs

A361324 a(n) = k such that A361321(k) = A000469(n), or -1 if A000469(n) never appears in A361321.

Original entry on oeis.org

1, 2, 3, 8, 11, 5, 7, 15, 24, 6, 18, 4, 19, 10, 14, 30, 21, 12, 20, 34, 38, 16, 33, 25, 23, 42, 13, 37, 48, 17, 53, 45, 9, 50, 58, 28, 83, 36, 61, 29, 55, 79, 40, 62, 22, 65, 49, 54, 66, 27, 69, 41, 59, 70, 32, 35, 73, 47, 39, 74, 60, 26, 44, 87, 78, 93, 63, 98, 52, 64, 43, 101, 77, 86, 102
Offset: 1

Views

Author

Keywords

Comments

Conjectured to be a permutation of the natural numbers (and if so, -1 will never appear).

Crossrefs

A379165 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number that is either coprime to both a(n-1) and a(n-2) or shares a factor with both a(n-1) and a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 6, 10, 11, 13, 12, 17, 19, 14, 15, 18, 20, 16, 21, 23, 22, 25, 27, 26, 24, 28, 29, 31, 30, 37, 41, 32, 33, 35, 34, 39, 36, 42, 38, 40, 43, 47, 44, 45, 48, 49, 53, 46, 51, 54, 55, 50, 57, 59, 52, 61, 63, 58, 56, 60, 62, 64, 65, 67, 66, 71, 73, 68, 69, 72, 75, 70, 78, 74, 76, 77, 79, 80, 81, 83, 82, 85, 87, 86, 84, 88, 89, 91
Offset: 1

Views

Author

Scott R. Shannon, Dec 17 2024

Keywords

Comments

For the terms studied the primes appear in their natural order. The fixed points being 3, 8, 10, 11, 18, 21, 26, 28, 29, 43, 51, 64... . After 10 million terms 3211449 of them, approximately 32.1%, share a factor with both previous terms - it is unknown what this ratio is as n -> infinity. The sequence is almost certainly a permutation of the positive numbers.

Examples

			a(4) = 5 as 5 is coprime to both a(3) = 3 and a(2) = 2, and 5 has not previously appeared.
a(9) = 6 as 6 shares a factor with both a(8) = 8 and a(7) = 9, and 6 has not previously appeared.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] := False; Do[Set[{a[n], c[k]}, {n, True}], {n, 2}];
      i = a[1]; j = a[2]; u = 3;
    Do[k = u;
      While[Or[c[k], Nor[And[#1, #2], Nor[#1, #2]]] &[
        CoprimeQ[k, i], CoprimeQ[k, j]], k++];
      Set[{a[n], c[k], i, j}, {k, True, j, k}];
      If[k == u, While[c[u], u++]], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Dec 17 2024 *)

A379166 Numbers in A379165 that share a factor with both previous terms, in order of appearance.

Original entry on oeis.org

6, 10, 18, 20, 16, 24, 28, 36, 42, 38, 40, 48, 54, 50, 56, 60, 62, 64, 72, 75, 70, 78, 74, 76, 84, 88, 96, 102, 98, 100, 108, 114, 110, 112, 118, 120, 126, 130, 132, 136, 138, 144, 150, 156, 154, 160, 162, 158, 164, 166, 168, 174, 180, 176, 182, 186, 190, 192, 194, 196, 204, 200, 206, 210, 214, 216, 228, 230, 226, 234, 240, 238, 244, 246, 248, 250, 258, 260
Offset: 1

Views

Author

Scott R. Shannon, Dec 17 2024

Keywords

Comments

See A379165 for further details.

Crossrefs

Programs

  • Mathematica
    nn = 2^8; c[_] := False; i = 1; j = 2; c[1] = c[2] = True; u = 3;
    Reap[Do[k = u;
      While[
        Or[c[k], Nor[And[#1, #2], Nor[#1, #2]]] &[
         CoprimeQ[k, i], CoprimeQ[k, j]], k++];
      Set[{c[k], i, j}, {True, j, k}];
      If[AllTrue[{{i, k}, {j, k}}, ! CoprimeQ[##] & @@ # &], Sow[k] ];
    If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 20 2024 *)

A333716 a(0)=1; for n>0, a(n) is the greatest common divisor (GCD) of n and the sum of the previous terms back to the last GCD term, if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 11, 18, 26, 3, 13, 24, 36, 49, 63, 78, 94, 111, 129, 148, 168, 189, 211, 234, 258, 283, 309, 336, 364, 393, 423, 454, 486, 519, 553, 588, 624, 661, 699, 738, 778, 819, 861, 43, 87, 132, 178, 225, 273, 322, 10, 61, 113, 166, 220, 275, 331, 388, 446, 505, 565
Offset: 0

Views

Author

Scott R. Shannon, Sep 03 2020

Keywords

Comments

This sequence is similar to A337490 except that here when a GCD term is added to the sequence the sum of previous terms is reset to the value of that GCD. Subsequent terms calculate the sum of previous terms back to this last GCD value. See the examples below.
Unlike A337490 this sequence shows numerous drops in value as the sum used when calculating the GCD with n is constantly being reset back to a smaller value anytime a unique GCD value greater than 1 is found. In the first one million terms the sequence drops in value 1516 times, the largest drop occurring from a(738133) = 45463489818 to a(738134) = 738134.

Examples

			a(4) = 11 as the sum of the previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11.
a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previously appeared a(5) = 5. As this term adds a GCD value to the sequence, the running sum of previous terms is now set to 5.
a(6) = 11 as the sum of previous terms is now just a(5) = 5, and as the GCD of 5 and 6 is 1, which already appears in the sequence, a(6) = a(5) + 6 = 5 + 6 = 11.
a(9) = 3 as the sum of previous terms back to the last GCD term is a(5)+...+a(8) = 60, and the GCD of 60 and 9 is 3, and as 3 has not previously appeared, a(9) = 3. As this term adds a GCD value to the sequence, the running sum of previous terms is now set to 3.
		

Crossrefs

Programs

  • Mathematica
    Block[{k = 0}, Nest[Append[#, If[FreeQ[#1, #3], Set[k, #2]; #3, #1[[-1]] + #2]] & @@ {#1, #2, GCD[Total@ #1[[k + 1 ;; #2]], #2]} & @@ {#, Length@ #} &, {1}, 60]] (* Michael De Vlieger, Sep 20 2020 *)

A335585 The numbers visited on a square spiral, with a(n) = n for 1 <= n <= 3, when stepping to an unvisited number as close as possible to the n = 1 starting position that has at least one common factor with the second last visited number but none with the last visited number. In case of a tie, choose the smallest number.

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, 18, 77, 24, 49, 34, 63, 17, 28, 51, 40, 33, 46, 45, 23, 30, 161, 26, 69, 13, 36, 65, 32, 55, 38, 75, 19, 42, 95, 44, 85, 48, 115, 52, 105, 62, 87, 68, 29, 54, 203, 60, 119, 76, 153, 70, 117, 50, 57, 56, 81, 58, 93
Offset: 1

Views

Author

Scott R. Shannon, Jan 26 2021

Keywords

Comments

This sequence is the square spiral version of the Yellowstone permutation A098550. The same rules for selecting the next number apply except that, instead of choosing the smallest unvisited number for a(n), the number closest to the starting n = 1 position which satisfies the selection rules is chosen. If two or more such numbers exist then the smallest is chosen.
The first term that differs from A098550 is a(23) = 18. See the examples below.

Examples

			The square spiral used is:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(7) = 15 as a(5) = 9 = 3*3 and a(8) = 8 = 2*2*2, thus a(7) must contain 3 as a factor but not 2. The closest unvisited number to the starting 1 position that satisfies these conditions is 15.
a(23) = 18 as a(21) = 39 = 3*13 and a(22) = 11, thus a(23) must contain 3 or 13 as a factor but not 11. The smallest unvisited number satisfying these conditions is 13, which is sqrt(8) units from 1. However 18 is unvisited and also satisfies the conditions, and is only sqrt(5) units from 1, thus a(23) = 18. This is the first term that differs from A098550.
		

Crossrefs

Previous Showing 91-100 of 127 results. Next