OFFSET
1,6
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..20008
FORMULA
a(n) = A138793(n) (mod n).
EXAMPLE
a(13) = 31211101987654321 (mod 13) = 5.
MATHEMATICA
f[n_] := Mod[ FromDigits@ Fold[ Join[ Reverse@ IntegerDigits@#2, #1] &, {}, Range@ n], n]; Array[f, 80]
PROG
(Python)
def A281066(n):
s=""
for i in range(n, 0, -1):
s+=str(i)[::-1]
return int(s)%n # Indranil Ghosh, Jan 28 2017
(PARI) a(n) = my(s = ""); forstep (k=n, 1, -1, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); eval(s) % n; \\ Michel Marcus, Jan 28 2017
CROSSREFS
KEYWORD
AUTHOR
Robert G. Wilson v, Jan 14 2017
STATUS
approved