A229136 Number of solutions to Sum_{i=1..n} x_i^2 == 1 (mod 4) with x_i in 0..3.
2, 8, 24, 64, 192, 768, 3584, 16384, 69632, 278528, 1081344, 4194304, 16515072, 66060288, 266338304, 1073741824, 4311744512, 17246978048, 68853694464, 274877906944, 1098437885952, 4393751543808, 17583596109824, 70368744177664, 281543696187392, 1126174784749568
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (8,-24,32).
Crossrefs
Programs
-
Mathematica
a[1] = 2; a[2] = 8; a[3] = 24; a[n_] := a[n-1]*8 + a[n-2]*(-24) + 32*a[n - 3]; Table[a[n], {n, 15}]
-
PARI
Vec(-2*x*(2*x-1)^2/((4*x-1)*(8*x^2-4*x+1)) + O(x^100)) \\ Colin Barker, Nov 10 2014
Formula
G.f.: 1/(1 - 4*x) + Q(0)/(2 - 4*x), where Q(k) = 1 + 1/(1 - 2*x*(k+1)/(2*x*(k+2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 27 2013
G.f.: -2*x*(2*x - 1)^2 / ((4*x - 1)*(8*x^2 - 4*x + 1)). - Colin Barker, Nov 10 2014
a(n) = 4*a(n-1) - 8*a(n-2) + 2^(2*n-3) for n >= 3. - Petros Hadjicostas, Dec 20 2019
Comments