login
A046633
Number of cubic residues mod 5^n.
3
1, 5, 21, 101, 505, 2521, 12601, 63005, 315021, 1575101, 7875505, 39377521, 196887601, 984438005, 4922190021, 24610950101, 123054750505, 615273752521, 3076368762601, 15381843813005, 76909219065021, 384546095325101
OFFSET
0,2
LINKS
S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n, arXiv:math/0604465 [math.NT], 2006-2016.
FORMULA
a(n) = A046530(5^n). Conjecture: a(n)= +5*a(n-1) +a(n-3) -5*a(n-4) with g.f. ( 1-4*x^2-5*x^3 ) / ( (x-1)*(5*x-1)*(1+x+x^2) ). - R. J. Mathar, Feb 27 2011
The conjecture is correct. - Charles R Greathouse IV, Jan 03 2013
31*a(n) = 5^(n+2)+2*b(n), where b(n)=3 if n==0 (mod 3), b(n)=15 if n==1 (mod 3) and b(n)=13 if b(n)==2 (mod 3). - R. J. Mathar, Oct 08 2017
MAPLE
A046633 := proc(n)
5^(n+2)+2*op(1+modp(n, 3), [3, 15, 13]) ;
%/31 ;
end proc:
seq(A046633(n), n=0..20) ; # R. J. Mathar, Oct 08 2017
MATHEMATICA
a[n_] := a[n] = Table[PowerMod[k, 3, 5^n], {k, 1, 5^n}] // Union // Length;
Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 10}]
(* or: *)
LinearRecurrence[{5, 0, 1, -5}, {1, 5, 21, 101}, 22] (* Jean-François Alcover, Nov 23 2017 *)
PROG
(PARI) a(n)=(5^(n+2)+30)\31 \\ Charles R Greathouse IV, Jan 03 2013
CROSSREFS
Sequence in context: A199215 A204061 A362556 * A280623 A203154 A097175
KEYWORD
nonn,easy
STATUS
approved