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.

A047259 Numbers that are congruent to {1, 4, 5} mod 6.

This page as a plain text file.
%I A047259 #28 Sep 08 2022 08:44:56
%S A047259 1,4,5,7,10,11,13,16,17,19,22,23,25,28,29,31,34,35,37,40,41,43,46,47,
%T A047259 49,52,53,55,58,59,61,64,65,67,70,71,73,76,77,79,82,83,85,88,89,91,94,
%U A047259 95,97,100,101,103,106,107,109,112,113,115,118,119,121,124
%N A047259 Numbers that are congruent to {1, 4, 5} mod 6.
%H A047259 Vincenzo Librandi, <a href="/A047259/b047259.txt">Table of n, a(n) for n = 1..1000</a>
%H A047259 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A047259 From _R. J. Mathar_, Feb 21 2009: (Start)
%F A047259 G.f.: x*(1+3*x+x^2+x^3)/((1-x)^2*(1+x+x^2)).
%F A047259 a(n) = a(n-3) + 6. (End)
%F A047259 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4, with a(1)=1, a(2)=4, a(3)=5, a(4)=7. - _Harvey P. Dale_, Feb 16 2015
%F A047259 From _Wesley Ivan Hurt_, Jun 11 2016: (Start)
%F A047259 a(n) = (6*n-2-cos(2*n*Pi/3)-sqrt(3)*sin(2*n*Pi/3))/3.
%F A047259 a(3k) = 6k-1, a(3k-1) = 6k-2, a(3k-2) = 6k-5. (End)
%F A047259 Sum_{n>=1} (-1)^(n+1)/a(n) = (6-sqrt(3))*Pi/18 + log(2)/6. - _Amiram Eldar_, Dec 16 2021
%p A047259 A047259:=n->(6*n-2-cos(2*n*Pi/3)-sqrt(3)*sin(2*n*Pi/3))/3: seq(A047259(n), n=1..100); # _Wesley Ivan Hurt_, Jun 11 2016
%t A047259 Select[Range[200], MemberQ[{1,4,5}, Mod[#,6]]&] (* or *) LinearRecurrence[ {1,0,1,-1}, {1,4,5,7}, 100] (* _Harvey P. Dale_, Feb 16 2015 *)
%t A047259 LinearRecurrence[{1, 0, 1, -1}, {1, 4, 5, 7}, 100] (* _Vincenzo Librandi_, Jun 14 2016 *)
%o A047259 (Magma) [n : n in [0..150] | n mod 6 in [1, 4, 5]]; // _Wesley Ivan Hurt_, Jun 11 2016
%Y A047259 Cf. A144430 (essentially the same), A010882 (first differences), A080341 (partial sums).
%K A047259 nonn,easy
%O A047259 1,2
%A A047259 _N. J. A. Sloane_