A167219 Numbers k such that there exists a positive integer B for which k = Sum_{i=0..m} (B^i)*a_i where the a_i are defined by k = Product_{i=0..m} prime(i+1)^a_i.
3, 6, 10, 12, 24, 27, 36, 48, 96, 100, 144, 175, 192, 216, 273, 384, 486, 576, 768, 972, 1296, 1536, 1728, 2304, 3072, 3125, 6144, 9216, 12288, 13824, 17496, 19683, 20736, 24576, 36864, 46656, 49152, 62208, 69984, 98304, 110592, 147456, 196608, 331776, 393216, 589824
Offset: 1
Keywords
Examples
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)
Links
- David A. Corneth, Table of n, a(n) for n = 1..98 (terms <= 10^10)
- David A. Corneth, PARI program
Crossrefs
Programs
-
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
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
Comments