OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: 4*x*(1 + 15*x + 18*x^2 + 15*x^3 + x^4) /((1+x)^2*(1-x)^3).
a(n) = 4*A047209(n)^2 = (10*n + (-1)^n - 5)^2/4.
Sum_{n>=1} 1/a(n) = 2*Pi^2/(25*(5-sqrt(5))). - Amiram Eldar, Feb 16 2023
MATHEMATICA
Table[(10 n + (-1)^n - 5)^2/4, {n, 1, 50}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {4, 64, 144, 324, 484}, 50]
Select[Range[200]^2, Mod[#, 10]==4&] (* or *) LinearRecurrence[{1, 1, -1}, {2, 8, 12}, 40]^2(* Harvey P. Dale, Aug 06 2017 *)
PROG
(Magma) /* By definition: */ [n^2: n in [0..200] | Modexp(n, 2, 10) eq 4];
(Magma) [(10*n+(-1)^n-5)^2/4: n in [1..50]];
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, May 24 2016
EXTENSIONS
Edited by Bruno Berselli, May 24 2016
STATUS
approved