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 A047380 #29 Dec 25 2023 13:46:27 %S A047380 1,2,4,5,8,9,11,12,15,16,18,19,22,23,25,26,29,30,32,33,36,37,39,40,43, %T A047380 44,46,47,50,51,53,54,57,58,60,61,64,65,67,68,71,72,74,75,78,79,81,82, %U A047380 85,86,88,89,92,93,95,96,99,100,102,103,106,107,109,110 %N A047380 Numbers that are congruent to {1, 2, 4, 5} mod 7. %H A047380 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A047380 G.f.: x*(1+x+2*x^2+x^3+2*x^4) / ( (1+x)*(x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Oct 08 2011 %F A047380 From _Wesley Ivan Hurt_, May 20 2016: (Start) %F A047380 a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. %F A047380 a(n) = (14*n - 11 - 3*i^(2*n) - (1+i)*i^(-n-1) - (1-i)*i^(n+1))/8 where i=sqrt(-1). %F A047380 a(2n) = A047385(n), a(2n-1) = A047346(n). (End) %p A047380 A047380:=n->(14*n-11-3*I^(2*n)-(1+I)*I^(-n-1)-(1-I)*I^(n+1))/8: seq(A047380(n), n=1..100); # _Wesley Ivan Hurt_, May 20 2016 %t A047380 Table[(14n-11-3I^(2n)-(1+I)I^(-n-1)-(1-I)I^(n+1))/8, {n, 80}] (* _Wesley Ivan Hurt_, May 20 2016 *) %t A047380 LinearRecurrence[{1,0,0,1,-1},{1,2,4,5,8},100] (* _Harvey P. Dale_, Jun 05 2016 *) %o A047380 (PARI) a(n)=(n-1)\4*7+[5,1,2,4][n%4+1] \\ _Charles R Greathouse IV_, Jun 11 2015 %Y A047380 Cf. A002265, A047346, A047385. %K A047380 nonn,easy %O A047380 1,2 %A A047380 _N. J. A. Sloane_