This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A281166 #47 Dec 18 2023 12:20:33 %S A281166 1,1,3,8,17,33,64,127,255,512,1025,2049,4096,8191,16383,32768,65537, %T A281166 131073,262144,524287,1048575,2097152,4194305,8388609,16777216, %U A281166 33554431,67108863,134217728,268435457,536870913,1073741824,2147483647,4294967295,8589934592 %N A281166 a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2, a(0)=a(1)=1, a(2)=3. %C A281166 a(n) is the first sequence on three (with its first and second differences): %C A281166 1, 1, 3, 8, 17, 33, 64, 127, ...; %C A281166 0, 2, 5, 9, 16, 31, 63, 128, ..., that is 0 followed by A130752; %C A281166 2, 3, 4, 7, 15, 32, 65, 129, ..., that is 2 followed by A130755; %C A281166 1, 1, 3, 8, 17, 33, 64, 127, ..., this sequence. %C A281166 The main diagonal is 2^n. %C A281166 The sum of the first three lines is 3*2^n. %C A281166 Alternated sum and subtraction of a(n) and its inverse binomial transform (period 3: repeat [1, 0, 2]) gives the autosequence of the first kind b(n): %C A281166 0, 1, 1, 9, 17, 35, 63, 127, ... %C A281166 1, 0, 8, 8, 18, 28, 64, 126, ... %C A281166 -1, 8, 0, 10, 10, 36, 62, 134, ... %C A281166 9, -8, 10, 0, 26, 26, 72, 118, ... . %C A281166 The main diagonal is 0's. The first two upper diagonals are A259713. %C A281166 The sum of the first three lines gives 9*A001045. %C A281166 a(n) mod 9 gives a periodic sequence of length 6: repeat [1, 1, 3, 8, 8, 6]. %C A281166 a(n) = A130750(n-1) for n > 2. - _Georg Fischer_, Oct 23 2018 %H A281166 Colin Barker, <a href="/A281166/b281166.txt">Table of n, a(n) for n = 0..1000</a> %H A281166 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,2). %F A281166 Binomial transform of the sequence of length 3: repeat [1, 0, 2]. %F A281166 a(n+3) = -a(n) + 9*2^n. %F A281166 a(n) = 2^n - periodic 6: repeat [0, 1, 1, 0, -1, -1, 0]. %F A281166 a(n+6) = a(n) + 63*2^n. %F A281166 a(n+1) = 2*a(n) - period 6: repeat [1, -1, -2, -1, 1, 2]. %F A281166 a(n) = 2^n - 2*sin(Pi*n/3)/sqrt(3). - _Jean-François Alcover_ and _Colin Barker_, Jan 16 2017 %F A281166 G.f.: (1 - 2*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - _Colin Barker_, Jan 16 2017 %t A281166 LinearRecurrence[{3, -3, 2}, {1, 1, 3}, 30] (* _Jean-François Alcover_, Jan 16 2017 *) %o A281166 (PARI) Vec((1 - 2*x + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ _Colin Barker_, Jan 16 2017 %o A281166 (Magma) I:=[1,1,3]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // _G. C. Greubel_, Jan 15 2018 %Y A281166 Cf. A000079, A001045, A005010, A007283, A014551 (a diagonal), A057079, A062510 (a diagonal), A128834, A130750, A130752, A130755, A153234, A153237, A259713. %K A281166 nonn,easy %O A281166 0,3 %A A281166 _Paul Curtz_, Jan 16 2017