login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322589 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) = A007913(n) for any other number. 6

%I #5 Dec 18 2018 17:04:41

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

%T 15,16,17,1,3,18,19,5,3,20,3,21,9,22,3,6,1,2,23,24,3,4,25,7,26,27,3,8,

%U 3,28,13,1,29,30,3,31,32,33,3,2,3,34,6,35,36,37,3,9,1,38,3,10,39,40,41,11,3,5,42,43,44,45,46,4,3,2,21,1,3,47,3,12,48

%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) = A007913(n) for any other number.

%H Antti Karttunen, <a href="/A322589/b322589.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 Aux322589(n) = if((n>2)&&isprime(n),0,core(n));

%o v322589 = rgs_transform(vector(up_to, n, Aux322589(n)));

%o A322589(n) = v322589[n];

%Y Cf. A007913, A322587, A322588, A322591, A322592.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 18 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)