OFFSET
0,2
COMMENTS
A number with decimal digit sequence {q_1, ..., q_k} is polydivisible if Sum_{i = 1...m} 10^(m - i) * q_i is a multiple of m for all 1 <= m <= k.
REFERENCES
Matt Parker, Things to make and do in the fourth dimension, 2015, pages 7-9.
LINKS
MATHEMATICA
polyQ[q_]:=And@@Table[Divisible[FromDigits[Take[q, k]], k], {k, Length[q]}];
normseqs[n_]:=Join@@Permutations/@Function[s, Array[Count[s, y_/; y<=#]+1&, n]]/@Subsets[Range[n-1]+1];
Sort[FromDigits/@Join@@Table[Select[normseqs[n]-1, First[#]>0&&polyQ[#]&], {n, 8}]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, Jun 08 2018
STATUS
approved