This site is supported by donations to The OEIS Foundation.

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

%I

%S 3,5,10,12,17,19,24,26,31,33,38,40,45,47,52,54,59,61,66,68,73,75,80,

%T 82,87,89,94,96,101,103,108,110,115,117,122,124,129,131,136,138,143,

%U 145,150,152,157,159,164,166,171

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

%C Primitive roots of 7. The first differences are periodic: 2,5,2,5,2,5,.... - _Paolo P. Lava_, Feb 29 2008

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

%F a(n) = -4 + (1/2)*Sum_{k=0..n} (7 - 3*(-1)^n), with n >= 1. - _Paolo P. Lava_, Feb 29 2008

%F a(n) = 7*n - a(n-1) - 6, n > 1. - _Vincenzo Librandi_, Aug 05 2010

%F From _Bruno Berselli_, Sep 08 2010: (Start)

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

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

%F a(n) = (14*n - 5 - 3*(-1)^n)/4. (End)

%p P:=proc(n,m) local a,i,ok; for i from 1 by 1 to n do if (i^(m-1) mod m)=1 then a:=1; ok:=1; while a<m-1 do if (i^a mod m)=1 then ok:=0; fi; a:=a+1; od; if ok=1 then print(i); fi; fi; od; end: P(100,7); # _Paolo P. Lava_, Feb 29 2008

%K nonn

%O 1,1

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 22 01:04 EST 2019. Contains 320381 sequences. (Running on oeis4.)