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!)
A322588 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) = A291750(n) for any other number. 10

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

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

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

%U 36,21,37,38,39,3,40,3,29,41,42,43,44,3,45,29,44,3,46,3,47,48,49,29,50,3,51,52,53,3,54,55,56,57,58,3,59,60,40,61,44,57,62,3,63,64,65,3,66,3

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

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

%H Antti Karttunen, <a href="/A322588/b322588.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 A048250(n) = factorback(apply(p -> p+1,factor(n)[,1]));

%o Aux322588(n) = if((n>2)&&isprime(n),0,(1/2)*(2 + ((A003557(n)+A048250(n))^2) - A003557(n) - 3*A048250(n)));

%o v322588 = rgs_transform(vector(up_to, n, Aux322588(n)));

%o A322588(n) = v322588[n];

%Y Cf. A291750, A291751, A322587, A322589, 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 March 29 04:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)