OFFSET
1,1
COMMENTS
Also, numbers k such that k^2 + 1 == 0 (mod 25).
Numbers of the form 25*k+7 or 25*k+18. Numbers b such that 25 is a base-b Euler pseudoprime. - Karsten Meyer, Jan 05 2011
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) = 2*a(n-1)-a(n-2)-3, if n is even, and a(n) = 2*a(n-1)-a(n-2)+3, if n is odd, with a(1)=7, a(2)=18.
From R. J. Mathar, Feb 19 2009: (Start)
a(n) = a(n-1)+a(n-2)-a(n-3).
a(n) = 25*n/2-25/4-3*(-1)^n/4.
G.f.: x*(7+11*x+7*x^2)/((1+x)*(1-x)^2). (End)
E.g.f.: 7 + ((50*x - 25)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 08 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(11*Pi/50)*Pi/25. - Amiram Eldar, Feb 26 2023
MATHEMATICA
fQ[n_] := Mod[n^2 + 1, 25] == 0; Select[ Range@ 670, fQ]
Flatten[#+{7, 18}&/@(25*Range[0, 30])] (* Harvey P. Dale, Jan 24 2013 *)
Select[Range[1, 700], MemberQ[{7, 18}, Mod[#, 25]]&] (* Vincenzo Librandi, Apr 08 2013 *)
PROG
(Magma) [n: n in [1..700] | n mod 25 in [7, 18]]; // Vincenzo Librandi, Apr 08 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 11 2009
STATUS
approved