# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a281066 Showing 1-1 of 1 %I A281066 #37 Sep 21 2024 20:27:18 %S A281066 0,1,0,1,1,3,3,1,0,1,4,9,5,7,6,1,6,9,17,1,15,15,19,9,21,1,18,13,28,21, %T A281066 26,17,15,3,16,9,30,3,15,1,1,33,10,37,36,43,22,33,19,21,48,45,2,45,26, %U A281066 49,27,33,33,21,48,25,36,49,36,15,22,5,27,11,42,9,2,73,21,17,59,57,5,1 %N A281066 Concatenation R(n)R(n-1)R(n-2)...R(2)R(1) read mod n, where R(x) is the digit-reversal of x (with leading zeros not omitted). %H A281066 Indranil Ghosh, Table of n, a(n) for n = 1..20008 %F A281066 a(n) = A138793(n) (mod n). %e A281066 a(13) = 31211101987654321 (mod 13) = 5. %t A281066 f[n_] := Mod[ FromDigits@ Fold[ Join[ Reverse@ IntegerDigits@#2, #1] &, {}, Range@ n], n]; Array[f, 80] %o A281066 (Python) %o A281066 def A281066(n): %o A281066 s="" %o A281066 for i in range(n, 0, -1): %o A281066 s+=str(i)[::-1] %o A281066 return int(s)%n # _Indranil Ghosh_, Jan 28 2017 %o A281066 (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 %Y A281066 Cf. A004086, A061963, A095221, A114795, A138793. %K A281066 nonn,easy,look,base %O A281066 1,6 %A A281066 _Robert G. Wilson v_, Jan 14 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE