A077183 Smallest number k such that the reverse concatenation of natural numbers from k to 1 is divisible by prime(n), or 0 if no such number exists.
0, 2, 0, 2, 14, 15, 9, 5, 16, 4, 25, 21, 40, 67, 78, 66, 25, 111, 161, 49, 30, 15, 27, 20, 63, 98, 102, 3, 99, 92, 296, 71, 22, 367, 4, 48, 50, 91, 45, 241, 137, 258, 23, 28, 212, 40, 96, 408, 456, 110, 16, 731, 403, 667, 90, 130, 111, 458, 146, 18, 577, 276, 708
Offset: 1
Examples
a(4) = 2 as 21 is divisible by prime(4) = 7. The smallest reverse concatenation of natural numbers k..1 that is divisible by prime(5) = 11 is 1413121110987654321, so a(5) = k = 14.
Links
- Daniel Mondot, Table of n, a(n) for n = 1..1000
- Ralf Stephan, Factors and Primes in Two Smarandache Sequences, Smar. Notions 9 (1998), pp. 4-10.
Programs
-
Mathematica
Do[p = Prime[n]; k = 1; s = ToString[k]; While[Mod[ToExpression[s], p] > 0, k++; s = ToString[k] <> s]; Print[k], {n, 4, 50}] (* Ryan Propper, Jul 29 2005 *)
Extensions
Corrected and extended by Ralf Stephan, Mar 18 2003
Example clarified by Harvey P. Dale, Aug 22 2013
Comments