login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047391 Numbers that are congruent to {1, 3, 5} mod 7. 3

%I #20 Sep 08 2022 08:44:57

%S 1,3,5,8,10,12,15,17,19,22,24,26,29,31,33,36,38,40,43,45,47,50,52,54,

%T 57,59,61,64,66,68,71,73,75,78,80,82,85,87,89,92,94,96,99,101,103,106,

%U 108,110,113,115,117,120,122,124,127,129,131,134,136,138,141

%N Numbers that are congruent to {1, 3, 5} mod 7.

%H Vincenzo Librandi, <a href="/A047391/b047391.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F From _Bruno Berselli_, Mar 25 2011: (Start)

%F G.f.: x*(1+2*x+2*x^2+2*x^3)/((1-x)^2*(1+x+x^2)).

%F a(n) = 7*floor((n-1)/3)+2*(n-1 mod 3)+1.

%F a(n) = (1/3)*(7*n-5-A049347(n)). (End)

%F From _Wesley Ivan Hurt_, Jun 13 2016: (Start)

%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.

%F a(n) = (21*n-15-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*Pi*n/3))/9.

%F a(3k) = 7k-2, a(3k-1) = 7k-4, a(3k-2) = 7k-6. (End)

%F a(n) = n - 1 + floor((4n-1)/3). - _Wesley Ivan Hurt_, Dec 27 2016

%p A047391:=n->(21*n-15-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*Pi*n/3))/9: seq(A047391(n), n=1..100); # _Wesley Ivan Hurt_, Jun 13 2016

%t Select[Range[0, 150], MemberQ[{1, 3, 5}, Mod[#, 7]] &] (* _Wesley Ivan Hurt_, Jun 13 2016 *)

%t LinearRecurrence[{1, 0, 1, -1}, {1, 3, 5, 8}, 100] (* _Vincenzo Librandi_, Jun 14 2016 *)

%o (Magma) [n: n in [1..122] | n mod 7 in [1, 3, 5]]; // _Bruno Berselli_, Mar 25 2011

%Y Cf. A049347.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 06:29 EDT 2024. Contains 370953 sequences. (Running on oeis4.)