OFFSET
1,2
COMMENTS
If the set mapping has x -> x, 2x, 3x, 5x is used instead of x -> x, x+1, 2x, 3x, the corresponding sequence consists of the tetrahedral numbers C(n+3,3) = A000292.
EXAMPLE
Under the indicated set mapping we have {1} -> {1,2,3} -> {1,2,3,4,6,9} -> {1,2,3,4,5,6,7,8,9,10,12,18,27}, ..., so a(2)=3, a(3)=6, a(4)=13, etc.
PROG
(PARI) lista(nn) = {my(k, v=[1]); print1(1); for(n=2, nn, v=Set(vector(4*#v, i, if(k=i%4, k*v[(3+i)\4], v[i/4]+1))); print1(", ", #v)); } \\ Jinyuan Wang, Apr 14 2020
(Python)
from itertools import chain, islice
def A123247_gen(): # generator of terms
s = {1}
while True:
yield len(s)
s = set(chain.from_iterable((x, x+1, 2*x, 3*x) for x in s))
CROSSREFS
KEYWORD
nonn,more
AUTHOR
John W. Layman, Oct 04 2006
EXTENSIONS
a(14)-a(25) from Jinyuan Wang, Apr 14 2020
a(26)-a(30) from Chai Wah Wu, Jan 12 2022
STATUS
approved