%I #22 Sep 08 2022 08:45:55
%S 1,21,77,1617,5929,124509,456533,9587193,35153041,738213861,
%T 2706784157,56842467297,208422380089,4376869981869,16048523266853,
%U 337018988603913,1235736291547681,25950462122501301,95151694449171437,1998185583432600177,7326680472586200649
%N a(1) = 1, a(2) = 21, a(n) = 77*a(n-2) for n>=3.
%C For n >= 3, a(n) = the smallest number h > a(n-1) such that [[a(n-2) + a(n-1)] * [a(n-2) + a(n)] * [a(n-1) + a(n)]] / [a(n-2) * a(n-1) * a(n)] is integer (= 104).
%H G. C. Greubel, <a href="/A182754/b182754.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,77).
%F a(2*n) = 21*a(2*n-1), a(2*n+1) = (11/3)*a(2*n).
%F G.f.: x*(1+21*x) / ( 1 - 77*x^2 ).
%F From _Colin Barker_, Jan 11 2018: (Start)
%F a(n) = 3*7^(n/2)*11^(n/2-1) for n even.
%F a(n) = 77^((n-1)/2) for n odd.
%F (End)
%e For n = 4; a(2) = 21, a(3) = 77, a(4) = 1617 before [(21+77)*(21+1617)*(77+1617)] / (21*77*1617) = 104.
%t LinearRecurrence[{0,77},{1,21},30] (* _Harvey P. Dale_, Sep 05 2013 *)
%o (PARI) A182754(n)=if(n%2,77^(n\2),77^(n\2-1)*21)
%o (Magma) I:=[1,21]; [n le 2 select I[n] else 77*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Jan 11 2018
%o (PARI) Vec(x*(1 + 21*x) / (1 - 77*x^2) + O(x^40)) \\ _Colin Barker_, Jan 11 2018
%o (Python)
%o def aupton(nn):
%o dmo = [1, 21, 77]
%o for n in range(3, nn+1): dmo.append(77*dmo[-2])
%o return dmo[:nn]
%o print(aupton(21)) # _Michael S. Branicky_, Jan 21 2021
%Y Cf. A182751 - A182757, A038754.
%K nonn,easy
%O 1,2
%A _Jaroslav Krizek_, Nov 27 2010
%E More terms from _Harvey P. Dale_, Sep 05 2013