cp's OEIS Frontend

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.

A047223 Numbers that are congruent to {1, 2, 3} mod 5.

This page as a plain text file.
%I A047223 #34 Apr 16 2023 03:18:16
%S A047223 1,2,3,6,7,8,11,12,13,16,17,18,21,22,23,26,27,28,31,32,33,36,37,38,41,
%T A047223 42,43,46,47,48,51,52,53,56,57,58,61,62,63,66,67,68,71,72,73,76,77,78,
%U A047223 81,82,83,86,87,88,91,92,93,96,97,98,101,102,103,106,107
%N A047223 Numbers that are congruent to {1, 2, 3} mod 5.
%H A047223 Vincenzo Librandi, <a href="/A047223/b047223.txt">Table of n, a(n) for n = 1..1000</a>
%H A047223 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A047223 G.f.: x*(1+x+x^2+2*x^3)/((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Oct 08 2011
%F A047223 a(n) = 2*floor((n-1)/3)+n. - _Gary Detlefs_, Dec 22 2011
%F A047223 From _Wesley Ivan Hurt_, Jun 14 2016: (Start)
%F A047223 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
%F A047223 a(n) = (15*n-12-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
%F A047223 a(3k) = 5k-2, a(3k-1) = 5k-3, a(3k-2) = 5k-4. (End)
%F A047223 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2+2/sqrt(5))*Pi/10 - log(phi)/sqrt(5) + 3*log(2)/5, where phi is the golden ratio (A001622). - _Amiram Eldar_, Apr 16 2023
%p A047223 A047223:=n->(15*n-12-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047223(n), n=1..100); # _Wesley Ivan Hurt_, Jun 14 2016
%t A047223 Select[Range[100], MemberQ[{1, 2, 3}, Mod[#,5]]&] (* _Harvey P. Dale_, Oct 28 2013 *)
%t A047223 LinearRecurrence[{1, 0, 1, -1}, {1, 2, 3, 6}, 100] (* _Vincenzo Librandi_, Jun 15 2016 *)
%o A047223 (PARI) a(n)=(n-1)\3*5+n%5 \\ _Charles R Greathouse IV_, Dec 22 2011
%o A047223 (Magma) [n : n in [0..150] | n mod 5 in [1..3]]; // _Wesley Ivan Hurt_, Jun 14 2016
%Y A047223 Cf. A001622.
%K A047223 nonn,easy
%O A047223 1,2
%A A047223 _N. J. A. Sloane_