cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A281190 Concatenation of the reversed digits of numbers from 1 to n, mod n.

This page as a plain text file.
%I A281190 #26 Feb 12 2025 20:00:34
%S A281190 0,0,0,2,0,0,5,6,0,1,6,9,3,1,6,9,5,9,1,2,18,6,12,18,2,6,18,26,7,3,20,
%T A281190 27,6,3,28,27,7,19,12,24,4,24,12,28,9,8,42,12,22,5,3,45,41,45,50,45,
%U A281190 45,23,16,6,6,54,27,30,61,6,37,30,21,67,47,63,52,67,57,19,28,15,58,28,72,22,56,24,83,34,3,72,72,9,85,69,57
%N A281190 Concatenation of the reversed digits of numbers from 1 to n, mod n.
%C A281190 Note that leading zeros are not omitted when numbers are reversed. - _N. J. A. Sloane_, Jan 23 2017
%H A281190 Indranil Ghosh, <a href="/A281190/b281190.txt">Table of n, a(n) for n = 1..20008</a>
%F A281190 a(n) = A138957(n) mod n.
%e A281190 a(13) = A138957(13) mod 13 == 12345678901112131 mod 13 == 3.
%t A281190 f[n_] := Mod[ Fold[#1*10^IntegerLength@#2 + FromDigits@ Reverse@ IntegerDigits@#2 &, 0, Range@ n], n]; Array[f, 105]
%o A281190 (Python)
%o A281190 def A281190(n):
%o A281190     s=""
%o A281190     for i in range(1,n+1):
%o A281190         s+=str(i)[::-1]
%o A281190     return int(s)%n # _Indranil Ghosh_, Jan 28 2017
%o A281190 (PARI) a(n) = my(s = ""); for (k=1, n, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); eval(s) % n; \\ _Michel Marcus_, Jan 28 2017
%Y A281190 Cf. A029503, A095221, A114795, A138957, A281066.
%K A281190 nonn,look,base,easy
%O A281190 1,4
%A A281190 _Robert G. Wilson v_, Jan 16 2017