login
Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and f(n) = A323366(n) for any other number.
5

%I #7 Jan 12 2019 20:46:50

%S 1,2,3,4,3,5,3,6,7,8,3,9,3,10,11,12,3,13,3,14,15,16,3,17,18,19,20,21,

%T 3,22,3,23,24,25,26,27,3,28,26,29,3,19,3,30,31,32,3,33,34,35,36,37,3,

%U 38,39,40,41,42,3,43,3,44,45,46,47,48,3,49,50,51,3,52,3,53,54,55,56,51,3,57,58,59,3,37,60,61,62,63,3,64,65,66,56,67,65,68,3,69,70,71,3,72,3,73,47

%N Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and f(n) = A323366(n) for any other number.

%C Restricted growth sequence transform of function f, where f(n) = 0 for odd primes, and for any other number, f(n) = [A000035(n), A003557(n), A173557(n)].

%C For all i, j:

%C A305801(i) = A305801(j) => a(i) = a(j),

%C a(i) = a(j) => A007814(i) = A007814(j),

%C a(i) = a(j) => A322587(i) = A322587(j).

%C a(i) = a(j) => A323237(i) = A323237(j).

%H Antti Karttunen, <a href="/A323367/b323367.txt">Table of n, a(n) for n = 1..65537</a>

%o (PARI)

%o up_to = 65537;

%o rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };

%o A003557(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };

%o A173557(n) = my(f=factor(n)[, 1]); prod(k=1, #f, f[k]-1); \\ From A173557

%o Aux323367(n) = if((n>2)&&isprime(n),0,[(n%2), A003557(n), A173557(n)]);

%o v323367 = rgs_transform(vector(up_to, n, Aux323367(n)));

%o A323367(n) = v323367[n];

%Y Cf. A000035, A003557, A173557, A291756, A305801, A322587, A323237, A323366.

%Y Cf. also A323369.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 12 2019