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 32 results. Next

A381419 a(1) = 1; for n > 1, a(n) is the smallest unused positive number that is coprime to a(n-1) and has a different binary weight than a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Feb 23 2025

Keywords

Comments

A permutation of the natural numbers. - Ruud H.G. van Tol, Mar 10 2025

Examples

			a(4) = 5 as a(3) = 2 which is coprime to 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 2 (10_2) is 1.
		

Crossrefs

Cf. A381821 (fixed points), A381420, A000120, A109451, A093714, A027748.

Programs

  • PARI
    lista(n)= my(r=List([1]), p=1, q=p, t); while(pp+1, forstep(i=q, p+2, -1, r[i]=r[i-1]); r[p+1]=t); q=p++)); Vec(r[1..n]); \\ Ruud H.G. van Tol, Mar 10 2025

A381420 a(1) = 1, a(2) = 3; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) and has a different binary weight than a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Feb 23 2025

Keywords

Comments

Unlike the EKG sequence A064413 the primes do not appear in their natural order. The only fixed points in the terms studied are 1 and 20, and it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 5 as a(3) = 15 which shares a factor with 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 15 (1111_2) is 4.
		

Crossrefs

Programs

  • PARI
    lista(n)= my(i=1, j=0, r=Vec([1], n), s=List(), u=1); while(iRuud H.G. van Tol, Mar 10 2025

A352096 Fixed points in A097465.

Original entry on oeis.org

1, 21, 27, 33, 39, 297, 429, 478, 495, 501, 2138, 3854, 4712, 6428, 8144, 9711, 21872, 37791, 57052, 80216, 88179, 89654, 94802, 109388, 113373, 163761, 171166, 182318, 188955, 196904, 203768, 211490, 214149, 239343, 1805247, 1820092, 1849821, 1983543, 2072691
Offset: 1

Views

Author

Michael De Vlieger, May 05 2022

Keywords

Comments

Position of zeros in A351646.
Analogous to A352931 regarding A093714.

Crossrefs

Programs

  • Mathematica
    nn = 2^20; c = {1}; j = 1; u = 2; {1}~Join~Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1, k != j - 1], k++]; j = k; AppendTo[c, k]; If[k == i, Sow[k]]; If[k == u, While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}]][[-1, -1]]

A353780 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), does not equal a(n-1)+1, and has no digit in common with a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(15) = 27 as a(14) = 10, and 27 has not yet appeared, is coprime to 10, is not 1 more than 10, and has no digit in common with 10. Note that 21 satisfies all of these conditions except the last. This is the first term to differ from A353904.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import islice
    def c(san, k): return set(san) & set(str(k)) == set()
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 2
        while True:
            yield an
            k, san = mink, str(an)
            while k in aset or gcd(an, k) != 1 or k-an == 1 or not c(san, k):
                k += 1
            an = k
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, May 23 2022

A353904 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), does not equal a(n-1)+1, and differs from a(n-1) at every digit.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 10 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(13) = 23 as a(12) = 14, and 23 has not yet appeared, is coprime to 14, is not 1 more than 14, and differs at every digit from 14. Note that 17 satisfies all of these conditions except the last. This is the first term to differ from A093714.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import islice
    def c(san, k):
        sk = str(k)
        return all(sk[-1-i]!=san[-1-i] for i in range(min(len(san), len(sk))))
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 2
        while True:
            yield an
            k, san = mink, str(an)
            while k in aset or gcd(an, k) != 1 or k-an == 1 or not c(san, k):
                k += 1
            an = k
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 77))) # Michael S. Branicky, May 23 2022

A353990 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), does not equal a(n-1)+1, and whose binary expansion has no 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

1, 4, 3, 8, 5, 2, 9, 16, 7, 24, 35, 12, 17, 6, 25, 32, 11, 20, 33, 10, 21, 34, 13, 18, 37, 26, 69, 40, 19, 36, 65, 14, 81, 38, 73, 22, 41, 64, 15, 112, 129, 28, 67, 44, 83, 128, 23, 72, 49, 66, 29, 96, 31, 160, 27, 68, 43, 80, 39, 88, 131, 48, 71, 56, 135, 104, 133, 50, 77, 130, 53, 74, 145, 42
Offset: 1

Views

Author

Scott R. Shannon, May 13 2022

Keywords

Comments

This sequence is similar to A093714 with the additional restriction that no term can have a 1-bit in common with the previous term in their binary expansions. This leads to the terms showing similar behavior to A109812. See the linked image.
In the first 100000 terms the fixed points are 1, 3, 5, 12, 21, 26, 44, 49, 227, 3488, 5890, 9067, 9310, 37625, 74702, although it is likely more exist. In the same range the lowest unseen number is 30686; the sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 8 as a(3) = 3, and 8 has not yet appeared, is coprime to 3, is not 1 more than 3, while 8 = 1000_2 and 3 = 11_2 which have no 1-bits in common.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import count, islice
    def A353990_gen(): # generator of terms
        yield 1
        a, s, b = 1, 2, set()
        while True:
            for i in count(s):
                if not (i == a+1 or i & a or gcd(i,a) > 1 or i in b):
                    yield i
                    a = i
                    b.add(i)
                    while s in b:
                        s += 1
                    break
    A353990_list = list(islice(A353990_gen(),30)) # Chai Wah Wu, May 24 2022

