This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A373594 #8 Jun 13 2024 10:51:10 %S A373594 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 A373594 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 A373594 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 A373594 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 A373594 Restricted growth sequence transform of the function f given in the definition. %C A373594 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 A373594 For all i, j > 1: %C A373594 A305900(i) = A305900(j) => a(i) = a(j) => A373595(i) = A373595(j). %H A373594 Antti Karttunen, <a href="/A373594/b373594.txt">Table of n, a(n) for n = 1..100000</a> %o A373594 (PARI) %o A373594 up_to = 100000; %o A373594 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 A373594 A007814(n) = valuation(n,2); %o A373594 A065339(n) = sum(i=1, #n=factor(n)~, (3==n[1, i]%4)*n[2, i]); %o A373594 A083025(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%4)*n[2, i]); %o A373594 A373591(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%3)*n[2, i]); %o A373594 A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]); %o A373594 Aux373594(n) = if(n<=3, n, if(isprime(n), 0, [A007814(n), A083025(n), A065339(n), A373591(n), A373592(n)])); %o A373594 v373594 = rgs_transform(vector(up_to, n, Aux373594(n))); %o A373594 A373594(n) = v373594[n]; %Y A373594 Cf. A007814, A007949, A065339, A083025, A373591, A373592. %Y A373594 Cf. also A305900, A373595. %K A373594 nonn %O A373594 1,2 %A A373594 _Antti Karttunen_, Jun 13 2024