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 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

%I #12 Jun 13 2024 10:51:04

%S 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,

%T 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,

%U 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

%N 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)].

%C Restricted growth sequence transform of the function f given in the definition.

%C For all i, j > 1:

%C A305900(i) = A305900(j) => A373594(i) = A373594(j) => a(i) = a(j),

%C A373593(i) = A373593(j) => a(i) = a(j),

%C 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".

%H Antti Karttunen, <a href="/A373595/b373595.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 A007949(n) = valuation(n,3);

%o A373591(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%3)*n[2, i]);

%o A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]);

%o Aux373595(n) = if(n<=3, n, if(isprime(n), 0, [A007949(n), A373591(n), A373592(n)]));

%o v373595 = rgs_transform(vector(up_to, n, Aux373595(n)));

%o A373595(n) = v373595[n];

%Y Cf. A007949, A373591, A373592.

%Y Cf. A305900, A373593, A373594.

%Y Some of the matched sequences (see comments): A001222, A359430, A369643, A369658, A373371, A373383, A373474, A373491, A373493, A373585, A373588, A373596.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jun 13 2024