|
|
A076803
|
|
Smallest multiple of n which is a reverse concatenation of n nonnegative consecutive numbers, or 0 if no such multiple exists.
|
|
1
|
|
|
1, 10, 210, 5432, 43210, 543210, 2111019876, 98765432, 876543210, 9876543210, 918171615141312111019, 3121110198765432, 716151413121110198765, 7161514131211101987654, 41312111019876543210
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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
|
|
LINKS
|
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|