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!)
A323242 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n<=2) = -n, f(n) = 0 if n is an even number > 2, and f(n) = A300226(n) for odd numbers >= 3. 3

%I #6 Jan 08 2019 19:08:46

%S 1,2,3,4,3,4,3,4,5,4,3,4,3,4,6,4,3,4,3,4,6,4,3,4,7,4,8,4,3,4,3,4,6,4,

%T 9,4,3,4,6,4,3,4,3,4,10,4,3,4,11,4,6,4,3,4,9,4,6,4,3,4,3,4,10,4,9,4,3,

%U 4,6,4,3,4,3,4,12,4,13,4,3,4,14,4,3,4,9,4,6,4,3,4,13,4,6,4,9,4,3,4,10,4,3,4,3,4,15

%N Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n<=2) = -n, f(n) = 0 if n is an even number > 2, and f(n) = A300226(n) for odd numbers >= 3.

%H Antti Karttunen, <a href="/A323242/b323242.txt">Table of n, a(n) for n = 1..100000</a>

%o (PARI)

%o up_to = 10000;

%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 A052126(n) = if(1==n, n, n/vecmax(factor(n)[, 1]));

%o A319988(n) = ((n>1)&&(factor(n)[omega(n),2]>1));

%o A323242aux(n) = if(n<=2,-n,if(!(n%2),0,[A052126(n), A319988(n)]));

%o v323242 = rgs_transform(vector(up_to,n,A323242aux(n)));

%o A323242(n) = v323242[n];

%Y Cf. A052126, A300226, A319701, A319988, A323241.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 07 2019

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 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)