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-10 of 10 results.

A093714 a(n) = smallest number coprime to a(n-1), not equal to a(n-1)+1, and not occurring earlier; a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 12 2004

Keywords

Comments

Lexicographically earliest infinite sequence of distinct positive numbers such that gcd(a(n-1), a(n)) = 1, a(n) != a(n-1) + 1. - N. J. A. Sloane, May 02 2022
Permutation of natural numbers with inverse A093715: a(A093715(n))=A093715(a(n))=n.
Comments from N. J. A. Sloane, May 02 2022: (Start)
Proof that this is a permutation of the natural numbers.
1. As usual for a "lexicographically earliest sequence" of this class, there is a function B(k) such that a(n) > k for all n > B(k).
2. For any prime p, p divides a(n) for some n. [Suppose not. Using 1, find n_0 such that a(n) > p^2 for all n >= n_0. But if a(n) > p^2, then p is a smaller choice for a(n+1), contradiction.]
3. For any prime p, p divides infinitely many terms. [Suppose not. Let p^i be greater than any multiple of p in the sequence. Go out a long way, and find a term greater than p^i. Then p^i is a smaller candidate for the next term. Contradiction.]
4. Every prime p appears naked. [If not, using 3, find a large multiple of p, G*p, say. But then p would have been a smaller candidate than G*p. Contradiction.]
5. The next term after a prime p is the smallest number not yet in the sequence which is relatively prime to p. Suppose k is missing from the sequence, and find a large prime p that does not divide k. Then the term after p will be k. So every number appears.
This completes the proof.
Conjecture 1: If p is a prime >= 3, p-1 appears after p.
Conjecture 2: If p is a prime, the first term divisible by p is p itself.
Conjecture 3: If a(n) = p is a prime >= 5, then n < p.
(End)
Coincides with A352588 for n >= 17. - Scott R. Shannon, May 02 2022

Crossrefs

Cf. A085229, A347113, A352588, A352928 (smallest missing number).
A352929 gives indices of prime terms, A352930 = first differences, A352931 = a(n)-n. See also A352932.
See Comments in A109812 for a set-theory analog.

Programs

A351495 a(1) = 1, for n > 1, a(n) is the smallest positive number that has not yet appeared that is a multiple of the smallest prime that does not divide a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 03 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.
The k-th prime appears as the next term after A002110(k-1) appears.

Examples

			a(5) = 6 as a(4) = 2 = 2*2 which does not contain 3 as a prime factor, and 6 is the smallest unused number that is a multiple of 3.
a(6) = 5 as a(5) = 6 = 2*3 which does not contain 5 as a prime factor, and 5 is the smallest unused number that is a multiple of 5.
		

Crossrefs

Programs

A354688 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1) and the difference | a(n) - a(n-1) | is distinct from all previous differences.

Original entry on oeis.org

1, 2, 5, 3, 7, 12, 19, 4, 13, 21, 8, 25, 6, 17, 11, 23, 9, 29, 39, 10, 31, 15, 37, 14, 41, 16, 47, 65, 18, 53, 20, 57, 83, 22, 61, 27, 55, 79, 24, 67, 26, 71, 33, 73, 43, 75, 119, 30, 89, 32, 81, 28, 93, 35, 86, 149, 34, 101, 45, 91, 127, 36, 107, 38, 111, 49, 97, 139, 40, 117, 167, 42, 121, 46
Offset: 1

Views

Author

Scott R. Shannon, Jun 03 2022

Keywords

Comments

All of the terms are concentrated along four lines - this is in contrast to A352588 where they all concentrated along one line. See the linked image. The primes do not occur in their natural order. The sequence is conjectured to be a permutation of the positive integers.
See A354731 for the differences between terms.

Examples

			a(6) = 12 as a(5) = 7, and 12 is the smallest unused number that is coprime to 7 and whose difference from the previous term, | 12 - 7 | = 5, has not appeared. Note that 4,6,8,9,10,11 are all coprime to 7 but their differences from 7 have all appeared as differences between previous terms so none can be chosen.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = d[] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 04 2022 *)
  • Python
    from math import gcd
    from sympy import isprime, nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, diffset, an, mink = {1}, set(), 1, 2
        yield 1
        for n in count(2):
            k = mink
            while k in aset or abs(an-k) in diffset or gcd(an, k) != 1: k += 1
            aset.add(k); diffset.add(abs(k-an)); an = k; yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 74))) # Michael S. Branicky, Jun 04 2022

A352932 Where the parity of A352931 changes.

Original entry on oeis.org

1, 2, 11, 18, 79, 1788, 15023, 38124, 45053, 1036044, 100280245077
Offset: 1

Views

Author

N. J. A. Sloane, May 04 2022

Keywords

Comments

The terms 15023, 38124, 45053, 1036044 are based on the comments from Scott R. Shannon and Michael De Vlieger in A352588.
In fact a(n) = A351498(n) + 1, although this requires proof (see A351498).

Crossrefs

Programs

  • C
    See Links section.

Extensions

a(9) corrected and a(11) added by Rémy Sigrist, May 06 2022

A354731 Absolute values of first differences of A354688.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Jun 04 2022

Keywords

Comments

See A354688 for further details.

Examples

			a(3) = 2 as | A354688(4) - A354688(3) | = | 3 - 5 | = 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = d[] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; {1}~Join~Reap[Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; Sow[Abs[k - j]]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]][[-1, -1]] (* Michael De Vlieger, Jun 04 2022 *)
  • Python
    from math import gcd
    from sympy import isprime, nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, diffset, an, mink = {1}, set(), 1, 2
        for n in count(2):
            k = mink
            while k in aset or abs(an-k) in diffset or gcd(an, k) != 1: k += 1
            aset.add(k); diffset.add(abs(k-an)); yield abs(k-an); an = k
            while mink in aset: mink += 1
    print(list(islice(agen(), 76))) # Michael S. Branicky, Jun 04 2022

A372975 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) while omega(a(n)) does not equal omega(a(n-1)).

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 10, 5, 15, 9, 18, 8, 14, 7, 21, 27, 24, 16, 20, 25, 30, 22, 11, 33, 42, 26, 13, 39, 60, 28, 32, 34, 17, 51, 66, 36, 64, 38, 19, 57, 78, 40, 70, 35, 49, 56, 84, 44, 90, 45, 81, 48, 102, 46, 23, 69, 105, 50, 110, 52, 114, 54, 120, 55, 121, 77, 126, 58, 29, 87, 132, 62, 31, 93, 138
Offset: 1

Views

Author

Scott R. Shannon, May 26 2024

Keywords

Comments

The sequence shows similar behavior to the EKG sequence A064413; for the terms studied the primes appear in the natural order, and when a prime p is a term, the proceeding and following terms are 2p and 3p respectively.
For larger n a graph of the sequence also displays very similar behavior to A064413, although for the first ~2500 terms the main concentration of terms are along two lines which eventually join - see the attached image of the first 5000 terms.
The fixed points begin 1, 2, 22, 26, 36, 38, 1991, 2023, 2159, 2189, 2627; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
From Michael De Vlieger, May 28 2024: (Start)
Four general trajectories become apparent in log log scatterplot:
1. Beta, the trajectory of primes a(j) = p.
2. Alpha, the trajectory of numbers a(j+1) = 3*p.
3. Delta, the trajectory of perfect prime powers and numbers k with omega(k) = 3.
4. Gamma, the trajectory of all other (composite) numbers.
Delta begins with a(21) = 30 and merges with gamma around n = 2958. The merger alters the "slope" of all trajectories as a result. Thereafter, a number k with omega(k) = 2 is comparable in size with one that has omega(k) = 3. This does not seem to happen for omega(k) = 4, etc. (See a(2102) = 2310).
Perfect prime powers may technically constitute a separate, more scattered trajectory superposed upon delta. Still, the merger with gamma seems to occur around the same point as with delta.
Exception to first comment: 12 follows 3, since omega(9) = omega(3). The number 12 lies outside trajectory alpha, since 12 = 4*3. (End)

Examples

			a(3) = 6 as a(2) = 2 and omega(2) = A001221(2) = 1, and 6 shares a factor with 2 while omega(6) = A001221(6) = 2 which does not equal 1.
		

Crossrefs

