

A138311


a(1)=1. a(n) = smallest positive integer not occurring among the first n1 terms of the sequence that is coprime to every (nonzero) exponent in the prime factorization of n.


3



1, 2, 3, 5, 4, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, 17, 16, 19, 18, 21, 20, 22, 23, 25, 27, 24, 26, 29, 28, 30, 31, 32, 33, 34, 35, 37, 36, 38, 39, 40, 41, 42, 43, 45, 47, 44, 46, 49, 51, 53, 48, 55, 50, 52, 54, 56, 57, 58, 59, 61, 60, 62, 63, 65, 64, 66, 67, 69, 68, 70, 71, 73
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



EXAMPLE

12 has the primefactorization of 2^2 * 3^1. The positive integers that don't occur among the first 11 terms of the sequence are 12,13,14,15,16,... Of these integers, 13 is the smallest that is coprime to the exponents in the prime factorization of 12 (i.e., coprime to 2 and 1). So a(12) = 13.


MATHEMATICA

With[{nn = 72}, Fold[Append[#1, SelectFirst[Range[2, 2 nn], Function[k, And[FreeQ[#1, k], AllTrue[FactorInteger[#2][[All, 1]], CoprimeQ[k, #] &]]]]] &, {1}, Range[2, nn]]] (* Michael De Vlieger, Oct 18 2017 *)


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



