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 A174396 #15 Sep 08 2022 08:45:51 %S A174396 1,4,5,8,10,13,14,17,19,22,23,26,28,31,32,35,37,40,41,44,46,49,50,53, %T A174396 55,58,59,62,64,67,68,71,73,76,77,80,82,85,86,89,91,94,95,98,100,103, %U A174396 104,107,109,112,113,116,118,121,122,125,127,130,131,134,136 %N A174396 Numbers congruent to {1,4,5,8} mod 9. %H A174396 G. C. Greubel, <a href="/A174396/b174396.txt">Table of n, a(n) for n = 1..1000</a> %H A174396 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A174396 a(n) = 3*(n-1-floor((n-1)/4)) + (-1)^floor((n-1)/2). %F A174396 From _Wesley Ivan Hurt_, Oct 17 2015: (Start) %F A174396 G.f.: x*(1+3*x+x^2+3*x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)). %F A174396 a(n) = a(n-1)+a(n-4)-a(n-5) for n>5. %F A174396 a(n) = (18*n-9+3*(-1)^n-2*(-1)^((2*n+1-(-1)^n)/4))/8. (End) %F A174396 E.g.f.: (1/8)*(2*sin(x) - 2*cos(x) + 18*x*exp(x) + 3*exp(-x) - 9*exp(x) + 8). - _G. C. Greubel_, Oct 18 2015 %p A174396 seq(3*(n - floor(n/4)) + (-1)^floor(n/2), n=0..100); %t A174396 CoefficientList[Series[(1 + 3 x + x^2 + 3 x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* _Wesley Ivan Hurt_, Oct 17 2015 *) %t A174396 RecurrenceTable[{a[1] == 1, a[2] == 4, a[3] == 5, a[4] == 8, a[5] == 10 , a[n+5] == a[n+4] + a[n+1] - a[n] }, a, {n, 1, 100}] (* _G. C. Greubel_, Oct 18 2015 *) %o A174396 (Magma) [(18*n-9+3*(-1)^n-2*(-1)^((2*n+1-(-1)^n) div 4))/8 : n in [1..100]]; // _Wesley Ivan Hurt_, Oct 17 2015 %K A174396 nonn,easy %O A174396 1,2 %A A174396 _Gary Detlefs_, Mar 18 2010 %E A174396 Formula corrected by _Gary Detlefs_, Mar 19 2010