cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382945 a(n) is the least positive integer k having a divisor d such that k/d is not a power of n and the base n expansions of k and d, possibly with leading zeros, have, up to order, the same digits.

Original entry on oeis.org

9, 28, 18, 16, 40, 36, 42, 64, 105, 45, 154, 105, 130, 168, 260, 120, 340, 96, 266, 275, 495, 231, 460, 351, 450, 273, 792, 175, 928, 280, 682, 1024, 308, 459, 1302, 741, 962, 665, 1612, 288, 1804, 560, 1290, 1265, 2139, 1035, 1974, 540, 952, 715, 2720, 585
Offset: 2

Views

Author

Rémy Sigrist, Apr 09 2025

Keywords

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.

Examples

			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
		

Crossrefs

Programs

  • 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);););); }

Formula

a(n) <= n^3 + 1.