OFFSET
1,3
COMMENTS
This sequence is such that 7*a(n)*(a(n) + 1) + 1 = j^2 = a square integer positive root of a(n)^2 + a(n) - (j^2-1)/7 = 0 is such that 2*a(n) + 1 = sqrt((4*j^2+3)/7), ((4*j^2+3)/7) need to be a square so j^2 = (7*k^2-3)/4, put k=2*a(n)+1 you found that (7*k^2-3)/4 = 7*a(n)^2 + 7*a(n) + 1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..825
Index entries for linear recurrences with constant coefficients, signature (1,254,-254,-1,1).
FORMULA
From R. J. Mathar, Aug 28 2008: (Start)
a(n) = A105040(n-2).
G.f.: 3*x^2*(5+32*x+5*x^2)/((1-x)*(1+16*x+x^2)*(1-16*x+x^2)). (End)
MATHEMATICA
LinearRecurrence[{1, 254, -254, -1, 1}, {0, 0, 15, 111, 3936}, 30] (* G. C. Greubel, Mar 13 2023 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); [0, 0] cat Coefficients(R!( 3*x^2*(5+32*x+5*x^2)/((1-x)*(1-254*x^2+x^4)) )); // G. C. Greubel, Mar 13 2023
(SageMath)
@CachedFunction
def a(n): # a = A105051
if (n<6): return (0, 0, 0, 15, 111, 3936)[n]
else: return a(n-1) +254*a(n-2) -254*a(n-3) -a(n-4) +a(n-5)
[a(n) for n in range(41)] # G. C. Greubel, Mar 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 04 2005
EXTENSIONS
Extended by R. J. Mathar, Aug 28 2008
STATUS
approved