OFFSET
1,3
LINKS
Alois P. Heinz, Rows n = 1..15, flattened
David A. Klarner and Richard Rado, Linear combinations of sets of consecutive integers, The American Mathematical Monthly, Vol. 80, No. 9 (1973), pp. 985-989.
EXAMPLE
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],
...
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 *)
PROG
(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))
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Jan 12 2022
STATUS
approved