Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Jan 13 2019 19:29:13
%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,30,3,31,32,33,3,34,35,36,37,38,3,
%U 39,40,41,42,43,3,44,3,45,46,47,48,49,3,50,51,52,3,53,3,54,55,56,57,52,3,58,59,60,3,61,62,63,64,65,3,66,67,68,57,69,67,70,3,71,72,73,3,74,3,75,76
%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A000035(n), A003557(n), A023900(n)] for all other numbers, except f(n) = 0 for odd primes.
%C Restricted growth sequence transform of function f, defined as f(n) = 0 when n is an odd prime, and f(n) = [A000035(n), A003557(n), A023900(n)] for all other numbers.
%C For all i, j:
%C A305801(i) = A305801(j) => a(i) = a(j),
%C a(i) = a(j) => A323367(i) = A323367(j),
%C a(i) = a(j) => A323371(i) = A323371(j).
%H Antti Karttunen, <a href="/A323370/b323370.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] = max(0,f[i, 2]-1)); factorback(f); };
%o A023900(n) = sumdivmult(n, d, d*moebius(d)); \\ From A023900
%o Aux323370(n) = if((n>2)&&isprime(n),0,[(n%2), A003557(n), A023900(n)]);
%o v323370 = rgs_transform(vector(up_to, n, Aux323370(n)));
%o A323370(n) = v323370[n];
%Y Cf. A000035, A003557, A023900, A092248, A295886, A305801, A319340, A322587, A323367, A323371.
%Y Differs from A323405 for the first time at n=78, where a(78) = 52, while A323405(78) = 58.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jan 13 2019