A117719 a(2n) = A001653(n) (Numbers n such that 2*n^2 - 1 is a square), a(2n+1) = A038725(n+1).
1, 2, 5, 11, 29, 64, 169, 373, 985, 2174, 5741, 12671, 33461, 73852, 195025, 430441, 1136689, 2508794, 6625109, 14622323, 38613965, 85225144, 225058681, 496728541, 1311738121, 2895146102, 7645370045, 16874148071, 44560482149
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
Programs
-
Magma
I:= [1,2,5,11]; [n le 4 select I[n] else 6*Self(n-2) -Self(n-4): n in [1..40]]; // G. C. Greubel, Jul 23 2023
-
Mathematica
LinearRecurrence[{0,6,0,-1}, {1,2,5,11}, 40] (* G. C. Greubel, Jul 23 2023 *)
-
SageMath
A000129=BinaryRecurrenceSequence(2,1,0,1) def A117719(n): return (3*A000129(n+1) +2*A000129(n) +(-1)^n*A000129(n-1))/4 [A117719(n) for n in range(41)] # G. C. Greubel, Jul 23 2023
Formula
G.f.: (1+2*x-x^2-x^3)/((1-2*x-x^2)*(1+2*x-x^2)).
a(n) = (1/4)*( 3*P(n+1) + 2*P(n) + (-1)^n*P(n-1) ), where P(n) = A000129(n). - G. C. Greubel, Jul 23 2023
Comments