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 A047271 #29 Sep 08 2022 08:44:56 %S A047271 0,3,5,6,9,11,12,15,17,18,21,23,24,27,29,30,33,35,36,39,41,42,45,47, %T A047271 48,51,53,54,57,59,60,63,65,66,69,71,72,75,77,78,81,83,84,87,89,90,93, %U A047271 95,96,99,101,102,105,107,108,111,113,114,117,119,120,123,125 %N A047271 Numbers that are congruent to {0, 3, 5} mod 6. %H A047271 Vincenzo Librandi, <a href="/A047271/b047271.txt">Table of n, a(n) for n = 1..5000</a> %H A047271 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1). %F A047271 From _Colin Barker_, Mar 13 2012: (Start) %F A047271 G.f.: x^2*(3+2*x+x^2)/((1-x)^2*(1+x+x^2)). %F A047271 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. (End) %F A047271 From _Wesley Ivan Hurt_, Jun 13 2016: (Start) %F A047271 a(n) = (6*n-4+cos(2*n*Pi/3)-sqrt(3)*sin(2*Pi*n/3))/3. %F A047271 a(3k) = 6k-1, a(3k-1) = 6k-3, a(3k-2) = 6k-6. (End) %F A047271 Sum_{n>=2} (-1)^n/a(n) = log(2)/6 + log(2+sqrt(3))/(2*sqrt(3)) - Pi/12. - _Amiram Eldar_, Dec 14 2021 %e A047271 G.f. = 3*x^2 + 5*x^3 + 6*x^4 + 9*x^5 + 11*x^6 + 12*x^7 +15*x^8 + 17*x^9 + ... %p A047271 A047271:=n->(6*n-4+cos(2*n*Pi/3)-sqrt(3)*sin(2*Pi*n/3))/3: seq(A047271(n), n=1..100); # _Wesley Ivan Hurt_, Jun 13 2016 %t A047271 Select[Range[0,120], MemberQ[{0,3,5}, Mod[#,6]]&] (* _Vincenzo Librandi_, Apr 26 2012 *) %o A047271 (Magma) I:=[0, 3, 5, 6]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // _Vincenzo Librandi_, Apr 26 2012 %K A047271 nonn,easy %O A047271 1,2 %A A047271 _N. J. A. Sloane_ %E A047271 G.f. corrected by _Colin Barker_, May 14 2012