login
A340383
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A278222(A304759(n)), A278222(A291759(n))], for all i, j >= 1.
3
1, 2, 1, 3, 4, 5, 2, 6, 7, 3, 3, 8, 1, 9, 2, 10, 11, 6, 4, 12, 11, 13, 3, 14, 9, 15, 3, 16, 12, 17, 3, 18, 3, 3, 7, 19, 3, 9, 19, 19, 6, 3, 5, 8, 12, 20, 1, 21, 8, 22, 12, 23, 11, 24, 12, 25, 6, 8, 26, 27, 12, 13, 12, 28, 13, 29, 4, 12, 9, 20, 26, 30, 31, 22, 10, 16, 5, 14, 6, 32, 33, 8, 3, 12, 10, 23, 15, 14, 19, 8
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A340381(n), A340382(n)], or equally, of the function f(n) = A290093(A048673(n)).
For all i, j: a(i) = a(j) => A286586(i) = A286586(j) => A286585(i) = A286585(j).
LINKS
PROG
(PARI)
up_to = 65537;
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A048673(n) = (A003961(n)+1)/2;
A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814
A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
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; };
Aux340383(n) = [A278222(A291759(n)), A278222(A304759(n))];
v340383 = rgs_transform(vector(up_to, n, Aux340383(n)));
A340383(n) = v340383[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 16 2021
STATUS
approved