[go: up one dir, main page]

login
A138510
Smallest number b such that in base b the prime factors of the n-th semiprime (A001358) have equal lengths.
9
1, 2, 1, 6, 8, 3, 3, 12, 1, 14, 12, 18, 2, 20, 14, 24, 1, 18, 4, 20, 30, 32, 4, 24, 38, 4, 42, 5, 44, 30, 4, 32, 48, 5, 54, 38, 5, 60, 5, 1, 62, 42, 44, 5, 68, 48, 72, 2, 30, 74, 32, 80, 54, 5, 84, 1, 60, 90, 62, 38, 3, 98, 68, 102, 6, 42, 104, 3, 72, 108, 44, 6, 110, 74, 3, 114, 48, 80
OFFSET
1,2
COMMENTS
a(n) = 1 iff A001358(n) is the square of a prime (A001248);
Equally, 1 if A001358(n) = p^2, otherwise, if A001358(n) = p*q (p, q primes, p < q), then a(n) = A252375(n) = the least r such that r^k <= p < q < r^(k+1), for some k >= 0. - Antti Karttunen, Dec 16 2014
a(A174956(A085721(n))) <= 2. - Reinhard Zumkeller, Dec 19 2014
LINKS
FORMULA
a(n) = A251725(A001358(n)). - Antti Karttunen, Dec 16 2014
EXAMPLE
For n=31, the n-th semiprime is A001358(31) = 91 = 7*13;
7 = 111_2 = 21_3 = 13_4
and 13 = 1101_2 = 111_3 = 31_4, so a(31) = 4. [corrected by Jon E. Schoenfield, Sep 23 2018]
.
Illustration of initial terms, n <= 25:
. n | A001358(n) = p * q | b = a(n) | p and q in base b
. ----+---------------------+-----------+-------------------
. 1 | 4 2 2 | 1 | [1] [1]
. 2 | 6 2 3 | 2 | [1,0] [1,1]
. 3 | 9 3 3 | 1 | [1,1,1] [1,1,1]
. 4 | ** 10 2 5 | 6 | [2] [5]
. 5 | ** 14 2 7 | 8 | [2] [7]
. 6 | 15 3 5 | 3 | [1,0] [1,2]
. 7 | 21 3 7 | 3 | [1,0] [2,1]
. 8 | ** 22 2 11 | 12 | [2] [11]
. 9 | 25 5 5 | 1 | [1]^5 [1]^5
. 10 | ** 26 2 13 | 14 | [2] [13]
. 11 | ** 33 3 11 | 12 | [3] [11]
. 12 | ** 34 2 17 | 18 | [2] [17]
. 13 | 35 5 7 | 2 | [1,0,1] [1,1,1]
. 14 | ** 38 2 19 | 20 | [2] [19]
. 15 | ** 39 3 13 | 14 | [3] [13]
. 16 | ** 46 2 23 | 24 | [2] [23]
. 17 | 49 7 7 | 1 | [1]^7 [1]^7
. 18 | ** 51 3 17 | 18 | [3] [17]
. 19 | 55 5 11 | 4 | [1,1] [2,3]
. 20 | ** 57 3 19 | 20 | [3] [19]
. 21 | ** 58 2 29 | 30 | [2] [29]
. 22 | ** 62 2 31 | 32 | [2] [31]
. 23 | 65 5 13 | 4 | [1,1] [3,1]
. 24 | ** 69 3 23 | 24 | [3] [23]
. 25 | ** 74 2 37 | 38 | [2] [37]
where p = A084126(n) and q = A084127(n),
semiprimes marked with ** indicate terms of A138511, i.e. b = q + 1.
PROG
(Haskell)
import Data.List (genericIndex, unfoldr); import Data.Tuple (swap)
import Data.Maybe (mapMaybe)
a138510 n = genericIndex a138510_list (n - 1)
a138510_list = mapMaybe f [1..] where
f x | a010051' q == 0 = Nothing
| q == p = Just 1
| otherwise = Just $
head [b | b <- [2..], length (d b p) == length (d b q)]
where q = div x p; p = a020639 x
d b = unfoldr (\z -> if z == 0 then Nothing else Just $ swap $ divMod z b)
-- Reinhard Zumkeller, Dec 16 2014
(Scheme) (define (A138510 n) (A251725 (A001358 n))) ;; Antti Karttunen, Dec 16 2014
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Mar 21 2008
EXTENSIONS
Wrong comment corrected by Reinhard Zumkeller, Dec 16 2014
STATUS
approved