OFFSET
0,2
LINKS
S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n (arXiv:math.NT/0604465).
Index entries for linear recurrences with constant coefficients, signature (7,0,1,-7).
FORMULA
a(n) = A046530(7^n).
a(n)= +7*a(n-1) +a(n-3) -7*a(n-4) with g.f. ( 1-4*x-6*x^2-7*x^3 ) / ( (x-1)*(7*x-1)*(1+x+x^2) ). - R. J. Mathar, Feb 27 2011
MAPLE
A046635 := proc(n)
7^(n+2)+2*op(1+modp(n, 3), [61, 85, 82]) ;
%/171 ;
end proc:
seq(A046635(n), n=0..20) ; # R. J. Mathar, Oct 08 2017
MATHEMATICA
LinearRecurrence[{7, 0, 1, -7}, {1, 3, 15, 99}, 21] (* Jean-François Alcover, Nov 24 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved