OFFSET
1,1
COMMENTS
Previous name: Numbers k such that there exists a solution to (p_m ^ a_m)*(p_m-1 ^ a_m-1)*...*(3^a_1)*(2^a_0) = (B^m)*a_m + (B^m-1)*a_m-1 + ... + (B^1)*a_1 + (B^0)*a_0 where k = (p_m ^ a_m)*(p_m-1 ^ a_m-1)*...*(3^a_1)*(2^a_0); a_m >= 1; a_(i<m) >= 0; p_0, p_1, ..., p_m are prime numbers; a_0, a_1, ..., a_m, B are integers.
B is the base in which we can express k as Sum_{i=0..m} B^i * a_i. B may also be seen as the variable in a polynomial, and k is then also an encoding of the polynomial (defined by the product of primes formula).
For k = (2^r)*3 we have B = (2^r)*3 - r.
A167221(n) is the smallest positive integer that yields a solution for k = a(n).
Negative B's can be obtained when the polynomial is an even function. This happens for instance when for k = 10, 100, 3125, ... - Michel Marcus, Aug 10 2022
From Peter Munn, Aug 13 2022: (Start)
Positive integers k such that k is a fixed point of a completely additive function f_B:N+ -> Z, B > 0, where f_B(prime(i+1)) = B^i for all i >= 0. Equivalently, since row B of A104244 is f_B, {a(n)} lists the columns of A104244 that contain their own column number.
If we require B to be negative instead, the sequence appears to start 10, 100, 3125, 1799875, 65610000, ... . Of these, 1799875 = 5^3 * 7 * 11^2 * 17 is the only k with only negative solutions (B = -11); the solutions for 65610000 are {4049, -4051}.
(End)
If p is the (k+1)-th prime and p is congruent to 1 modulo k, then p^p is a term with p^((p-1)/k) a solution for B. The list of such primes starts 3, 5, 7, 31, 97, 101, 331, ... . I suspect this list is infinite, meaning the greatest prime factor of the terms would be unbounded. - Peter Munn, Aug 15 2022
LINKS
David A. Corneth, Table of n, a(n) for n = 1..98 (terms <= 10^10)
David A. Corneth, PARI program
EXAMPLE
For k = 10 = 2^1 * 3^0 * 5^1, k = B^0 * 1 + B^1 * 0 + B^2 * 1, so we have to solve the equation 10 = 1 + B^2 for a positive integer B, B = 3. But B=-3 works too. Thus 10 is a term.
For k = 12 = 2^2 * 3^1, k = B^0 * 2 + B^1 * 1, so we have to solve the equation 12 = 2 + B for a positive integer B. B = 10. Thus 12 is a term.
For k = 21 = 2^0 * 3^1 * 5^0 * 7^1, k = B^0 * 0 + B^1 * 1 + B^2 * 0 + B^3 * 1, so we have to solve the equation 21 = B + B^3 for an integer B. No such B exists, so 21 is not a term of this sequence.
From Michel Marcus, Aug 10 2022: (Start)
In other words:
10 is a term because 10 = 5^1 * 3^0 * 2^1 and 101 in base 3 is 10.
12 is a term because 12 = 3^1 * 2^2 and 12 in base 10 is 12. (End)
PROG
(PARI) isok(k) = if (k>1, my(f=factor(k), v=primes(primepi(vecmax(f[, 1])))); my(p=sum(i=1, #v, 'x^(i-1)*valuation(k, v[i]))); p -= k; my(c=-polcoef(p, 0)); my(q=(p+c)/x); my(d=divisors(c)); for (k=1, #d, if(subst(q, x, d[k]) == c/d[k], return(1)); ); ); \\ Michel Marcus, Aug 08 2022
(PARI) \\ See PARI link \\ David A. Corneth, Aug 10 2022
(Python)
from sympy import divisors, factorint, sieve
def ok(n):
if n < 2: return False
f = factorint(n)
a = [f[pi] if pi in f else 0 for pi in sieve.primerange(2, max(f)+1)]
for B in range(1, n+1):
polyB = sum(B**i*ai for i, ai in enumerate(a) if ai > 0)
if polyB == n: return True
elif polyB > n: return False
return False
print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Aug 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Oct 30 2009
EXTENSIONS
Edited by Jon E. Schoenfield, Mar 16 2022
Incorrect term 71 removed, new name and more terms from Michel Marcus, Aug 08 2022
a(41)-a(46) from Michael S. Branicky, Aug 10 2022
STATUS
approved