login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Lexicographically earliest infinite sequence such that a(i) = a(j) => A001065(i) = A001065(j) and A033630(i) = A033630(j), for all i, j >= 1.
2

%I #6 Dec 01 2024 19:54:55

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

%T 21,2,22,11,23,19,24,2,25,26,27,2,28,2,29,30,31,2,32,7,33,34,35,2,36,

%U 26,37,38,39,2,40,2,41,42,43,44,45,2,46,47,48,2,49,2,29,50,51,44,52,2,53,29,54,2,55,38,35,30,56,2,57,34,58,59,60,61,62,2,63,64,65,2,66,2,67,68

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

%C Restricted growth sequence transform of the ordered pair [A001065(n), A033630(n)].

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

%o (PARI)

%o up_to = 100000;

%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 A001065(n) = (sigma(n)-n);

%o v033630 = readvec("b033630_to.txt"); \\ Precomputed with A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));

%o A033630(n) = v033630[n];

%o Aux378605(n) = [A001065(n), A033630(n)];

%o v378605 = rgs_transform(vector(up_to, n, Aux378605(n)));

%o A378605(n) = v378605[n];

%Y Cf. A001065, A033630.

%Y Cf. also A378603.

%K nonn,new

%O 1,2

%A _Antti Karttunen_, Dec 01 2024