OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..100
EXAMPLE
For x = 11 -> T(x) = 22 and 22 / 11 = 2.
For x = 19 -> T(x) = 0 and 0 /19 = 0.
For x = 157157 -> T(x) = 628628 and 628628 / 157157 = 4.
MAPLE
P:=proc(q) local a, b, c, j, n; for n from 10 to q do a:=[]; b:=n;
while b>0 do a:=[b mod 10, op(a)]; b:=trunc(b/10); od; b:=(a[nops(a)]+a[1]) mod 10;
c:=0; for j from 1 to nops(a)-1 do c:=c*10+((a[j]+a[j+1]) mod 10); od; c:=c*10+b;
if type(c/n, integer) then print(n); fi; od; end: P(10^9);
PROG
(PARI) plt(n) = {d = digits(n); nd = vector(#d, i, if (i<#d, d[i] + d[i+1], d[#d] + d[1])) % 10; subst(Pol(nd), x, 10); }
isok(n) = ((plt(n) % n ) == 0); \\ Michel Marcus, Jul 03 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jun 25 2014
STATUS
approved