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.

User: Matthew R. Maas

Matthew R. Maas's wiki page.

Matthew R. Maas has authored 2 sequences.

A362830 Number of bases b with 2 <= b < n such that n written in base b is a strictly increasing sequence of digits.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 5, 4, 6, 6, 7, 7, 9, 8, 11, 10, 11, 12, 14, 12, 15, 15, 17, 16, 19, 17, 20, 19, 21, 22, 23, 21, 25, 26, 27, 25, 29, 27, 30, 30, 30, 32, 34, 31, 35, 34, 37, 37, 40, 37, 40, 39, 41, 43, 45, 40, 46, 46, 46, 46, 49, 48, 52, 51, 54, 51
Offset: 1

Author

Matthew R. Maas, May 04 2023

Keywords

Examples

			The number 27 forms a strictly increasing sequence of digits when written in base 4 (1,2,3), base 7 (3,6), base 10 (2,7), base 11 (2,5), base 12 (2,3), and bases 14 through 25 (1,13 through 1,2), and no other bases below 27. There are 17 bases with this property, so a(27)=17.
		

Programs

Extensions

a(33) and beyond from Michael S. Branicky, May 05 2023

A343017 a(1)=1. For n > 1, a(n) is the n-th positive integer after a(n-1) which cannot be written as a sum of distinct preceding terms in the sequence.

Original entry on oeis.org

1, 3, 7, 14, 26, 39, 67, 122, 180, 347, 524, 884, 1700, 2564, 4893, 8826, 15593, 28348, 50527, 73536, 136858, 251537, 388362, 662078, 1038501, 1952109, 2983020, 5533878, 8515097, 16211471, 29346362, 45472332, 74818528, 134329628, 251629409, 385580882
Offset: 1

Author

Matthew R. Maas, Apr 02 2021

Keywords

Comments

Theorem: for n >= 6, a(n) < (Sum_{i=1..n-1} a(i)) - a(n-3). Corollary: a(n) = O(x^n) where x is the positive real solution to x^4 - 2x^3 + x - 1 = 0, exact value (1 + sqrt(3 + 2*sqrt(5)))/2 = 1.86676.... I conjecture that this bound can be tightened further. - Matthew R. Maas, Apr 21 2021

Examples

			For a(7):
The first six terms of the sequence are 1, 3, 7, 14, 26, and 39, and the set of all distinct sums of subsets of this set of six numbers is {0 (the empty sum), 1, 3, 4, 7, 8, 10, 11, 14, 15, 17, 18, 21, 22, 24, 25, 26, 27, 29, 30, 33, 34, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 53, 54, 56, 57, 60, 61, 63, 64, 65, 66, 68, 69, 72, 73, 75, 76, 79, 80, 82, 83, 86, 87, 89, 90}. The numbers after 39 which are NOT in this set are {45, 52, 55, 58, 59, 62, 67, ...}. The 7th such number is 67, so a(7)=67.
		

Crossrefs

Cf. A049864. Formula for A049864 was used in calculation of growth rate upper bound. - Matthew R. Maas, Apr 21 2021

Programs

  • Java
    // Running set of all possible numbers
    // that can be written as a sum of distinct
    // terms in the sequence so far. The set
    // starts with one element, 0, for the empty
    // sum.
    HashSet set = new HashSet<>();
    set.add(0);
    int last = 0;
    int nextCount = 1;
    while (true) {
        int j = nextCount;
        int position = last;
        while(true) {
            ++position;
            if (set.contains(position)) {
                continue;
            }
            --j;
            if (j == 0) {
                // Output the next term of the sequence.
                System.out.println(position);
                last = position;
                // Add to the running set of possible sums
                // any new sums now possible because of the
                // term just added.
                HashSet setCopy = new HashSet<>(set);
                for (Integer val : setCopy) {
                    set.add(Math.addExact(position, val));
                }
                break;
            }
        }
        ++nextCount;
    }
    (C++) See Links section.
  • Maple
    b:= proc(n, i) option remember; n=0 or i>1 and
          b(n, i-1) or i>0 and a(i)<=n and b(n-a(i), i-1)
        end:
    a:= proc(n) option remember; local i, j, k; if n=1 then k:= 1
          else k:= a(n-1); for i to n do for j from k+1 while
            b(j, n-1) do od; k:= j od fi; k
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Apr 02 2021
  • Mathematica
    a[1]=1;a[n_]:=a[n]=Select[Complement[Range[n+Max[l=Union[Total/@Subsets[s=Array[a,n-1]]]]],l],#>Last@s&][[n]];Array[a,20] (* Giorgos Kalogeropoulos, Apr 21 2021 *)

Extensions

a(25)-a(27) from Alois P. Heinz, Apr 02 2021
a(28)-a(30) from Jinyuan Wang, Apr 02 2021
More terms from Rémy Sigrist, Apr 04 2021