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 A047454 #34 Sep 08 2022 08:44:57 %S A047454 1,2,3,4,9,10,11,12,17,18,19,20,25,26,27,28,33,34,35,36,41,42,43,44, %T A047454 49,50,51,52,57,58,59,60,65,66,67,68,73,74,75,76,81,82,83,84,89,90,91, %U A047454 92,97,98,99,100,105,106,107,108,113,114,115,116,121,122,123 %N A047454 Numbers that are congruent to {1, 2, 3, 4} mod 8. %H A047454 Vincenzo Librandi, <a href="/A047454/b047454.txt">Table of n, a(n) for n = 1..1000</a> %H A047454 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A047454 From _Colin Barker_, May 14 2012: (Start) %F A047454 a(n) = (-5-(-1)^n-(1-i)*(-i)^n-(1+i)*i^n+4*n)/2 where i=sqrt(-1). %F A047454 G.f.: x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2)). (End) %F A047454 a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - _Vincenzo Librandi_, May 15 2012 %F A047454 a(2k) = A047463(k), a(2k-1) = A047471(k). - _Wesley Ivan Hurt_, Jun 01 2016 %F A047454 Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16 + 3*log(2)/8. - _Amiram Eldar_, Dec 23 2021 %p A047454 A047454:=n->(-5-I^(2*n)-(1-I)*(-I)^n-(1+I)*I^n+4*n)/2: seq(A047454(n), n=1..100); # _Wesley Ivan Hurt_, Jun 01 2016 %t A047454 Select[Range[0,300], MemberQ[{1,2,3,4}, Mod[#,8]]&] (* _Vincenzo Librandi_, May 15 2012 *) %o A047454 (Magma) I:=[1, 2, 3, 4, 9]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // _Vincenzo Librandi_, May 15 2012 %o A047454 (PARI) my(x='x+O('x^100)); Vec(x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2))) \\ _Altug Alkan_, Dec 24 2015 %Y A047454 Cf. A047463, A047471. %K A047454 nonn,easy %O A047454 1,2 %A A047454 _N. J. A. Sloane_