login
a(n) = the smallest positive integer which does not occur earlier in the sequence and which is coprime to the number of positive divisors of n.
1

%I #16 Oct 13 2024 07:07:57

%S 1,3,5,2,7,9,11,13,4,15,17,19,21,23,25,6,27,29,31,35,33,37,39,41,8,43,

%T 45,47,49,51,53,55,57,59,61,10,63,65,67,69,71,73,75,77,79,81,83,87,14,

%U 85,89,91,93,95,97,99,101,103,105,107,109,111,113,12,115,117,119,121

%N a(n) = the smallest positive integer which does not occur earlier in the sequence and which is coprime to the number of positive divisors of n.

%C Sequence is a permutation of the positive integers.

%C Scatterplot shows trajectories of odd numbers, even numbers that are not 3 smooth, 3 smooth numbers that are not 5 smooth, etc. - _Michael De Vlieger_, Oct 12 2024

%H James C. McMahon, <a href="/A120837/b120837.txt">Table of n, a(n) for n = 1..1000</a>

%H Michael De Vlieger, <a href="/A120837/a120837.png">Log log scatterplot of a(n)</a>, n = 1..2^14, showing primes in red, perfect prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, where purple also represents powerful numbers that are not prime powers.

%e 6 has 4 positive divisors. Among those positive integers not occurring among the first 5 terms of the sequence, 9 is the smallest which is coprime to 4. So a(6) = 9. 4, 6 and 8 also do not occur among the first 5 terms of the sequence, but they are not coprime to 4.

%t s={1};Do[i=1;Until[!MemberQ[s,i]&&CoprimeQ[i,DivisorSigma[0,n]],i++];AppendTo[s,i],{n,2,68}];s (* _James C. McMahon_, Oct 12 2024 *)

%Y Cf. A000005.

%K nonn

%O 1,2

%A _Leroy Quet_, Aug 18 2006

%E Extended by _Ray Chandler_, Aug 22 2006