Programs

  • Mathematica
    nn = 1000; c[] := False; m[] := 1;
    Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = 2; v = 4;
    Do[Which[
      And[PrimeQ[#], OddQ[#]] &[j/2], k = j/2,
      PrimePowerQ[j], k = FactorInteger[j][[1, 1]];
        While[Or[c[#], PrimePowerQ[#]] &[k*m[k]], m[k]++]; k *= m[k],
      True, k = v;
        While[Or[CoprimeQ[j, k], PrimeNu[k] == #, c[k]] &[PrimeNu[j]], k++]];
      Set[{a[n], c[k], j}, {k, True, k}];
      If[k == v, While[Or[PrimeQ[v], c[v]], v++]], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, May 28 2024 *)

A372974 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) is coprime to a(n-1) and omega(a(n)) does not equal omega(a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 26 2024

Keywords

Comments

The fixed points show an unusual pattern; they begin 1, 2, 4, 69, 190, 438, 545, 725, 732, 909 and it appears, based on a graph of the sequence (see the attached image of the first 5000 terms) there may be no more. However more exist at 324388, 330574, 333069, 333531,..., 369752. Then once again there is a large gap until 2704713, 2726054, 2760963, ... . It is unclear what causes this behavior.
The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(3) = 15 as a(2) = 2 and omega(2) = A001221(2) = 1, and 15 is coprime to 2 while omega(15) = A001221(15) = 2 which does not equal 1. No smaller number satisfies both of these requirements.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] := False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = 2; u = 3;
    Do[k = u;
      While[Or[GCD[j, k] > 1, PrimeNu[k] == #, c[k]] &[PrimeNu[j]], k++];
      Set[{a[n], c[k], j}, {k, True, k}];
      If[k == u, While[c[u], u++]], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, May 28 2024 *)

A370500 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) does not share a factor with a(n-1) but sopfr(a(n)) does share a factor with soprf(a(n-1)), where sopfr(k) is the sum of the primes dividing k, with repetition.

Original entry on oeis.org

1, 2, 9, 4, 15, 8, 3, 14, 27, 20, 77, 16, 21, 5, 6, 25, 18, 35, 24, 65, 32, 33, 7, 10, 49, 12, 115, 36, 55, 39, 50, 51, 26, 81, 38, 105, 44, 91, 30, 119, 57, 11, 28, 45, 62, 85, 42, 95, 64, 69, 13, 22, 63, 74, 75, 56, 169, 60, 121, 40, 123, 70, 87, 98, 93, 17, 52, 99, 145, 66, 133, 72, 125, 46
Offset: 1

Views

Author

Scott R. Shannon, Feb 20 2024

Keywords

Comments

The fixed points begin 1, 2, 4, 56, 72, 138, 200, 438, 500, 540, 590, 3998. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 4 as a(3) = 9 and 4 does not share a factor with 9 while sopfr(4) = 4 does share a factor with sopfr(9) = 6.
		

Crossrefs

A370501 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) but sopfr(a(n)) does not share a factor with soprf(a(n-1)), where sopfr(k) is the sum of the primes dividing k, with repetition.

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 10, 5, 15, 20, 16, 14, 7, 21, 24, 18, 22, 8, 28, 26, 13, 39, 27, 30, 34, 17, 51, 45, 9, 48, 32, 38, 19, 57, 63, 33, 11, 44, 40, 25, 75, 35, 56, 36, 52, 42, 46, 23, 69, 54, 50, 58, 29, 87, 90, 55, 80, 60, 76, 62, 31, 93, 96, 64, 82, 41, 123, 99, 66, 68, 85, 105, 49, 112
Offset: 1

Views

Author

Scott R. Shannon, Feb 20 2024

Keywords

Comments

The fixed points begin 1, 2, 64, 114, 116, 132, and it is plausible no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 4 as a(5) = 12 and 4 shares a factor with 12 while sopfr(4) = 4 does not share a factor with sopfr(12) = 7.
		

Crossrefs

A351624 Fixed points of A093714.

Original entry on oeis.org

1, 91, 93, 117, 147, 164, 172, 189, 224, 231, 254, 273, 284, 327, 344, 357, 374, 382, 399, 411, 434, 464, 483, 494, 543, 561, 567, 584, 592, 609, 644, 674, 693, 704, 747, 777, 794, 819, 854, 884, 891, 903, 914, 932, 939, 957, 987, 1001, 1012, 1029, 1064, 1094
Offset: 1

Views

Author

Rémy Sigrist, May 04 2022

Keywords

Comments

From Michael De Vlieger, May 04 2022: (Start)
Also positions of 0's in A352931.
Fixed points of A352588 are these terms together with 2 and 8. (End)

Examples

			A093714(91) = 91 so 91 belongs to this sequence.
A093714(92) = 88 so neither 88 nor 92 belongs to this sequence.
		

Crossrefs

Programs

Showing 1-10 of 10 results.