login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114795 {concatenation n, n-1, n-2, ...3,2,1} mod n. 4
0, 1, 0, 1, 1, 3, 3, 1, 0, 1, 6, 9, 2, 1, 6, 1, 4, 9, 0, 1, 12, 17, 4, 9, 21, 21, 0, 13, 11, 21, 20, 17, 6, 29, 1, 9, 8, 25, 36, 1, 0, 33, 41, 17, 36, 23, 26, 33, 34, 21, 30, 41, 38, 27, 6, 1, 36, 39, 7, 21, 31, 59, 54, 49, 21, 39, 57, 45, 60, 41, 31, 9, 37, 41, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(n) = A000422(n) mod n. - Michel Marcus, Jan 10 2017
EXAMPLE
a(7) = 7654321 mod 7 = 3.
MATHEMATICA
f[n_] := Mod[FromDigits@ Flatten@ IntegerDigits@ Reverse@ Range@ n,
n]; Array[f, 75] (* or *)
f[n_] := Fold[Mod[#1*10^Floor[1 + Log10@#2] + #2, n] &, 0,
Reverse@Range@n]; Array[f, 75] (* Robert G. Wilson v, Jan 10 2017 *)
PROG
(Python)
def A114795(n):
s=""
for i in range(n, 0, -1):
s+=str(i)
return int(s)%n # Indranil Ghosh, Jan 10 2017
CROSSREFS
Cf. A000422.
Sequence in context: A281066 A343875 A343874 * A245669 A211648 A261634
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 19 2005
EXTENSIONS
More terms from Ryan Murphy (murphy(AT)minegoboom.com) and Evonne Haines (avissean(AT)adelphia.net), Jan 21 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)