%I #25 Jun 09 2022 02:28:42
%S 0,2,5,8,14,20,29,38,53,68,89,110,140,170,209,248,302,356,425,494,584,
%T 674,785,896,1037,1178,1349,1520,1730,1940,2189,2438,2741,3044,3401,
%U 3758,4184,4610,5105,5600,6185,6770,7445,8120,8906,9692,10589
%N The sequence m(n) in A022905.
%H T. D. Noe, <a href="/A022907/b022907.txt">Table of n, a(n) for n=1..1000</a>
%H J. M. Dover, <a href="http://arxiv.org/abs/1606.08033">On two OEIS conjectures</a>, arXiv:1606.08033 [math.CO], 2016.
%F a(n) = 3 * A033485(n-1) - 1 = (3/2) * A000123(n-1) - 1, n>1. Proved by Jeremy Dover. - _Ralf Stephan_, Dec 08 2004
%t a123[n_] := a123[n] = If[n == 0, 1, a123[Floor[n/2]] + a123[n-1]];
%t a[n_] := If[n == 1, 0, (3/2) a123[n-1] - 1]; Array[a, 50] (* _Jean-François Alcover_, Dec 04 2018 *)
%o (Python)
%o from itertools import islice
%o from collections import deque
%o def A022907_gen(): # generator of terms
%o aqueue, f, b, a = deque([2]), True, 1, 2
%o yield from (0, 2, 5)
%o while True:
%o a += b
%o yield 3*a-1
%o aqueue.append(a)
%o if f: b = aqueue.popleft()
%o f = not f
%o A022907_list = list(islice(A022907_gen(),40)) # _Chai Wah Wu_, Jun 08 2022
%K nonn
%O 1,2
%A _Clark Kimberling_