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

A333555 Lexicographically earliest infinite sequence of positive terms such that for any two distinct nonempty intervals, say [t, u] and [v, w], a(t) XOR ... XOR a(u) <> a(v) XOR ... XOR a(w) (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

1, 2, 4, 8, 5, 16, 32, 17, 64, 18, 37, 128, 19, 39, 72, 38, 30, 256, 20, 34, 66, 234, 512, 22, 41, 103, 174, 258, 60, 236, 1024, 23, 71, 50, 267, 24, 169, 526, 127, 285, 2048, 28, 47, 187, 69, 378, 523, 272, 1063, 367, 591, 193, 475, 4096, 31, 65, 176, 277
Offset: 1

Views

Author

Rémy Sigrist, Mar 26 2020

Keywords

Comments

By necessity, all terms are distincts.
Also, for any m and n such that m <= n, a(m) XOR ... XOR a(n) > 0.
This sequence has similarities with A101274; here we combine consecutive terms with the XOR operator, there with the classic addition.

Examples

			The values of a(u) XOR ... XOR a(v) for u <= v <= 10 are:
  u\v|  1  2  3   4   5   6   7   8    9   10
  ---+---------------------------------------
    1|  1  3  7  15  10  26  58  43  107  121 --> A333556(v)
    2|  .  2  6  14  11  27  59  42  106  120
    3|  .  .  4  12   9  25  57  40  104  122
    4|  .  .  .   8  13  29  61  44  108  126
    5|  .  .  .   .   5  21  53  36  100  118
    6|  .  .  .   .   .  16  48  33   97  115
    7|  .  .  .   .   .   .  32  49  113   99
    8|  .  .  .   .   .   .   .  17   81   67
    9|  .  .  .   .   .   .   .   .   64   82
   10|  .  .  .   .   .   .   .   .    .   18
		

Crossrefs

Programs

  • C
    See Links section.

A363446 Increasing sequence such that a(1) = 1 and a(n) is the least integer such that every segment of the sequence a(1),a(2),...,a(n) has a unique sum of elements.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 14, 21, 25, 26, 28, 31, 36, 38, 55, 56, 66, 68, 88, 91, 92, 94, 102, 125, 127, 136, 140, 158, 162, 164, 180, 182, 201, 217, 220, 226, 228, 240, 241, 259, 261, 275, 314, 331, 337, 342, 356, 366, 380, 391, 408, 432, 441, 444, 456, 469, 478, 548, 560, 565, 574, 577, 580, 586, 628, 639, 696, 701, 707, 730, 731, 732, 733, 752, 759, 773, 849, 877, 890, 922
Offset: 1

Views

Author

Bartlomiej Pawlik, Jul 09 2023

Keywords

Comments

A segment is a subsequence given by consecutive elements.

Examples

			The smallest candidate for a(3) is 3, but the sequence (1,2,3) has two segments with equal sums, namely (1,2) and (3). The next candidate is 4 and every segment of the sequence (1,2,4) has a unique sum, so a(3) = 4.
		

Crossrefs

If we omit the condition that {a(n)} is increasing, we get A101274.
Cf. A276661.

A333559 Lexicographically earliest infinite sequence of positive terms such that for any two distinct nonempty intervals, say [t, u] and [v, w], a(t) * ... * a(u) <> a(v) * ... * a(w).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 26 2020

Keywords

Comments

By necessity, all terms are distinct and strictly greater than 1.
This sequence is a variant of A101274.
Does every positive integer correspond to a product of consecutive terms?

Examples

			The values of a(i) * ... * a(j) for i <= j <= 7 are:
  i\j|  1  2   3    4    5     6      7
  ---+---------------------------------
    1|  2  6  24  120  840  6720  60480
    2|  .  3  12   60  420  3360  30240
    3|  .  .   4   20  140  1120  10080
    4|  .  .   .    5   35   280   2520
    5|  .  .   .    .    7    56    504
    6|  .  .   .    .    .     8     72
    7|  .  .   .    .    .     .      9
		

Crossrefs

Cf. A079854, A101274 (additive variant), A333555 (XOR variant).

Programs

  • PARI
    See Links section.

Formula

a(n) = A079854(n+2) / A079854(n+1).

A343951 Numbers with decimal expansion (d_1, ..., d_k) such that all the sums d_i + ... + d_j with 1 <= i <= j <= k are distinct.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 81, 82
Offset: 1

Views

Author

Rémy Sigrist, May 05 2021

Keywords

Comments

This sequence is finite, the last term being a(5562) = 8657913.
All positive terms are zeroless (A052382) and have distinct decimal digits (A010784).
There are 10, 72, 440, 1622, 2502, 906, 10, and 0 terms with 1..8 digits, resp. - Michael S. Branicky, May 05 2021

Examples

			Regarding 12458:
- we have the following partial sums of digits:
     i\j|  1  2  3  4  5
     ---+---------------
       1|  1  3  7 12 20
       2|  .  2  6 11 19
       3|  .  .  4  9 17
       4|  .  .  .  5 13
       5|  .  .  .  .  8
- as they are all distinct, 12458 is a term.
		

Crossrefs

Programs

  • PARI
    is(n) = { my (d=digits(n), s=setbinop((i,j)->vecsum(d[i..j]), [1..#d])); #s==#d*(#d+1)/2 }
    
  • Python
    def ok(n):
      d, sums = str(n), set()
      for i in range(len(d)):
        for j in range(i, len(d)):
          sij = sum(map(int, d[i:j+1]))
          if sij in sums: return False
          else: sums.add(sij)
      return True
    print(list(filter(ok, range(83)))) # Michael S. Branicky, May 05 2021

A377407 Lexicographically earliest sequence of nonnegative integers such that the alternating sums of consecutive terms are all distinct.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 25, 36, 50, 69, 92, 116, 141, 159, 185, 223, 256, 287, 340, 398, 445, 479, 536, 568, 596, 669, 767, 875, 969, 1078, 1154, 1225, 1292, 1338, 1502, 1658, 1764, 1917, 2012, 2105, 2272, 2468, 2640, 2754, 2837, 2955, 3204, 3429, 3648, 3888, 4147
Offset: 1

Views

Author

Rémy Sigrist, Oct 27 2024

Keywords

Comments

In other words, for any distinct nonempty intervals t..u and v..w, Sum_{i = t..u} a(i)*(-1)^(i-t) <> Sum_{j = v..w} a(j)*(-1)^(j-v).
This sequence is a variant of A101274 and A363446; here we consider alternating sums, there sums of consecutive terms.
By necessity, all terms are distinct.
This sequence is strictly increasing, for if d = a(n) - a(n+1) > 0, then d would have been a better choice for a(n).

Examples

			The first terms, alongside the alternate sums of consecutive terms ending with a(n), are:
  n   a(n)  Alternating sums
  --  ----  -------------------------------------------
   1     0  0
   2     1  -1, 1
   3     3  2, -2, 3
   4     6  -4, 4, -3, 6
   5    11  7, -7, 8, -5, 11
   6    17  -10, 10, -9, 12, -6, 17
   7    25  15, -15, 16, -13, 19, -8, 25
   8    36  -21, 21, -20, 23, -17, 28, -11, 36
   9    50  29, -29, 30, -27, 33, -22, 39, -14, 50
  10    69  -40, 40, -39, 42, -36, 47, -30, 55, -19, 69
		

Crossrefs

Showing 1-5 of 5 results.