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.

A353713 a(n) = smallest missing number after A353712 has been calculated.

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 7, 8, 8, 10, 11, 11, 13, 14, 14, 14, 16, 16, 19, 20, 20, 22, 23, 23, 25, 26, 26, 28, 29, 29, 31, 32, 32, 34, 35, 35, 37, 38, 38, 40, 41, 41, 43, 44, 44, 46, 47, 47, 49, 50, 50, 52, 53, 53, 55, 56, 56, 58, 59, 59, 61, 62, 62, 62, 64, 64, 67, 68
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2022

Keywords

Crossrefs

Cf. A353712.

Extensions

More terms from Alois P. Heinz, May 07 2022

A347113 a(1)=1; for n > 1, a(n) is the smallest unused positive number k such that k != j and gcd(k,j) != 1, where j = a(n-1) + 1.

Original entry on oeis.org

1, 4, 10, 22, 46, 94, 5, 2, 6, 14, 3, 8, 12, 26, 9, 15, 18, 38, 13, 7, 16, 34, 20, 24, 30, 62, 21, 11, 27, 32, 36, 74, 25, 28, 58, 118, 17, 33, 40, 82, 166, 334, 35, 39, 42, 86, 29, 44, 48, 56, 19, 45, 23, 50, 54, 60, 122, 41, 49, 52, 106, 214, 43, 55, 63, 66
Offset: 1

Views

Author

Grant Olson, Aug 18 2021

Keywords

Comments

Alternative definition: Lexicographically earliest sequence of distinct positive numbers such that a(n) != a(n-1)+1 and gcd(a(n-1)+1,a(n)) > 1. This makes it a cousin of the EKG sequence A064413, the Yellowstone permutation A098550, the Enots Wolley sequence A336957, and others. - N. J. A. Sloane, Sep 01 2021; revised Nov 08 2021.
The successive gcd's are listed in A347309.

Examples

			a(1) = 1, by definition.
a(2) = 4; it cannot be 2, because 2 = a(1) + 1, and it cannot be 3, because gcd(a(1) + 1, 3) = 1.
a(3) = 10, because gcd(a(3), a(2) + 1) cannot equal 1. a(2) + 1 = 5, so a(3) must be a multiple of 5. It cannot be equal to 5, so it must be 10, the next available multiple of 5.
a(4) = 22, because 22 is the smallest positive integer not equal to 11 and not coprime to 11.
		

Crossrefs

See A347306 for the inverse, A347307, A347308 for the records, A347309 for the gcd values, A347312 for the parity of a(n), A347314 for the fixed points, and A348780 for partial sums.
For the main diagonal see (A348787(k), A348788(k)).

