login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158803 Numbers k such that k^2 == 2 (mod 41). 6
17, 24, 58, 65, 99, 106, 140, 147, 181, 188, 222, 229, 263, 270, 304, 311, 345, 352, 386, 393, 427, 434, 468, 475, 509, 516, 550, 557, 591, 598, 632, 639, 673, 680, 714, 721, 755, 762, 796, 803, 837, 844, 878, 885, 919, 926, 960, 967, 1001, 1008, 1042, 1049 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,1,-1).

FORMULA

a(n) = a(n-1) + a(n-2) - a(n-3).

a(n) = (1/4)*(41 + 27*(-1)^(n-1) + 82*(n-1)).

First differences: a(2n) - a(2n-1) = 7, a(2n+1) - a(2n) = 34.

G.f.: x*(17 + 7*x + 17*x^2)/((1+x)*(x-1)^2). - R. J. Mathar, Apr 04 2009

MATHEMATICA

LinearRecurrence[{1, 1, -1}, {17, 24, 58}, 60] (* Vincenzo Librandi, Mar 02 2012

PROG

(MAGMA) I:=[17, 24, 58]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Mar 02 2012

(PARI) for(n=1, 40, print1((1/4)*(41+27*(-1)^(n-1)+82*(n-1))", ")); \\ Vincenzo Librandi, Mar 02 2012

CROSSREFS

Sequence in context: A070687 A205697 A231963 * A340050 A051780 A124971

Adjacent sequences:  A158800 A158801 A158802 * A158804 A158805 A158806

KEYWORD

nonn,easy

AUTHOR

Vincenzo Librandi, Mar 27 2009

EXTENSIONS

Comments translated to formulas by R. J. Mathar, Apr 04 2009

STATUS

approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 26 09:29 EDT 2021. Contains 346294 sequences. (Running on oeis4.)