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.

A382946 a(n) is the least positive integer k having a proper divisor d such that the base n expansions of k and d, without leading zeros, have, up to order, the same digits, or a(n) = -1 if no such k exists.

This page as a plain text file.
%I A382946 #11 Apr 14 2025 09:07:47
%S A382946 -1,64,36,16,700,36,42,64,3105,45,594,105,130,168,945,120,1666,96,266,
%T A382946 275,2457,231,460,351,450,273,7938,175,7714,280,682,1024,308,459,7525,
%U A382946 741,962,665,27300,288,17097,560,1290,1265,18540,1035,1974,540,952,715
%N A382946 a(n) is the least positive integer k having a proper divisor d such that the base n expansions of k and d, without leading zeros, have, up to order, the same digits, or a(n) = -1 if no such k exists.
%C A382946 Conjecture: a(n) > 0 for any n > 2.
%H A382946 Rémy Sigrist, <a href="/A382946/b382946.txt">Table of n, a(n) for n = 2..1000</a>
%e A382946 The first terms, alongside an appropriate divisor d, in bases 10 and n, are:
%e A382946   n   a(n)  d     n in base n  d in base n
%e A382946   --  ----  ----  -----------  -----------
%e A382946    2    -1  N/A   N/A          N/A
%e A382946    3    64    32  2,1,0,1      1,0,1,2
%e A382946    4    36    18  2,1,0        1,0,2
%e A382946    5    16     8  3,1          1,3
%e A382946    6   700   350  3,1,2,4      1,3,4,2
%e A382946    7    36    12  5,1          1,5
%e A382946    8    42    21  5,2          2,5
%e A382946    9    64    16  7,1          1,7
%e A382946   10  3105  1035  3,1,0,5      1,0,3,5
%e A382946   11    45    15  4,1          1,4
%e A382946   12   594   198  4,1,6        1,4,6
%e A382946   13   105    21  8,1          1,8
%e A382946   14   130    65  9,4          4,9
%e A382946   15   168    56  11,3         3,11
%e A382946   16   945   315  3,11,1       1,3,11
%o A382946 (PARI) a(n) = {
%o A382946     if (n==2, return (-1));
%o A382946     for (k = 1, oo,
%o A382946         my (t = vecsort(digits(k, n)));
%o A382946         fordiv (k, d,
%o A382946             if (d < k && vecsort(digits(d, n))==t,
%o A382946                 return (k);););); }
%o A382946 (Python)
%o A382946 from sympy import divisors
%o A382946 from sympy.ntheory import digits
%o A382946 from itertools import count
%o A382946 def a(n):
%o A382946     if n == 2:
%o A382946         return -1
%o A382946     for k in count(2*n):
%o A382946         divs, kdigs = divisors(k), sorted(digits(k, n)[1:])
%o A382946         for d in sorted(divs[:-1], reverse=True):
%o A382946             ddigs = sorted(digits(d, n)[1:])
%o A382946             if ddigs == kdigs:
%o A382946                 return k
%o A382946             if len(ddigs) < len(kdigs):
%o A382946                 break
%o A382946 print([a(n) for n in range(2, 52)]) # _Michael S. Branicky_, Apr 13 2025
%Y A382946 Cf. A023094, A090056, A382945.
%K A382946 sign,base
%O A382946 2,2
%A A382946 _Rémy Sigrist_, Apr 09 2025