A366952 a(1) = 1, a(2) = 4; for n > 2, a(n) is the smallest positive number that has not yet appeared that shares a factor with n but does not equal n, and shares a factor with a(n-1).

Original entry on oeis.org

1, 4, 6, 2, 10, 8, 14, 12, 3, 15, 33, 9, 39, 18, 20, 22, 34, 16, 38, 24, 27, 30, 46, 26, 40, 28, 21, 7, 203, 35, 155, 50, 36, 32, 42, 44, 74, 48, 45, 5, 205, 60, 86, 52, 54, 56, 94, 58, 70, 25, 75, 65, 265, 80, 66, 62, 72, 64, 118, 68, 122, 76, 57, 78, 13, 104, 134, 82, 84, 49, 497, 63, 219
Offset: 1

Views

Author

Scott R. Shannon, Oct 29 2023

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers, although the primes typically take many terms to appear, e.g., a(95890) = 223. When a prime does appear it is often followed by a term that is significantly larger than the average-sized term. See the examples below. The primes do not occur in their natural order.

Examples

			a(3) = 6 as 6 does not equal 3, shares the factor 3 with 3 while sharing the factor 2 with a(2) = 4.
a(29) = 203 as 203 does not equal 29, shares the factor 29 with 29 while sharing the factor 7 with a(28) = 7. This is an example of both n and a(n-1) being primes which forces a(n) to be significantly larger than the average-sized term.
		

Crossrefs

A349872 a(1) = 2; for n > 1, a(n) is the smallest unused number > 1 such that none of the previous a(n) terms divide a(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 4, 13, 17, 6, 19, 23, 9, 29, 10, 8, 31, 37, 41, 14, 15, 43, 12, 47, 53, 59, 21, 61, 22, 25, 67, 18, 16, 71, 26, 20, 73, 79, 83, 33, 27, 35, 89, 34, 97, 101, 103, 24, 28, 38, 39, 30, 107, 109, 49, 113, 127, 131, 46, 137, 51, 55, 139, 149, 151, 32, 45, 157, 36, 42, 57, 163, 58, 44
Offset: 1

Views

Author

Scott R. Shannon, Dec 03 2021

Keywords

Comments

Slightly under two-thirds of the terms are between the lines a(n) = n/2 and a(n) = n; in the range studied all of these numbers are composite. The remaining terms, all of which are primes, lie approximately on a curve that starts with a slope near 2 that slowly increases. See the linked image.
There are no fixed points up to 10000 terms so it is likely none exist.
For many even terms a(n) where n > a(n) it is found that a(n - a(n) - 1) = a(n)/2. The first even term where that is not the case is a(113) = 68, as a(113 - 68 - 1) = a(44) = 97, not 34. In this case a(43) = 34.
For a given number k the longest possible sequence of unique numbers that contains a number every k terms that divides k is finite, ~ 2*sqrt(k)*k; this implies all numbers > 1 eventually appear.

Crossrefs

Programs

  • Mathematica
    a[1]=2;a[n_]:=a[n]=(k=2;While[MemberQ[s=Array[a,n-1],k]||Or@@(IntegerQ/@(k/s[[-If[k>=n,n-1,k];;]])),k++];k);Array[a,73] (* Giorgos Kalogeropoulos, Dec 03 2021 *)
  • Python
    def aupton(terms):
        alst, aset = [2], {2}
        for n in range(2, terms+1):
            k = 2
            while k in aset or any(k%j == 0 for j in alst[-k:]): k += 1
            alst.append(k); aset.add(k)
        return alst
    print(aupton(73)) # Michael S. Branicky, Dec 03 2021

Formula

a(2) = 3 as the previous term 2 does not divide 3.
a(6) = 4 as none of the previous four terms, 3, 5, 7, 11, divide 4.
a(9) = 6 as none of the previous six terms, 5, 7, 11, 4, 13, 17, divide 6.

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

A353905 a(1) = 1; for n > 1, a(n) = smallest positive number that has not appeared that has a common factor with a(n-1) + the smallest unseen positive number.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 10 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 100000 terms the number 18869 holds the record for the greatest number of terms for which it is the lowest unseen number, 4769 terms in all. In the same range there are fifteen fixed points, the last being a(1204), and it is likely no more exist.

Examples

			a(2) = 3 as a(1) = 1, the smallest unseen positive number is 2, and 1 + 2 = 3, and 3 is the smallest number that has not yet appeared that shares a factor with 3.
a(5) = 6 as a(4) = 7, the smallest unseen positive number is 2, and 7 + 2 = 9, and 6 is the smallest number that has not yet appeared that shares a factor with 9.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; a[1] = c[1] = 1; u = 2; Do[k = u; While[Nand[c[k] == 0, ! CoprimeQ[#, k]], k++] &[a[i - 1] + u]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u++]], {i, 2, nn}]; Array[a, nn] (* Michael De Vlieger, May 15 2022 *)
Previous Showing 21-30 of 32 results. Next