OFFSET
1,2
COMMENTS
The centered square numbers are n^2 + (n+1)^2 while the centered pentagonal numbers are (5*r^2 + 5*r + 2)/2. A number has both properties iff 5*(2*r+1)^2 = (4*n+2)^2 + 1. We solve the equation 5*Y^2 - 1 = X^2 whose solutions in positive integers are given by A075796 and A007805 respectively. The r values are 0,8,..., i.e., A053606. The n values define A119032.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..399
Index entries for linear recurrences with constant coefficients, signature (323,-323,1).
FORMULA
G.f.: (z*(1-142*z+z^2))/((1-z)*(1-322*z+z^2)).
a(n+2) = 322*a(n+1)-a(n)-140 with a(1)=1 and a(2)=181.
a(n+1) = 161*a(n)-70+18*(80*a(n)^2-70*a(n)+15)^0.5.
a(n) = (14+(9-4*sqrt(5))^(2*n-1)+(9+4*sqrt(5))^(2*n-1))/32. - Gerry Martens, Jun 06 2015
MAPLE
a:= n-> (Matrix([181, 1, 1]). Matrix([[323, 1, 0], [ -323, 0, 1], [1, 0, 0]])^n)[1, 3]: seq(a(n), n=1..20); # Alois P. Heinz, Aug 14 2008
MATHEMATICA
LinearRecurrence[{323, -323, 1}, {1, 181, 58141}, 20] (* Harvey P. Dale, Nov 15 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Richard Choulet, Aug 30 2007, Sep 20 2007
EXTENSIONS
More terms from Alois P. Heinz, Aug 14 2008
STATUS
approved