login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Let S(1)={1} and, for n>1 let S(n) be the smallest set containing x, x+1, 2x and 3x for each element x in S(n-1). a(n) is the number of elements in S(n).
1

%I #18 Mar 21 2023 15:23:25

%S 1,3,6,13,27,54,107,213,423,845,1685,3371,6735,13468,26937,53900,

%T 107873,216035,432787,867313,1738728,3486464,6993111,14029776,

%U 28153533,56507114,113435141,227755613,457358671,918562597

%N Let S(1)={1} and, for n>1 let S(n) be the smallest set containing x, x+1, 2x and 3x for each element x in S(n-1). a(n) is the number of elements in S(n).

%C 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.

%e 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.

%o (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

%o (Python)

%o from itertools import chain, islice

%o def A123247_gen(): # generator of terms

%o s = {1}

%o while True:

%o yield len(s)

%o s = set(chain.from_iterable((x,x+1,2*x,3*x) for x in s))

%o A123247_list = list(islice(A123247_gen(),20)) # _Chai Wah Wu_, Jan 12 2022

%Y Cf. A000292, A122554, A168043.

%K nonn,more

%O 1,2

%A _John W. Layman_, Oct 04 2006

%E a(14)-a(25) from _Jinyuan Wang_, Apr 14 2020

%E a(26)-a(30) from _Chai Wah Wu_, Jan 12 2022