login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Lexicographically earliest sequence such that a(i) = a(j) => A033879(i) = A033879(j) and A083254(i) = A083254(j), for all i, j >= 1.
2

%I #12 Feb 10 2019 23:06:39

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

%T 25,26,27,28,2,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,

%U 47,48,49,38,50,51,52,53,54,55,56,57,35,2,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80

%N Lexicographically earliest sequence such that a(i) = a(j) => A033879(i) = A033879(j) and A083254(i) = A083254(j), for all i, j >= 1.

%C Restricted growth sequence transform of the ordered pair [A033879(n), A083254(n)], the deficiency of n, and its Möbius transform.

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

%H Antti Karttunen, <a href="/A323904/b323904.txt">Table of n, a(n) for n = 1..65537</a>

%F a(2^n) = 2 for all n >= 1.

%e For n=39, we have A033879(39) = 2*39 - A000203(39) = 22, and A083254(39) = 2*A000010(39)-39 = 9. For n=63 the results are same, with A033879(63) = 22 and A083254(63) = 9, thus a(39) and a(63) are allotted the same number by the restricted growth sequence transform, which in this case is 35, thus a(39) = a(63) = 35.

%e For n=42 and 54, we have A033879(42) = -12, A083254(42) = -18 and A033879(54) = -12, A083254(54) = -18, thus a(42) = a(54) (= 38).

%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 A033879(n) = (2*n-sigma(n));

%o A083254(n) = (2*eulerphi(n)-n);

%o A323904aux(n) = [A033879(n), A083254(n)];

%o v323904 = rgs_transform(vector(up_to,n,A323904aux(n)));

%o A323904(n) = v323904[n];

%Y Cf. A000010, A000203, A033879, A083254.

%Y Cf. also A318310, A323892, A323897, A323898.

%K nonn

%O 1,2

%A _Antti Karttunen_, Feb 10 2019