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

A090252 The Two-Up sequence: a(n) is the least positive number not already used that is coprime to the previous floor(n/2) terms.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 11, 13, 17, 8, 19, 23, 25, 21, 29, 31, 37, 41, 43, 47, 53, 16, 59, 61, 67, 71, 73, 55, 79, 27, 49, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 26, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 85, 121, 223, 227, 57, 229
Offset: 1

Views

Author

Amarnath Murthy, Nov 27 2003

Keywords

Comments

a(n) is coprime to the next n terms. - David Wasserman, Oct 24 2005
All values up to a(1000000) are either prime powers or semiprimes; this suggests the sequence is unlikely to be a permutation of the integers.
It appears that a(n) is even iff n = 3*2^k-1 for some k (A083356). - N. J. A. Sloane, Nov 01 2014
The even terms in the present sequence are listed in A354255.
We have a(1) = 1 and a(2) = 2. At step k >= 2, the sequence is extended by adding two terms: a(2*k-1) = smallest unused number which is relatively prime to a(k), a(k+1), ..., a(2*k-2), and a(2*k) = smallest unused number which is relatively prime to a(k), a(k+1), ..., a(2*k-1). So at step k=2 we add a(3)=3, a(4)=5; at step k=3 we add a(5)=4, a(6)=7; and so on. - N. J. A. Sloane, May 21 2022
Comments from N. J. A. Sloane, May 23 2022: (Start)
Conjecture 1. A090252 is a subsequence of A354144 (prime powers and semiprimes).
Conjecture 2. The terms of A354144 that are missing from A090252 are 6, 10, 14, 15, 22, 33, 34, 35, 38, 39, 46, 51, 58, 62, 65, 69, 74, 77, 82, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 209, 213, 214, 215, 218, 219, 221, ...
But since there is no proof that any one of these numbers is really missing, this list cannot yet have an entry in the OEIS.
Let S_p = list of indices of terms in A090252 that are divisible by the prime p.
Conjecture 3. For a prime p, there are constants v_1, v_2, ..., v_K and c such that
S_p = { v_1, v_2, ..., v_k, lambda*2^i - 1, i >= c}.
For example, from Michael S. Branicky's 10000-term b-file, it appears that:
S_2 = { 3*2^k-1, k >= 0 } cf. A083329
S_3 = { 2^k-1, k >= 2 } cf. A000225
S_5 = { 4 then 15*2^k-1 k >= 0 } cf. A196305
S_7 = { 6, 15, then 33*2^k-1, k >= 0 }
S_11 = { 8, 29, then 61*2^k-1, k >= 0 }
S_13 = { 9, 47, 97*2^n-1, n >= 0 }
S_17 = { 10, 59, 121*2^n-1, n >= 0 }
S_19 = { 12, 63, 129*2^n-1, n >= 0 }
S_23 = { 13, 65, 133*2^n-1, n >= 0 }
S_29 = { 16, 121, 245*2^n-1, n >= 0 }
S_31 = { 17, 131, 265*2^n-1, n >= 0 }
The initial primes p and the corresponding values of lambda are:
p: 2 3 5 7 11 13 17 19 23 29 31
lambda:..3...1..15..33...61...97..121..129..133..245..265
(This sequence of lambdas does not seem to have any simpler explanation, is not in the OEIS, and cannot be since the terms shown are all conjectural.)
Conjecture 2 is a consequence of Conjecture 3. For example, 6 does not appear in A090252, since the sets S_2 and S_3 are disjoint.
Also 10 does not appear, since S_2 and S_5 are disjoint.
In fact 2*p for 3 <= p <= 11 does not appear, but 26 = 2*13 does appear since S_2 and S_13 have 47 in common.
Assuming the numbers that appear to be missing (see Conjecture 2) really are missing, the numbers that take a record number of steps to appear are 1, 2, 3, 4, 7, 8, 16, 26, 32, 64, 128, 206, 256, 478, 512, 933, ..., and the indices where they appear are 1, 2, 3, 5, 6, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 8191, .... These two sequences are not yet in the OEIS, and cannot be added since the terms are all conjectural.
(End)
From N. J. A. Sloane, Jun 06 2022 (Start)
Theorem: (a) a(n) <= prime(n-1) for all n >= 2 (cf. A354154).
(b) A stronger upper bound is the following. Let c(n) = A354166(n) denote the number of nonprime terms among a(1) .. a(n). Note c(1)=1. Then a(n) <= prime(n-c(n)) for n <> 7 and 14.
It appears that a(n) = prime(n-c(n)) for almost all n. That is, this is the equation to the line in the graph that contains most of the terms.
For example, a(34886) = 408710 (see the b-file) = prime(34886 - A354166(34886)) = prime(34886 - 374) = prime(34512) = 408710.
Another example: Consider Russ Cox's table of the first N = 5764982 terms. We see that a(5764982) = 99999989 = prime(5761455) = prime(N - 3527) which agrees with c(N) = 3527 (from the first Russ Cox link).
(End)
If we consider the May 23 2022 comment, note the conjectured indices show near complete overlap with terms of A081026: 1, 2, 3, 5, 6, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 8191. - Bill McEachen, Aug 09 2024

Crossrefs

See A247665 for the case when the numbers are required to be at least 2. A353730 is another version.
For a squarefree analog, see A354790, A354791, A354792.

Programs

Extensions

More terms from David Wasserman, Oct 24 2005

A354160 Products of exactly two distinct primes in A090252, in order of appearance.

Original entry on oeis.org

21, 55, 26, 85, 57, 161, 319, 217, 481, 205, 731, 517, 159, 1121, 1403, 871, 355, 1241, 869, 2407, 1691, 413, 3007, 2323, 206, 1391, 4033, 565, 5207, 2227, 5891, 6533, 4321, 453, 1007, 623, 4867, 2231, 6161, 2119, 11189, 6401, 12709, 7421, 2159, 9563, 8213, 1507, 15247, 9259, 4031, 12367, 597, 2869, 11183, 1561, 13393, 7099, 3611, 14213, 478, 24823
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 2000, -1]], PrimeNu[#] == PrimeOmega[#] == 2 &] (* Michael De Vlieger, Jun 16 2022 *)
  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354160_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    if len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield m
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354160_list = list(islice(A354160_gen(),25)) # Chai Wah Wu, May 31 2022

A354161 Index of A354160(n) in A090252.

Original entry on oeis.org

15, 29, 47, 59, 63, 65, 121, 131, 193, 239, 241, 243, 255, 257, 265, 387, 479, 483, 487, 489, 515, 527, 529, 531, 767, 775, 777, 959, 961, 967, 969, 977, 979, 1023, 1031, 1055, 1059, 1063, 1143, 1551, 1553, 1555, 1921, 1923, 1935, 1937, 1939, 1951, 1953, 1955, 1959, 1961, 2047, 2063, 2064, 2111, 2113, 2119, 2127, 2288, 3071, 3073, 3105, 3107
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354161_gen(): # generator of terms
        aset, aqueue, c, b, f, i = {1}, deque([1]), 2, 1, True, 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    i += 1
                    if len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield i
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354161_list = list(islice(A354161_gen(),25)) # Chai Wah Wu, May 31 2022

A354255 Even numbers in A090252 in order of appearance.

Original entry on oeis.org

2, 4, 8, 16, 26, 32, 64, 128, 206, 256, 478, 512, 998, 1024, 2048, 3134, 4096, 6514, 8192, 13942, 16384, 28894, 32768, 60518, 65536, 126634, 131072, 261398, 262144
Offset: 1

Views

Author

Michael S. Branicky, May 21 2022

Keywords

Comments

The n-th even term in A090252 appears at index k <= A083329(n).
Conjecture: The indices of even numbers in A090252 are precisely the numbers {A083329(n), n >= 1}. See A090252 for discussion. - N. J. A. Sloane, May 22 2022
Taking logs to base 2 of these terms produces 1., 2., 3., 4., 4.700439718, 5., 6., 7., 7.686500527, 8., 8.900866807, 9., 9.962896004, 10., 11., 11.61378946, 12., 12.66932800, 13., 13.76714991, 14. - N. J. A. Sloane, Jun 01 2022

Crossrefs

Programs

  • Python
    from math import gcd, prod
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, mink = [1], {1}, 2
        for n in count(2):
            k, s = mink, n - n//2
            prodall = prod(alst[n-n//2-1:n-1])
            while k in aset or gcd(prodall, k) != 1: k += 1
            alst.append(k); aset.add(k)
            if k%2 == 0: yield k
            while mink in aset: mink += 1
    print(list(islice(agen(), 9))) # Michael S. Branicky, May 23 2022

Extensions

a(14) from Michael S. Branicky, May 26 2022
a(15)-a(21) from Michael S. Branicky, Jun 01 2022 using gzipped b-file in A090252
a(22)-a(26) from Hugo van der Sanden, Jun 14 2022
a(27)-a(29) from Jinyuan Wang, Jul 15 2022

A354162 Products of exactly two distinct odd primes in A090252, in order of appearance.

Original entry on oeis.org

21, 55, 85, 57, 161, 319, 217, 481, 205, 731, 517, 159, 1121, 1403, 871, 355, 1241, 869, 2407, 1691, 413, 3007, 2323, 1391, 4033, 565, 5207, 2227, 5891, 6533, 4321, 453, 1007, 623, 4867, 2231, 6161, 2119, 11189, 6401, 12709, 7421, 2159, 9563, 8213, 1507, 15247, 9259, 4031, 12367, 597, 2869, 11183, 1561, 13393, 7099, 3611, 14213, 24823
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Comments

Odd terms in A354160. - Chai Wah Wu, May 31 2022

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354162_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    if m % 2 and len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield m
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354162_list = list(islice(A354162_gen(),25)) # Chai Wah Wu, May 31 2022

A354163 Index of A354162(n) in A090252.

Original entry on oeis.org

15, 29, 59, 63, 65, 121, 131, 193, 239, 241, 243, 255, 257, 265, 387, 479, 483, 487, 489, 515, 527, 529, 531, 775, 777, 959, 961, 967, 969, 977, 979, 1023, 1031, 1055, 1059, 1063, 1143, 1551, 1553, 1555, 1921, 1923, 1935, 1937, 1939, 1951, 1953, 1955, 1959, 1961, 2047, 2063, 2064, 2111, 2113, 2119, 2127, 2288, 3073, 3105, 3107, 3111, 3113, 3839
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354163_gen(): # generator of terms
        aset, aqueue, c, b, f, i = {1}, deque([1]), 2, 1, True, 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    i += 1
                    if m % 2 and len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield i
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354163_list = list(islice(A354163_gen(),25)) # Chai Wah Wu, May 31 2022
Showing 1-6 of 6 results.