login
Lexicographically first increasing sequence such that no two successive terms have the same prime signature.
2

%I #20 Mar 09 2018 20:54:34

%S 1,2,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,23,24,25,26,27,28,

%T 29,30,31,32,33,36,37,38,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,

%U 56,57,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,77,78,79,80,81

%N Lexicographically first increasing sequence such that no two successive terms have the same prime signature.

%H Alois P. Heinz, <a href="/A083792/b083792.txt">Table of n, a(n) for n = 1..20000</a>

%e From _Jon E. Schoenfield_, Aug 13 2017: (Start)

%e a(1) = 1 (which has no prime factors);

%e a(2) = 2 (a prime);

%e a(3) cannot be 3, because 2 and 3 have the same prime signature (each is a prime); however, the prime signature of 4 (the square of a prime) differs from that of 2, so a(3) = 4. (End)

%p s:= n-> sort(map(i-> i[2], ifactors(n)[2])):

%p a:= proc(n) option remember; local k; for k from

%p 1+a(n-1) while s(k)=s(a(n-1)) do od; k

%p end: a(1):=1:

%p seq(a(n), n=1..80); # _Alois P. Heinz_, Mar 09 2018

%t {1, 2} ~Join~ Select[Range[2, 80], Last /@ FactorInteger[#] != Last /@ FactorInteger[# - 1] &] (* _Giovanni Resta_, Aug 14 2017 *)

%Y Cf. A083793.

%K easy,nonn

%O 1,2

%A _Amarnath Murthy_, May 07 2003

%E More terms from _James A. Sellers_, May 19 2003

%E Incorrect term 76 removed by _Alois P. Heinz_, Mar 09 2018