OFFSET
1,1
COMMENTS
In addition to those divisible by 9, all numbers n divisible by 239, 271 or 803 have a(n)=0. - Robert Israel, Sep 04 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..2500
FORMULA
a(n) = n*A088395(n). - R. J. Mathar, Aug 06 2019
MAPLE
N:= 1000: # to get a(1)..a(N)
nextL:= proc(L)
local m, q, Lp;
for m from 1 do
if L[m] > 0 then
if m = LinearAlgebra:-Dimension(L) then return <5, 0$(m-1), 1>
else Lp:= L;
Lp[1]:= L[m]-1;
Lp[2..m]:= 0;
Lp[m+1]:= L[m+1]+1;
return Lp;
fi
fi
od;
end proc:
nogo:= proc(n) local m, a2, a5, S, S2, S3, i, j;
a2:= padic:-ordp(n, 2);
a5:= padic:-ordp(n, 5);
m:= numtheory:-order(10, n/(2^a2*5^a5))+max(a2, a5);
S:= {seq(10^i mod n, i=0..m-1)};
S2:= {seq(seq(S[i]+S[j] mod n, j=1..i), i=1..nops(S))};
S3:= {seq(seq(S[i]+ S2[j] mod n, j=1..nops(S2)), i=1..nops(S))};
evalb(S3 intersect map(t -> -t mod n, S3) = {});
end proc:
Agenda:= remove(t -> (t mod 9=0 or t mod 239=0 or t mod 271=0 or t mod 803=0, {$1..N}):
L:= <6>: x:= 6:
A:= Vector(N):
while Agenda <> {} and x < 10^20 do
x:= add(L[i]*10^(i-1), i=1..LinearAlgebra:-Dimension(L));
found, Agenda:= selectremove(t -> x mod t = 0, Agenda);
if found <> {} then
A[convert(found, list)]:= x;
fi;
L:= nextL(L);
od:
Agenda:= remove(nogo, Agenda);
if Agenda <> {} then printf("Values not found for %a\n", Agenda) fi;
convert(A, list); # Robert Israel, Sep 04 2019
MATHEMATICA
Array[If[AnyTrue[Mod[#, {9, 239, 271, 803}], # == 0 &], 0, Block[{k = 1}, While[Total@ IntegerDigits[k #] != 6, k++]; k #]] &, 59] (* Michael De Vlieger, Sep 04 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Apr 01 2002
EXTENSIONS
More terms from Ray Chandler, Jul 30 2003
STATUS
approved