OFFSET
2,1
COMMENTS
If k/d is a power of n, then k = d * n^z for some z >= 0 and, trivially, the base n expansions of k (with z trailing zeros) and d (with z leading zeros) have the same digits.
The sequence is well defined: for any n > 1, n^3 + 1 is divisible by n + 1, (n^3 + 1) / (n + 1) is not a power of n, and the base n expansions of n^3 + 1 and n + 1 have, up to order, the same digits.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 2..2501
FORMULA
a(n) <= n^3 + 1.
EXAMPLE
The first terms, alongside an appropriate divisor d, in bases 10 and n, are:
n a(n) d a(n) in base n d in base n
-- ---- --- -------------- -----------
2 9 3 1,0,0,1 1,1
3 28 4 1,0,0,1 1,1
4 18 6 1,0,2 1,2
5 16 8 3,1 1,3
6 40 10 1,0,4 1,4
7 36 12 5,1 1,5
8 42 21 5,2 2,5
9 64 16 7,1 1,7
10 105 15 1,0,5 1,5
11 45 15 4,1 1,4
12 154 22 1,0,10 1,10
13 105 21 8,1 1,8
14 130 65 9,4 4,9
15 168 56 11,3 3,11
16 260 20 1,0,4 1,4
PROG
(PARI) a(n) = {
for (k = 1, oo,
my (t = vecsort(select(sign, digits(k, n))));
fordiv (k, d,
if ((k/d) != n^valuation(k/d, n)
&& vecsort(select(sign, digits(d, n)))==t,
return (k); ); ); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 09 2025
STATUS
approved
