login
A341410
a(n) = (Sum_{k=1..4} k^n) mod n.
5
0, 0, 1, 2, 0, 0, 3, 2, 1, 0, 10, 6, 10, 2, 10, 2, 10, 12, 10, 14, 16, 8, 10, 18, 0, 4, 1, 18, 10, 0, 10, 2, 1, 30, 5, 30, 10, 30, 22, 34, 10, 18, 10, 2, 10, 30, 10, 18, 31, 0, 49, 42, 10, 30, 35, 2, 43, 30, 10, 54, 10, 30, 37, 2, 0, 6, 10, 14, 31, 60, 10, 66, 10, 30
OFFSET
1,4
LINKS
FORMULA
a(n) = A001551(n) mod n.
a(A056643(n)) = 0.
MAPLE
a:= n-> add(i&^n, i=1..4) mod n:
seq(a(n), n=1..100); # Alois P. Heinz, Feb 11 2021
MATHEMATICA
a[n_] := Mod[Sum[k^n, {k, 1, 4}], n]; Array[a, 100] (* Amiram Eldar, Feb 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, 4, k^n)%n;
CROSSREFS
(Sum_{k=1..m} k^n) mod n: A096196 (m=2), A341409 (m=3), this sequence (m=4), A341411 (m=5), A341412 (m=6), A341413 (m=7).
Sequence in context: A142886 A374019 A099026 * A205341 A195664 A053202
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Feb 11 2021
STATUS
approved