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!)
A322587 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) = A291756(n) [equally: A295887(n)] for any other number. 11

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

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

%T 10,2,19,20,21,22,23,2,24,22,25,2,13,2,26,27,28,2,29,30,16,31,32,2,17,

%U 33,34,35,36,2,37,2,38,39,40,41,20,2,42,43,22,2,44,2,35,45,46,47,22,2,48,49,33,2,32,50,51,52,53,2,27,54,55,47,56,54,57,2,30,58,59,2,31,2,60,41

%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) = A291756(n) [equally: A295887(n)] for any other number.

%C For all i, j: a(i) = a(j) => A322320(i) = A322320(j).

%H Antti Karttunen, <a href="/A322587/b322587.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 Aux322587(n) = if((n>2)&&isprime(n),0,(1/2)*(2 + ((A003557(n)+A173557(n))^2) - A003557(n) - 3*A173557(n)));

%o v322587 = rgs_transform(vector(up_to, n, Aux322587(n)));

%o A322587(n) = v322587[n];

%Y Cf. A291756, A295887, A322588, A322589, A322591, A322592.

%K nonn

%O 1,3

%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 August 18 23:05 EDT 2024. Contains 375284 sequences. (Running on oeis4.)