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

A351499 Odd m in A352928.

Original entry on oeis.org

1, 9, 15, 75, 105, 315, 525, 735, 945, 1155, 1365, 1575, 1995, 3465, 4305, 5775, 6615, 7035, 8085, 8925, 9765, 10395, 11235, 12495, 12705, 13545, 15015, 19635, 26565, 28875, 31185, 33495, 38115, 45045, 255255, 405405, 525525, 765765, 975975, 1036035, 1786785, 2297295
Offset: 1

Views

Author

Michael De Vlieger, May 03 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 2^20; c = {1}; j = 1; s = 0; u = 1; {1}~Join~Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1], k++]; j = k; AppendTo[c, k]; If[k == u, If[OddQ[u], Sow[u]]; While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}]][[-1, -1]]
  • Python
    from math import gcd
    from itertools import islice
    def agen(): # generator of terms
        an, aset, mink, seen = 1, {1}, 2, {1}
        yield 1
        while True:
            if mink%2 and mink not in seen: yield mink; seen.add(mink)
            k = mink
            while k in aset or gcd(an, k) != 1 or k-an == 1: k += 1
            an = k; aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 42))) # Michael S. Branicky, May 03 2022

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

A351498 Position k of first term in a run of odd terms with length > 1 in A093714.

Original entry on oeis.org

1, 10, 17, 78, 1787, 15022, 38123, 45052, 1036043
Offset: 1

Views

Author

Michael De Vlieger, May 03 2022

Keywords

Comments

Let S = A093714, known to be a permutation of the natural numbers.
S(k) and S(k+1) are odd.
Theorem: S(n) = n implies S(n) and n have the same parity. Proof: S(n) = n iff S(n) mod n = 0, since n | n. If prime q|n yet (S(n),q) = 1, then S(n) != n, a contradiction.
Corollary: Fixed points in S(n) appear iff S(n) and n have same parity.
Corollary: Consecutive odd terms S(k), S(k+1) imply that the smallest missing number u in S is either odd or (S(k),u) > 1.
Fixed points S(k) appear at k in intervals [78, 1787], [15022, 38123], [45052, 1036043]. These positions result from a dataset of S(1..2^30). Are there any more runs of odd terms?

Examples

			S(1) = 1 and S(2) = 3, therefore this sequence begins with 1.
S(10) = 13 and S(11) = 9, therefore 10 is in this sequence.
S(17) = 23 and S(18) = 15, therefore 17 is in this sequence.
For 2 <= k <= 10, S(k) and k have different parity, but for 11 <= k <= 17, S(k) and k have the same parity.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^20, c = {1}, j = 1, s = 0; t = {}; u = 2; Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1], k++]; j = k; AppendTo[c, k]; If[# != s, s = #; Sow[i - 1]] &@ Mod[Abs[k - i], 2]; If[k == u, While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}] ][[-1, -1]]
Showing 1-3 of 3 results.