login
A075397
Number of multiples of n with no zero digit with sum of digits = n.
2
1, 1, 4, 2, 1, 11, 9, 15, 256, 0, 0, 408, 307, 387, 511, 1608, 3821, 43207, 13651, 0, 147897, 115063, 179695, 938500, 133868, 844163, 21955502, 3756136, 9067127, 0, 33861703, 46269686, 177316890, 163959413, 75053719, 6678119984, 1776064204
OFFSET
1,3
EXAMPLE
a(3) = 4, the multiples being 3, 12, 21, 111. a(4) = 2 the partition of 4 are (4), (3, 1), (2, 2), (2, 1, 1), (1, 1, 1, 1).and the two multiples of 4 obtained by rearranging the digits are 4 and 112.
a(6) = 11: 6*1=6,6*4=24,6*7=42,6*19=114,6*22=132,6*37=222,6*52=312,6*187=1122,6*202=1212,6*352=2112,6*1852=11112
a(7) = 9: 7*1=7,7*19=133,7*46=322,7*73=511,7*163=1141,7*316=2212,7*1603=11221,7*1873=13111,7*3016=21112
a(8) = 15: 8*1=8,8*19=152,8*28=224,8*64=512,8*154=1232,8*289=2312,8*514=4112,8*1414=11312,8*1639=13112,8*2764=22112,8*3889=31112,8*14014=112112,8*15139=121112,8*26389=211112,8*138889=1111112
PROG
(PARI) a(n) = local (pv, c, T, newT, x); pv = 1; c = 0; T = matrix(n, n); for (i = 1, min(n, 9), T[1 + n - i, 1 + i%n] = 1); for (k = 1, n - 1, pv = pv*10%n; newT = matrix(n - k, n); for (j = 1, n, newT[1, j] = T[1, j]); for (i = 2, n - k + 1, for (j = 1, n, x = T[i, j]; if (x, for (d = 1, min (i - 1, 9), newT[i - d, (j - 1 + d*pv)%n + 1] += x)))); T = newT); T[1, 1]; \\ David Wasserman, Jan 18 2005
CROSSREFS
Number of terms in the n-th row of A077755.
Sequence in context: A342088 A193607 A358735 * A049429 A328647 A183158
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 23 2002
EXTENSIONS
a(6)-a(10) from Deepan Majmudar (deepan.majmudar(AT)hp.com), Dec 03 2004
More terms from David Wasserman, Jan 18 2005
STATUS
approved