%I #45 Sep 08 2022 08:45:13
%S 1,2,3,6,14,35,90,234,611,1598,4182,10947,28658,75026,196419,514230,
%T 1346270,3524579,9227466,24157818,63245987,165580142,433494438,
%U 1134903171,2971215074,7778742050,20365011075,53316291174,139583862446
%N a(1) = 1, a(2) = 2; for n >= 2, a(n+1) = a(n) + Sum_{i = 1..n} (a(i) - a(1)).
%C If the "man or boy" program A(k, x1, x2, x3) from the program section is run with k > 0 and arbitrary x1, x2, and x3, the result is A055588(k-1)*x1 + A001519(k-1)*x2. - _Eric M. Schmidt_, Jun 24 2021
%H Vincenzo Librandi, <a href="/A093467/b093467.txt">Table of n, a(n) for n = 1..1000</a>
%H K. Kuhapatanakul, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Kuhapatanakul/kuha4.html">On the Sums of Reciprocal Generalized Fibonacci Numbers</a>, J. Int. Seq. 16 (2013) #13.7.1. See Theorem 3 p.3.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4,1).
%F a(n) = 3*a(n-1) - a(n-2) - 1, n > 3. - _Robert G. Wilson v_, Apr 08 2004
%F G.f.: x - x^2*(2*x-1)*(x-2) / ( (x-1)*(x^2-3*x+1) ). - _R. J. Mathar_, Sep 06 2014
%F a(n) = A055588(n-2) + A001519(n-2), n > 1. - _Eric M. Schmidt_, Jun 24 2021
%t a[1] = 1; a[2] = 2; a[n_] := a[n] = a[n - 1] + Sum[a[i] - a[1], {i, n - 1}]; Table[ a[n], {n, 30}]
%t Join[{1}, LinearRecurrence[{4, -4, 1}, {2, 3, 6}, 30]] (* _Vincenzo Librandi_, Feb 08 2017 *)
%o (PARI) a(n)=if(n==1,1,if(n==2,2,a(n-1)+sum(i=1,n-1,a(i)-a(1)))) \\ _Edward Jiang_, Sep 06 2014
%o (ALGOL-60) begin integer procedure A(k, x1, x2, x3);
%o value k; integer k;
%o integer x1, x2, x3;
%o begin integer procedure b;
%o begin
%o k:= k - 1;
%o B:= A := A (k, B, x1, x2);
%o end;
%o A := if k <= 0 then x2 + x3 else B;
%o end;
%o integer i;
%o for i:= 0 step 1 until 20 do
%o print (A (i, 1, 1, 0));
%o end
%o comment The above is a simplified Man or Boy Test program (cf. A132343), omitting the negative parameters from the original. - _Leonid Broukhis_, Feb 07 2017
%o (Magma) I:=[2,3,6]; [1] cat [n le 3 select I[n] else 4*Self(n-1)-4*Self(n-2)+Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Feb 08 2017
%Y Cf. A093468.
%Y Essentially the same as A032908.
%Y Cf. A001519, A055588.
%K nonn,easy
%O 1,2
%A _Amarnath Murthy_, Apr 07 2004
%E More terms from _Robert G. Wilson v_, Apr 08 2004