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 A140298 #22 Nov 03 2018 15:58:22 %S A140298 1,2,3,4,5,9,13,14,27,40,41,81,121,122,243,364,365,729,1093,1094,2187, %T A140298 3280,3281,6561,9841,9842,19683,29524,29525,59049,88573,88574,177147, %U A140298 265720,265721,531441,797161,797162,1594323,2391484,2391485,4782969,7174453,7174454 %N A140298 a(0)=1; a(3n+1) = a(3n)+1, a(3n+2) = a(3n+1) + a(3n) (=3*A000244), a(3n+3) = a(3n+2) + a(3n) (=A003462(n+2)). %C A140298 Note period 12 for a(n) mod 10. %H A140298 Vincenzo Librandi, <a href="/A140298/b140298.txt">Table of n, a(n) for n = 0..200</a> %H A140298 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,3,3,3) %F A140298 From _R. J. Mathar_, Jan 17 2009: (Start) %F A140298 G.f.: (1 + 3*x + 6*x^2 + 6*x^3 + 3*x^4)/((1 + x + x^2)*(1 - 3*x^3)). %F A140298 a(n) = -a(n-1) - a(n-2) + 3*a(n-3) + 3*a(n-4) + 3*a(n-5). %F A140298 a(n) = (3*b(n)-A049347(n))/2 where b(n)=1,1,2,3,3,6,9,9,18,27,27,54,.. = 3*b(n-3). %F A140298 (End) %o A140298 (PARI) Vec((1+3*x+6*x^2+6*x^3+3*x^4)/((1+x+x^2)*(1-3*x^3))+O(x^99)) \\ _Charles R Greathouse IV_, Jun 20 2011 %Y A140298 Cf. A107365. %K A140298 nonn,easy %O A140298 0,2 %A A140298 _Paul Curtz_, May 25 2008 %E A140298 a(27)-a(43) added by _Andrew Howroyd_, Nov 03 2018