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 A032793 #55 Dec 30 2023 23:44:57 %S A032793 1,2,4,6,7,9,11,12,14,16,17,19,21,22,24,26,27,29,31,32,34,36,37,39,41, %T A032793 42,44,46,47,49,51,52,54,56,57,59,61,62,64,66,67,69,71,72,74,76,77,79, %U A032793 81,82,84,86,87,89,91,92,94,96,97,99,101,102,104,106,107,109 %N A032793 Numbers that are congruent to {1, 2, 4} mod 5. %H A032793 Guenther Schrack, <a href="/A032793/b032793.txt">Table of n, a(n) for n = 1..10000</a> %H A032793 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1). %F A032793 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. %F A032793 a(n) = floor((5*n-2)/3). - _Gary Detlefs_, May 14 2011 %F A032793 G.f.: x*(1+x+2*x^2+x^3)/((1+x+x^2)*(1-x)^2). - _R. J. Mathar_, Oct 08 2011 %F A032793 From _Wesley Ivan Hurt_, Jun 14 2016: (Start) %F A032793 a(n) = (15*n - 9 + 2*sqrt(3)*sin(2*n*Pi/3))/9. %F A032793 a(3k) = 5k - 1, a(3k-1) = 5k - 3, a(3k-2) = 5k - 4. (End) %F A032793 E.g.f.: (9 + 3*(5*x - 3)*exp(x) + 2*sqrt(3)*sin(sqrt(3)*x/2)*(cosh(x/2) - sinh(x/2)))/9. - _Ilya Gutkovskiy_, Jun 14 2016 %F A032793 From _Guenther Schrack_, Oct 31 2019: (Start) %F A032793 a(n) = a(n-3) + 5 with a(1) = 1, a(2) = 2, a(3) = 4 for n > 3. %F A032793 a(n) = (15*n - 9 + (w^(2*n) - w^n)*(1 + 2*w))/9 where w = (-1 + sqrt(-3))/2. (End) %F A032793 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(10-2*sqrt(5))*Pi/10 - log(phi)/sqrt(5) + log(2)/5, where phi is the golden ratio (A001622). - _Amiram Eldar_, Apr 16 2023 %p A032793 A032793:=n->(15*n-9+2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A032793(n), n=1..100); # _Wesley Ivan Hurt_, Jun 14 2016 %t A032793 Select[Range[0, 200], MemberQ[{1, 2, 4}, Mod[#, 5]] &] (* _Vladimir Joseph Stephan Orlovsky_, Feb 11 2012 *) %t A032793 LinearRecurrence[{1,0,1,-1},{1,2,4,6},90] (* _Harvey P. Dale_, May 20 2019 *) %o A032793 (Magma)[ n: n in [0..120] | n mod 5 in {1, 2, 4} ]; // _Vincenzo Librandi_, Dec 29 2010 %o A032793 (PARI) a(n)=n\3*5+[-1,1,2][n%3+1] \\ _Charles R Greathouse IV_, Jan 18 2012 %o A032793 (Sage) [(15*n - 9 + 2*sqrt(3)*sin(2*n*pi/3))/9 for n in (1..100)] # _G. C. Greubel_, Nov 06 2019 %o A032793 (GAP) a:=[1,2,4,6];; for n in [5..100] do a[n]:=a[n-1]+a[n-3]-a[n-4]; od; a; # _G. C. Greubel_, Nov 06 2019 %Y A032793 Cf. A001622, A032794, A032795. %K A032793 nonn,easy %O A032793 1,2 %A A032793 _Patrick De Geest_, May 15 1998 %E A032793 Better description from _Michael Somos_, Jun 08 2000