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.

A350605 Irregular triangle read by rows: row n lists the elements of the set S_n in increasing order, where S_1 = {1}, and S_{n+1} is the set {k, 2*k+1, 3*k+1: k in S_n}.

Original entry on oeis.org

1, 1, 3, 4, 1, 3, 4, 7, 9, 10, 13, 1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 40, 1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 39, 40, 43, 45, 46, 55, 57, 58, 63, 64, 67, 81, 82, 85, 94, 121, 1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 39, 40, 43, 45, 46, 55, 57, 58, 63, 64, 67, 79, 81, 82, 85, 87, 91, 93, 94, 111, 115, 117, 118, 121, 127, 129, 130, 135, 136, 139, 163, 165, 166, 171, 172, 175, 189, 190, 193, 202, 243, 244, 247, 256, 283, 364
Offset: 1

Views

Author

N. J. A. Sloane, Jan 12 2022

Keywords

Comments

Row n has A350606(n) elements.
The rows converge to A002977.

Examples

			The first few sets S_n are:
[1],
[1, 3, 4],
[1, 3, 4, 7, 9, 10, 13],
[1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 40],
[1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, 28, 31, 39, 40, 43, 45, 46, 55, 57, 58, 63, 64, 67, 81, 82, 85, 94, 121],
...
		

Crossrefs

Programs

  • Maple
    T:= proc(n) option remember; `if`(n=1, 1, sort(
         [map(k-> [k, 2*k+1, 3*k+1][], {T(n-1)})[]])[])
        end:
    seq(T(n), n=1..6);  # Alois P. Heinz, Jan 12 2022
  • Mathematica
    T[n_] := T[n] = If[n==1, {1}, {#, 2#+1, 3#+1}& /@ T[n-1] // Flatten //
         Union];
    Table[T[n], {n, 1, 6}] // Flatten (* Jean-François Alcover, May 06 2022, after Alois P. Heinz *)
  • Python
    from itertools import chain, islice
    def A350605_gen(): # generator of terms
        s = {1}
        while True:
            yield from sorted(s)
            s = set(chain.from_iterable((x,2*x+1,3*x+1) for x in s))
    A350605_list = list(islice(A350605_gen(),30)) # Chai Wah Wu, Jan 12 2022