[go: up one dir, main page]

login
Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(1)=0, f(2)=1, f(n)=-1 for odd primes, and f(n) = A252463(n) for any other number.
6

%I #9 Dec 26 2018 21:35:46

%S 1,2,3,4,3,5,3,6,6,7,3,8,3,9,8,10,3,11,3,12,12,13,3,14,11,15,10,16,3,

%T 17,3,18,16,19,17,20,3,21,22,23,3,24,3,22,14,25,3,26,27,27,28,28,3,29,

%U 24,30,31,32,3,33,3,34,23,35,36,36,3,31,37,38,3,39,3,40,20,37,38,41,3,42,18,43,3,44,41,45,46,47,3,48,49,46,50,51,52,53,3,54,30,55,3,52,3,56,33

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

%C For all i, j:

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

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

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

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

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

%C a(i) = a(j) => A320110(i) = A320110(j) => A320111(i) = A320111(j).

%H Antti Karttunen, <a href="/A322805/b322805.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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A252463(n) = if(!(n%2),n/2,A064989(n));

%o A322805aux(n) = if(n<=2,n-1,if(isprime(n),-1,A252463(n)));

%o v322805 = rgs_transform(vector(up_to,n,A322805aux(n)));

%o A322805(n) = v322805[n];

%Y Cf. A252463.

%Y Cf. A319694, A319699, A319700, A319703, A319989, A320110, A320111.

%Y Cf. also A322807, A322809.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 26 2018