OFFSET

1,2

COMMENTS

Because non-existing primes in the a factorization are recorded with exponent 0 here, and because 0 is not in the sequence, all entries must have a full set of prime divisors from 2 up to their largest prime: this is a subsequence of A055932. - R. J. Mathar, May 05 2023

3 and 5 do not appear in the sequence, so entries of A176297 or A362831 are not in the sequence. - R. J. Mathar, May 05 2023

FORMULA

a(1) = 1; a(n) = least positive integer x > a(n-1) where the exponents e in the prime factorization of x are in a(1..n-1).

EXAMPLE

a(2) = 2, since 2 = 2^1 and all {1} are in a(1..1) = [1].

a(3) != 3, since 3 = 2^0 * 3^1 and not all {0,1} are in a(1..2) = [1,2].

a(3) = 4, since 4 = 2^2 and all {2} are in a(1..2) = [1,2].

a(4) != 5, since 5 = 2^0 * 3^0 * 5^1 and not all {0,1} are in a(1..3) = [1,2,4].

a(4) = 6, since 6 = 2^1 * 3^1 and all {1} are in a(1..3) = [1,2,4].

PROG

(Haskell)

wheelSeeds = [2, 3, 5, 7, 11, 13]

wheelOffsets = filter (\c -> all (\s -> mod c s /= 0) wheelSeeds) [1..product wheelSeeds]

restOfWheel = (concat (map (replicate (length wheelOffsets)) (map (* (product wheelSeeds)) [1..])))

wheel = wheelSeeds ++ (tail wheelOffsets) ++ (zipWith (+) (cycle wheelOffsets) restOfWheel)

isPrime n = and [n > 1, all (\c -> mod n c /= 0) (takeWhile (\c -> c * c <= n) wheel)]

primes = filter isPrime wheel

exponents bases acc n =

if (n == 1)

then (dropWhile (== 0) acc)

else if (mod n (head bases) == 0)

then (exponents bases (((head acc) + 1) : (tail acc)) (div n (head bases)))

else (exponents (tail bases) (0 : acc) n)

a = filter (\n -> all (\e -> elem e (takeWhile (<= e) a)) (exponents primes [0] n)) [1..]

CROSSREFS

KEYWORD

nonn

AUTHOR

Chris Murray, Jul 12 2019

STATUS

approved