|
|
A365104
|
|
Number of distinct quintic residues x^5 (mod 5^n), x=0..5^n-1.
|
|
5
|
|
|
1, 5, 5, 21, 101, 501, 2505, 12505, 62521, 312601, 1563001, 7815005, 39075005, 195375021, 976875101, 4884375501, 24421877505, 122109387505, 610546937521, 3052734687601, 15263673438001, 76318367190005, 381591835950005, 1907959179750021, 9539795898750101, 47698979493750501, 238494897468752505, 1192474487343762505, 5962372436718812521, 29811862183594062601
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
It appears that for a prime p>2 the number of distinct residues x^p (mod p^n) is a(n) = (p-1)*p^(n-2) + a(n-p), with a(n<1)=1, a(1)=p.
|
|
LINKS
|
|
|
FORMULA
|
For n >= 6, a(n) = 4*5^(n-2) + a(n-5) = 5*a(n-1) + a(n-5) - 5*a(n-6). O.g.f: (-5*x^5 - 4*x^4 - 4*x^3 - 20*x^2 + 1)/(5*x^6 - x^5 - 5*x + 1). - Max Alekseyev, Feb 19 2024
|
|
MATHEMATICA
|
a[n_]:=CountDistinct[Table[PowerMod[x-1, 5, 5^(n-1)], {x, 1, 5^(n-1)}]]; Array[a, 13]
|
|
PROG
|
(Python)
def A365104(n): return len({pow(x, 5, 5**n) for x in range(5**n)}) # Chai Wah Wu, Sep 17 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|