Programs

  • Maple
    b:= proc() true end:
    a:= proc(n) option remember; local j, k; j:= a(n-1)+1;
          for k from 2 do if b(k) and k<>j and igcd(k, j)>1
            then b(k):= false; return k fi od
        end: a(1):= 1:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 02 2021
  • Mathematica
    Block[{a = {1}, c, k, m = 2}, Do[If[IntegerQ@Log2[i], While[IntegerQ[c[m]], m++]]; Set[k, m]; While[Or[IntegerQ[c[k]], k == # + 1, GCD[k, # + 1] == 1], k++] &[a[[-1]]]; AppendTo[a, k]; Set[c[k], i], {i, 65}]; a] (* Michael De Vlieger, Aug 18 2021 *)
  • PARI
    find(va, x) = {my(k=1, s=Set(va)); while ((k==x) || (gcd(k, x) == 1) || setsearch(s, k), k++); k;}
    lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = find(va, va[n-1]+1);); va;} \\ Michel Marcus, Aug 21 2021
    
  • Python
    from math import gcd
    A347113_list, nset, m = [1], {1}, 2
    for _ in range(100):
        j = A347113_list[-1]+1
        k = m
        while k == j or gcd(k,j) == 1 or k in nset:
            k += 1
        A347113_list.append(k)
        nset.add(k)
        while m in nset:
            m += 1 # Chai Wah Wu, Sep 01 2021

Extensions

Comments edited (including deletion of incorrect comments) by N. J. A. Sloane, Sep 05 2021
For the moment I am withdrawing my claim that this is a permutation of the positive integers. - N. J. A. Sloane, Sep 05 2022

A354169 a(0) = 0, a(1) = 1, a(2) = 2; for k >= 2, given a(k), the sequence is extended by adjoining two terms: a(2*k-1) = smallest m >= 0 not among a(0) .. a(k) such that {m, a(k), a(k+1), ..., a(2*k-2)} are pairwise disjoint in binary, and a(2*k) = smallest m >= 0 not among a(0) .. a(k) such that {m, a(k), ..., a(2*k-1)} are pairwise disjoint in binary.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 16, 32, 64, 12, 128, 256, 512, 17, 1024, 34, 2048, 4096, 8192, 68, 16384, 136, 32768, 65536, 131072, 768, 262144, 524288, 1048576, 1025, 2097152, 18, 4194304, 2080, 8388608, 16777216, 33554432, 12288, 67108864, 134217728, 268435456, 16388
Offset: 0

Views

Author

N. J. A. Sloane, Jun 05 2022

Keywords

Comments

The paper by De Vlieger et al. (2022) calls this the "binary two-up sequence".
"Pairwise disjoint in binary" means no common 1-bits in their binary representations.
This is a set-theory analog of A090252. It bears the same relation to A090252 as A252867 does to A098550, A353708 to A121216, A353712 to A347113, etc.
A consequence of the definition, and also an equivalent definition, is that this is the lexicographically earliest infinite sequence of distinct nonnegative numbers with the property that the binary representation of a(n) is disjoint from (has no common 1's with) the binary representations of the following n terms.
An equivalent definition is that a(n) is the smallest nonnegative number that is disjoint (in its binary representation) from each of the previous floor(n/2) terms.
For the subsequence 0, 3, 12, 17, 34, ... of the terms that are not powers of 2 see A354680 and A354798.
All terms are the sum of at most two powers of 2 (see De Vlieger et al., 2022). - N. J. A. Sloane, Aug 29 2022

Examples

			After a(2) = 2 = 10_2, a(3) must equal ?0?_2, and the smallest such number we have not seen is a(3) = 100_2 = 4, and a(4) must equal ?00?_2, and the smallest such number we have not seen is a(4) = 1000_2 = 8.
		

Crossrefs

A355889 is a more efficient way to present this sequence.

Programs

Extensions

More terms from Rémy Sigrist, Jun 06 2022

A353989 a(1) = 1; a(2) = 3; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with a(n-1) and whose binary expansion has a 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 13 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that each term must share at least one 1-bit in common with the previous term in their binary expansions. The majority of terms are concentrated along the same three lines as in A064413 although at least three additional lines appear that contains fewer terms. See the linked image. Unlike A064413 the primes do not occur in their natural order and a prime p can be preceded and followed by multiples of p other than 2p and 3p respectively.
In the first 100000 terms the fixed points are 1, 16, 32, 209, 527, and it is likely no more exist. In the same range the lowest unseen number is 34849; the sequence is conjectured to be a permutation of the positive integers.
See A353245 for the binary AND operation of each pair of terms.

Examples

			a(3) = 6 as a(2) = 3, 6 = 110_2, 3 = 11_2, and 6 is the smallest unused number that shares a common factor with 3 and has a 1-bit in common with 3 in their binary expansions.
		

Crossrefs

A352763 a(1) = 1; a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with a(n-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, 2, 4, 8, 6, 9, 18, 12, 3, 24, 32, 10, 5, 40, 16, 14, 48, 15, 80, 34, 17, 68, 26, 36, 27, 96, 20, 35, 28, 64, 22, 33, 30, 65, 50, 72, 21, 42, 69, 138, 52, 66, 44, 82, 41, 656, 38, 88, 128, 46, 144, 39, 192, 45, 130, 13, 208, 256, 54, 129, 60, 194, 56, 7, 112, 132, 11, 176, 70, 25, 100, 136, 51
Offset: 1

Views

Author

Scott R. Shannon, May 15 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that no term can have a 1-bit in common with the previous term in their binary expansions. These restrictions lead to numerous terms being much larger than their preceding term, while the smaller terms overall show similar behavior to A109812. See the linked image. Unlike A064413 the primes do not occur in their natural order and the term following a prime can be a very large multiple of the prime.
In the first 50000 terms the fixed points are 1, 2, 105, 135, 225, 2157, 3972, 7009, 8531, although it is likely more exist. In the same range the lowest unseen number is 383; the sequence is conjectured to be a permutation of the positive integers.

Examples

			a(5) = 6 as a(4) = 8, 6 = 110_2, 8 = 1000_2, and 6 is the smallest unused number that shares a common factor with 8 but has no 1-bit in common with 8 in their binary expansions.
		

Crossrefs

A354087 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that shares a factor with a(n-1) and whose binary expansion has a single 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

1, 3, 6, 2, 10, 8, 12, 4, 14, 18, 15, 20, 5, 25, 35, 21, 9, 24, 16, 22, 11, 33, 27, 48, 26, 13, 52, 32, 34, 30, 36, 28, 7, 42, 49, 77, 56, 38, 19, 133, 57, 69, 46, 66, 39, 65, 45, 50, 40, 54, 68, 44, 70, 58, 72, 60, 74, 64, 76, 80, 55, 88, 96, 51, 78, 81, 102, 130, 62, 132, 63, 129, 43, 86, 104, 82
Offset: 1

Views

Author

Scott R. Shannon, May 17 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that each term must share a single 1-bit in common with the previous term in their binary expansions. These restrictions lead to numerous terms being significantly larger than their preceding term, while the smaller terms overall show similar behavior to A109812. See the linked image. Unlike A064413 the primes do not occur in their natural order and both the proceeding and following terms of the primes can be large multiples of the prime.
In the first 100000 terms the fixed points are 1, 3, 30, 38, 350, 1603, 1936, 10176, 11976, 46123, 58471, 89870, although it is likely more exist. In the same range the lowest unseen number is 1019; the sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 8 as a(5) = 10, 8 = 1000_2, 10 = 1010_2, and 8 is the smallest unused number that shares a common factor with 10 and has a single 1-bit in common with 10 in their binary expansions. Note that 4 satisfies the first criterion but not the second.
		

Crossrefs

Showing 1-6 of 6 results.