[seqfan] Re: Add "touching" digits of "n"

M. F. Hasler oeis at hasler.fr
Thu Jan 30 16:12:27 CET 2014


On Thu, Jan 30, 2014 at 10:12 AM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
>> When you add two "touching" digits of "n", the result is visible in "n".
> ... Is 9106453728 the smallest such pandigital?

No, 1263907548 is smaller.

M.

is(x)={S=Set(d=digits(x));!for(i=2,#d,setsearch(S,(d[i-1]+d[i])%10)||return;
d[i-1]+d[i]<10 || for(j=2,#d,d[j-1]==1 && d[j]+10==d[i-1]+d[i] &&
next(2)) || return)}

u=vector(10,i,10^(10-i))~;for(n=0,10!-1,is(numtoperm(10,n)%10*u)&print1(numtoperm(10,n)%10*u","))



More information about the SeqFan mailing list