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”).

A340680
Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(1+i) = A007814(1+j) and A292251(i) = A292251(j), for all i, j >= 1.
3
1, 2, 3, 2, 1, 2, 4, 2, 1, 2, 5, 2, 6, 2, 7, 2, 1, 2, 3, 2, 1, 2, 4, 2, 1, 2, 8, 2, 1, 2, 9, 2, 10, 2, 3, 2, 10, 2, 11, 2, 1, 2, 3, 2, 1, 2, 12, 2, 1, 2, 3, 2, 10, 2, 11, 2, 1, 2, 5, 2, 1, 2, 13, 2, 10, 2, 8, 2, 1, 2, 11, 2, 1, 2, 3, 2, 6, 2, 14, 2, 1, 2, 8, 2, 1, 2, 4, 2, 1, 2, 5, 2, 10, 2, 15, 2, 10, 2, 5, 2, 1, 2, 16, 2, 1
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A007814(1+n), A292251(n)], where the first element is the 2-adic valuation of 1+n (i.e., the number of trailing 1-digits in the base-2 representation of n), and the latter element is the 3-adic valuation of A048673(n).
For all i, j: a(i) = a(j) => A341345(i) = A341345(j).
FORMULA
a(2n) = 2.
PROG
(PARI)
up_to = 65537;
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; };
A007814(n) = valuation(n, 2);
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;
A292251(n) = valuation(A048673(n), 3);
Aux340680(n) = [A007814(1+n), A292251(n)];
v340680 = rgs_transform(vector(up_to, n, Aux340680(n)));
A340680(n) = v340680[n];
CROSSREFS
Cf. also A322026.
Sequence in context: A275892 A163530 A114409 * A343897 A193585 A245436
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 11 2021
STATUS
approved