login
A095249
Reverse concatenation of first n positive integers modulo forward concatenation of first n positive integers.
1
0, 9, 75, 619, 4941, 37041, 246919, 1234575, 9, 10987654321, 1110987654321, 121110987654321, 775432077543108, 178553219976533007, 27956332009875522906, 3805734210999774512805, 481583522109989673502704, 58259362312008979572492603, 6836037241301907969471482502
OFFSET
1,2
LINKS
FORMULA
a(n) = A000422(n) mod A007908(n). - Michel Marcus, Nov 19 2018
EXAMPLE
a(4) = 619 = 4321 mod 1234.
MAPLE
a:= n-> irem(parse(cat(n-i$i=0..n-1)), parse(cat(i$i=1..n))):
seq(a(n), n=1..20); # Alois P. Heinz, Nov 19 2018
MATHEMATICA
r = f = ""; Do[r = ToString[n] <> r; f = f <> ToString[n]; Print[Mod[ToExpression[r], ToExpression[f]]], {n, 1, 30}] (* Ryan Propper, Aug 26 2005 *)
nn=30; Module[{r, f}, Table[f=Flatten[IntegerDigits/@Range[n]]; r=Flatten[ IntegerDigits/@Range[n, 1, -1]]; Mod[FromDigits[r], FromDigits[f]], {n, nn}]] (* Harvey P. Dale, Mar 04 2013 *)
CROSSREFS
Sequence in context: A281804 A210045 A125397 * A190983 A254664 A223204
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jun 17 2004
EXTENSIONS
Corrected and extended by Ryan Propper, Aug 26 2005
STATUS
approved