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) = [A007814(n), A065339(n), A083025(n), A373591(n), A373592(n)].
2

%I #8 Jun 13 2024 10:51:10

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

%T 5,23,5,24,25,9,26,27,5,11,28,29,5,30,5,31,32,17,5,33,34,35,12,36,5,

%U 37,38,39,16,9,5,40,5,11,41,42,43,44,5,15,25,45,5,46,5,20,47,22,48,49,5,50,51,9,5,52,19,11,12,53,5,54,55,31,16,17,26,56,5,57,58

%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) = [A007814(n), A065339(n), A083025(n), A373591(n), A373592(n)].

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

%C Note that for composite n, f(n) can be defined in general as a quintuple vector [v(n), w(n), x(n), y(n), z(n)], where v, w, x, y and z are any five of these six sequences: A007814, A007949, A065339, A083025, A373591, A373592. This follows because A007814(n) + A065339(n) + A083025(n) = A007949(n) + A373591(n) + A373592(n) = A001222(n), so the omitted sixth element can be always worked out from the remaining five.

%C For all i, j > 1:

%C A305900(i) = A305900(j) => a(i) = a(j) => A373595(i) = A373595(j).

%H Antti Karttunen, <a href="/A373594/b373594.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 A007814(n) = valuation(n,2);

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

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

%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 Aux373594(n) = if(n<=3, n, if(isprime(n), 0, [A007814(n), A083025(n), A065339(n), A373591(n), A373592(n)]));

%o v373594 = rgs_transform(vector(up_to, n, Aux373594(n)));

%o A373594(n) = v373594[n];

%Y Cf. A007814, A007949, A065339, A083025, A373591, A373592.

%Y Cf. also A305900, A373595.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jun 13 2024