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.

A336206 Lexicographically earliest sequence of nonnegative terms such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in base 10.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 5, 0, 0, 0, 2, 6, 6, 7, 8, 9, 10, 0, 3, 7, 11, 11, 12, 13, 14, 15, 16, 0, 3, 8, 12, 17, 17, 18, 19, 20, 21, 1, 4, 11, 13, 22, 22, 23, 24, 25, 26, 1, 7, 14, 18, 27, 28, 29, 30, 31, 32, 2, 9, 19, 33, 34, 35, 36, 37, 38, 39, 5, 15, 40, 41
Offset: 1

Views

Author

Rémy Sigrist, Jul 12 2020

Keywords

Comments

This sequence is a decimal variant of A279125.

Examples

			We can choose a(1) = a(2) = a(3) = 0 as 1 + 2 + 3 = 6 can be computed without carries.
However 1 + 2 + 3 + 4 implies a carry, so a(4) = 1.
		

Crossrefs

Programs

  • C
    See Links section.

Formula

a(n) = 0 iff n belongs to A278742.

A352714 Inverse permutation to A352713.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 8, 10, 5, 12, 14, 16, 18, 20, 22, 24, 7, 26, 19, 28, 13, 30, 32, 34, 9, 36, 38, 40, 42, 44, 46, 48, 11, 50, 43, 52, 15, 54, 56, 58, 27, 60, 62, 64, 66, 68, 70, 72, 17, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 21, 104, 67
Offset: 0

Views

Author

Rémy Sigrist, Mar 30 2022

Keywords

Comments

Graphically, the sequence has similarities with A279125.

Examples

			A352713(42) = 28, so a(28) = 42.
		

Crossrefs

Programs

  • PARI
    See Links section.

A375776 Bitwise conflict-free sequence: Each number n is placed into the first set k that contains no element x where n AND x > 0: a(n) = k.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 4, 3, 6, 2, 7, 8, 9, 1, 8, 7, 10, 6, 11, 12, 13, 5, 14, 15, 16, 17, 18, 19, 20, 1, 12, 11, 17, 10, 15, 14, 21, 13, 22, 23, 24, 25, 26, 27, 28, 2, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 1, 19, 18, 25, 16, 23, 22, 36, 10, 30, 29, 32
Offset: 1

Views

Author

Matt Donahoe, Aug 27 2024

Keywords

Examples

			For n = 1, a(1) = 1 because 1 gets put into the first set.
For n = 2, a(2) = 1 because 2 AND 1 == 0, so 2 can also be put into the first set.
For n = 3, a(3) = 2 because 3 AND 1 == 1, so 3 must be put into a new set.
		

Crossrefs

Programs

  • Maple
    s:= proc() {} end:
    a:= proc(n) option remember; local k; for k
          while ormap(x-> Bits[And](x, n)>0, s(k)) do od;
          s(k):= {s(k)[], n}; k
        end:
    seq(a(n), n=1..75);  # Alois P. Heinz, Aug 27 2024
  • PARI
    seq(n)={my(a=vector(n), L=vector(n)); for(n=1, n, for(j=1, oo, if(!bitand(n,L[j]), L[j]=bitor(L[j],n); a[n]=j; break))); a} \\ Andrew Howroyd, Aug 27 2024
  • Python
    def seq(n):
        L = [0] + [0] * n
        for i in range(1, n + 1):
            k = next((k for k in range(1, len(L)) if i & L[k] == 0), None)
            L[k] |= i
            yield k
    

Formula

a(n) = 1 <=> n in { A000079 }. - Andrew Howroyd, Aug 27 2024
a(n) = 2 <=> n in { A164346 }. - Alois P. Heinz, Aug 27 2024
a(n) = A279125(n) + 1. - Rémy Sigrist, Aug 30 2024

A334374 Lexicographically earliest sequence of nonnegative integers such that for any distinct i and j, a(i) = a(j) implies that the Zeckendorf representations of i and of j have no common term.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 1, 0, 3, 2, 4, 5, 0, 4, 3, 2, 6, 5, 7, 8, 0, 8, 4, 3, 9, 6, 10, 11, 1, 12, 7, 13, 14, 0, 11, 5, 7, 15, 3, 13, 9, 6, 16, 10, 8, 17, 1, 18, 12, 19, 20, 14, 21, 22, 0, 19, 6, 10, 22, 4, 23, 15, 9, 24, 18, 11, 25, 13, 26, 16, 27, 28, 17, 29
Offset: 0

