login
A341409
a(n) = (Sum_{k=1..3} k^n) mod n.
5
0, 0, 0, 2, 1, 2, 6, 2, 0, 4, 6, 2, 6, 0, 6, 2, 6, 2, 6, 18, 15, 14, 6, 2, 1, 14, 0, 14, 6, 14, 6, 2, 3, 14, 31, 2, 6, 14, 36, 18, 6, 38, 6, 10, 36, 14, 6, 2, 13, 24, 36, 46, 6, 2, 1, 42, 36, 14, 6, 38, 6, 14, 36, 2, 16, 2, 6, 30, 36, 14, 6, 2, 6, 14, 51, 22, 17, 14, 6, 18, 0, 14, 6, 38, 21
OFFSET
1,4
LINKS
FORMULA
a(n) = A001550(n) mod n.
a(A056645(n)) = 0.
MAPLE
a:= n-> add(i&^n, i=1..3) mod n:
seq(a(n), n=1..100); # Alois P. Heinz, Feb 11 2021
MATHEMATICA
a[n_] := Mod[Sum[k^n, {k, 1, 3}], n]; Array[a, 100] (* Amiram Eldar, Feb 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, 3, k^n)%n;
CROSSREFS
(Sum_{k=1..m} k^n) mod n: A096196 (m=2), this sequence (m=3), A341410 (m=4), A341411 (m=5), A341412 (m=6), A341413 (m=7).
Sequence in context: A265894 A133644 A265870 * A284466 A258615 A152431
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Feb 11 2021
STATUS
approved