login
Smallest multiple of n which is a reverse concatenation of n nonnegative consecutive numbers, or 0 if no such multiple exists.
1

%I #5 Dec 05 2013 19:55:47

%S 1,10,210,5432,43210,543210,2111019876,98765432,876543210,9876543210,

%T 918171615141312111019,3121110198765432,716151413121110198765,

%U 7161514131211101987654,41312111019876543210

%N Smallest multiple of n which is a reverse concatenation of n nonnegative consecutive numbers, or 0 if no such multiple exists.

%C a(20k)=a(50k)=0 for any k. On the other hand, a(n) is nonzero if n is not multiple of 10. - _Max Alekseyev_, Feb 15 2005

%o (PARI) {len10(m) = ceil(log(m+1)/log(10))} {reverse(n) = m=0;while(n,m=m*10+(n%10);n\=10);return(m)} {a(n) = local(m); for(s=0,10^6,m=0;for(i=0,n-1,m=m*10^len10(s+i)+s+i);m=reverse(m);if(s==0,m*=10);if(m%n==0,return(m));if(n%10==0,return(0)))} (Alekseyev)

%Y Cf. A077691.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Nov 16 2002

%E More terms from _Max Alekseyev_, Feb 15 2005