Views

Author

Rémy Sigrist, Apr 25 2020

Keywords

Comments

This sequence is a variant of A279125.

Examples

			The first terms, alongside their Zeckendorf representation in binary, are:
  n   a(n)  bin(A003714(a(n)))
  --  ----  ------------------
   0     0                   0
   1     0                   1
   2     0                  10
   3     0                 100
   4     1                 101
   5     0                1000
   6     2                1001
   7     1                1010
   8     0               10000
   9     3               10001
  10     2               10010
  11     4               10100
  12     5               10101
  13     0              100000
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = 0 iff n is a Fibonacci number (A000045).

A336207 Lexicographically earliest sequence of nonnegative terms such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in factorial base.

Original entry on oeis.org

0, 0, 1, 2, 3, 0, 2, 0, 4, 5, 6, 1, 5, 4, 7, 8, 9, 3, 10, 11, 12, 13, 14, 0, 8, 1, 11, 10, 15, 0, 16, 7, 17, 16, 18, 2, 19, 17, 20, 21, 22, 15, 23, 24, 25, 26, 27, 0, 13, 12, 24, 19, 28, 1, 21, 20, 29, 30, 31, 6, 30, 29, 32, 33, 34, 28, 35, 36, 37, 38, 39, 2
Offset: 1

Views

Author

Rémy Sigrist, Jul 12 2020

Keywords

Examples

			In factorial base:
- 1 = "1", 2 = "10", 3 = "11", 4 = "20",
- we can add without carry 1 and 2, so a(1) = a(2) = 0,
- 1 + 2 + 3 implies a carry, so a(3) = 1,
- 1 + 2 + 4 and 3 + 4 imply a carry, so a(4) = 2.
		

Crossrefs

See A279125 and A336206 for similar sequences.
Cf. A279732.

Programs

  • C
    See Links section.

Formula

a(n) = 0 iff n belongs to A279732.

A383412 Lexicographically earliest sequence of integers >= 2 such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in base a(k_1).

Original entry on oeis.org

2, 2, 2, 3, 2, 3, 4, 5, 2, 3, 5, 6, 6, 7, 7, 8, 2, 4, 9, 9, 4, 7, 9, 10, 8, 5, 5, 3, 11, 12, 5, 10, 2, 10, 11, 11, 3, 12, 12, 12, 13, 13, 6, 13, 13, 14, 14, 14, 15, 7, 15, 15, 16, 16, 16, 17, 14, 17, 18, 18, 15, 18, 19, 19, 2, 20, 20, 20, 4, 17, 17, 21, 6, 18
Offset: 0

Views

Author

Rémy Sigrist, Apr 26 2025

Keywords

Comments

This sequence is a variant of A279125 and A336206 exploiting several bases.
This sequence is unbounded:
- by contradiction, suppose that a(n) <= B for some B >= 2,
- let U_B = {1 + B!*k, k >= 0},
- the base b expansion of any term of U_B ends with a digit 1 in any base b in the interval 2..B,
- by the pigeonhole principle, for some b in the interval 2..B, we have a(u) = b for infinitely many terms of U_B,
- however we can at most add b-1 such terms in base b, a contradiction.

Examples

			The first terms, in decimal and in base a(n), alongside the corresponding sums of indices k <= n such that a(k) = a(n) in base a(n), are:
  n   a(n)  n in base a(n)  Sums in base a(n)
  --  ----  --------------  -----------------
   0     2  0               0
   1     2  1               1
   2     2  1,0             1,1
   3     3  1,0             1,0
   4     2  1,0,0           1,1,1
   5     3  1,2             2,2
   6     4  1,2             1,2
   7     5  1,2             1,2
   8     2  1,0,0,0         1,1,1,1
   9     3  1,0,0           1,2,2
  10     5  2,0             3,2
  11     6  1,5             1,5
  12     6  2,0             3,5
  13     7  1,6             1,6
  14     7  2,0             3,6
  15     8  1,7             1,7
		

Crossrefs

Programs

  • PARI
    {   t = [0, 0];
        for (n = 0, 73,
            for (b = 2, oo,
                if (#t < b,
                    t = concat(t, vector(#t)););
                if (sumdigits(t[b]+n, b) == sumdigits(t[b], b) + sumdigits(n, b),
                    print1 (b", "); t[b] += n; break;););); }

Formula

a(n) = 2 iff n belongs to A131577.
Showing 1-6 of 6 results.