

A235164


Numbers whose digits, when the number is written in base n+1, are a permutation of 1...n, and such that for all k in {1,...,n} the first k digits (still in base n+1) form a number divisible by k.


1




OFFSET

1,2


COMMENTS

See sequence A163574 (which lists, for each n, the smallest term with n digits) for further discussion, in particular the proof that n must be odd, and that there is no further term with less than 13 digits. See sequence A235133 for the version where the terms (up to 9 digits) are written down in base 10.


LINKS

Table of n, a(n) for n=1..10.


EXAMPLE

The terms with 5 digits in base 6 are 2285 = 14325[6] and 7465 = 54321[6], since these numbers are divisible by 5, and 14[6] = 10, 143[6] = 63, 1432[6] = 380 are divisible by 2, 3 and 4, respectively, and the same is the case for 54[6] = 34, 543[6] = 207 and 5432[6] = 1244.


PROG

(PARI) for(n=1, 9, p=vector(n, i, (n+1)^(i1)); for(k=0, n!1, d=numtoperm(n, k); for(j=2, n, sum(i=1, j, d[i]*p[ji+1])%j &&next(2)); print1(d*vector(n, i, (n+1)^(ni))~", ")))
(Python)
def vgen(n, b):
....if n == 1:
........t = list(range(1, b))
........for i in range(1, b):
............u = list(t)
............u.remove(i)
............yield i, u
....else:
........for d, v in vgen(n1, b):
............for g in v:
................k = d*b+g
................if not k % n:
....................u = list(v)
....................u.remove(g)
....................yield k, u
A235164_list = [a for n in range(2, 15, 2) for a, b in vgen(n1, n)] # Chai Wah Wu, Jun 07 2015


CROSSREFS

Sequence in context: A080864 A260440 A039459 * A157500 A180574 A107580
Adjacent sequences: A235161 A235162 A235163 * A235165 A235166 A235167


KEYWORD

nonn,base,more


AUTHOR

M. F. Hasler, Jan 04 2014


EXTENSIONS

a(10) from Chai Wah Wu, Jun 07 2015


STATUS

approved



