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 A047481 #43 Sep 08 2022 08:44:57 %S A047481 0,2,5,7,8,10,13,15,16,18,21,23,24,26,29,31,32,34,37,39,40,42,45,47, %T A047481 48,50,53,55,56,58,61,63,64,66,69,71,72,74,77,79,80,82,85,87,88,90,93, %U A047481 95,96,98,101,103,104,106,109,111,112,114,117,119,120,122,125 %N A047481 Numbers that are congruent to {0, 2, 5, 7} mod 8. %C A047481 Complement of A047415. %H A047481 Vincenzo Librandi, <a href="/A047481/b047481.txt">Table of n, a(n) for n = 1..1000</a> %H A047481 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1). %F A047481 From _Colin Barker_, May 14 2012: (Start) %F A047481 a(n) = (1/4+i/4)*((-3+3*i)-i*(-i)^n+i^n+(4-4*i)*n) where i=sqrt(-1). %F A047481 G.f.: x^2*(2+x+x^2)/((1-x)^2*(1+x^2)). (End) %F A047481 a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4. - _Vincenzo Librandi_, May 16 2012 %F A047481 a(n) = (-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2. %F A047481 a(n) = cos(n*Pi/2)-1/2*cos((n-1)*Pi/2)-1/2*cos(n*Pi/2)+2*(n-1)+1/2. - _Cédric Christian Bernard Gagneux_, Mar 05 2014 %F A047481 a(2k) = A047524, a(2k-1) = A047615(k). - _Wesley Ivan Hurt_, Jun 01 2016 %F A047481 E.g.f.: (2 - sin(x) + cos(x) + (4*x - 3)*exp(x))/2. - _Ilya Gutkovskiy_, Jun 02 2016 %F A047481 Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4 - Pi/16. - _Amiram Eldar_, Dec 21 2021 %p A047481 A047481:=n->(-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2: seq(A047481(n), n=1..100); # _Wesley Ivan Hurt_, Jun 01 2016 %t A047481 Select[Range[0,300], MemberQ[{0,2,5,7}, Mod[#,8]]&] (* _Vincenzo Librandi_, May 16 2012 *) %t A047481 LinearRecurrence[{2,-2,2,-1},{0,2,5,7},70] (* _Harvey P. Dale_, May 28 2017 *) %o A047481 (Magma) I:=[0, 2, 5, 7, 8]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // _Vincenzo Librandi_, May 16 2012 %o A047481 (PARI) a(n)=[-1,0,2,5][n%4]+n\4*8 \\ _Charles R Greathouse IV_, Mar 05 2014 %o A047481 (PARI) x='x+O('x^100); concat(0, Vec(x^2*(2+x+x^2)/((1-x)^2*(1+x^2)))) \\ _Altug Alkan_, Dec 24 2015 %Y A047481 Cf. A047415, A047524, A047615. %K A047481 nonn,easy %O A047481 1,2 %A A047481 _N. J. A. Sloane_