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

A373595
Lexicographically earliest infinite sequence such that for all i, j >= 1, a(i) = a(j) => f(i) = f(j), where f(n<=3) = n, f(p) = 0 for primes p > 3, and for composite n, f(n) = [A007949(n), A373591(n), A373592(n)].
3
1, 2, 3, 4, 5, 6, 5, 7, 8, 4, 5, 9, 5, 10, 6, 11, 5, 12, 5, 7, 13, 4, 5, 14, 4, 10, 15, 16, 5, 9, 5, 17, 6, 4, 10, 18, 5, 10, 13, 11, 5, 19, 5, 7, 12, 4, 5, 20, 21, 7, 6, 16, 5, 22, 4, 23, 13, 4, 5, 14, 5, 10, 24, 25, 10, 9, 5, 7, 6, 16, 5, 26, 5, 10, 9, 16, 10, 19, 5, 17, 27, 4, 5, 28, 4, 10, 6, 11, 5, 18, 21, 7, 13, 4, 10, 29, 5, 30, 12, 11, 5, 9, 5, 23, 19
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the function f given in the definition.
For all i, j > 1:
A305900(i) = A305900(j) => A373594(i) = A373594(j) => a(i) = a(j),
A373593(i) = A373593(j) => a(i) = a(j),
a(i) = a(j) => b(i) = b(j), where b can be (but is not limited to) any of the sequences listed at the crossrefs-section, under "some of the matched sequences".
LINKS
PROG
(PARI)
up_to = 100000;
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; };
A007949(n) = valuation(n, 3);
A373591(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%3)*n[2, i]);
A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]);
Aux373595(n) = if(n<=3, n, if(isprime(n), 0, [A007949(n), A373591(n), A373592(n)]));
v373595 = rgs_transform(vector(up_to, n, Aux373595(n)));
A373595(n) = v373595[n];
CROSSREFS
Some of the matched sequences (see comments): A001222, A359430, A369643, A369658, A373371, A373383, A373474, A373491, A373493, A373585, A373588, A373596.
Sequence in context: A002330 A374211 A335130 * A358747 A373251 A358230
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 13 2024
STATUS
approved