login
A039303
Number of distinct quadratic residues mod 6^n.
2
1, 4, 8, 33, 124, 644, 3288, 18883, 108284, 642234, 3808768, 22785833, 136315044, 817291024, 4900153448, 29395534383, 176340899404, 1057996947014, 6347691029328, 38085710240533, 228511646005364, 1371065953050204
OFFSET
0,2
COMMENTS
Number of distinct n-digit suffixes of base-6 squares.
LINKS
FORMULA
a(n+8) = 50 a(n+6) - 553 a(n+4) + 1800 a(n+2) - 1296 a(n) for n >= 1.
G.f.: (1 - 2*x - 30*x^2 + 13*x^3 + 199*x^4 + 12*x^5 - 360*x^6 - 108*x^7)/((1-x)*(1+x)*(1-2*x)*(1+2*x)*(1-3*x)*(1+3*x)*(1-6*x)). - Colin Barker, Mar 14 2012
MATHEMATICA
CoefficientList[Series[(1-2*x-30*x^2+13*x^3+199*x^4+ 12*x^5-360*x^6-108*x^7)/((1-x)*(1+x)*(1-2*x)*(1+2*x)*(1-3*x)*(1+3*x)*(1-6*x)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 21 2012 *)
PROG
(Magma) I:=[1, 4, 8, 33, 124, 644, 3288, 18883, 108284]; [n le 9 select I[n] else 50*Self(n-2)-553*Self(n-4)+1800*Self(n-6)-1296*Self(n-8): n in [1..30]]; // Vincenzo Librandi, Apr 21 2012
CROSSREFS
Sequence in context: A149101 A149102 A149103 * A200159 A149104 A149105
KEYWORD
nonn,easy
STATUS
approved