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 A346488 #16 Nov 21 2021 01:17:51 %S A346488 1,2,2,3,2,4,2,5,6,7,2,8,2,9,10,11,2,12,2,13,14,15,2,16,17,18,19,20,2, %T A346488 2,2,21,22,23,24,25,2,26,27,28,2,2,2,29,30,31,2,32,33,34,35,36,2,37, %U A346488 38,39,40,41,2,42,2,43,44,45,46,2,2,47,48,2,2,49,2,50,51,52,53,2,2,54,55,56,2,57,58,59,60,61,2,62,63,64,65,66,67,68,2,69,70,71 %N A346488 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), for all i, j >= 1, where f(n) = 0 if mu(n) = -1, and f(n) = n for all other numbers (with mu = Möbius mu, A008683). %C A346488 Restricted growth sequence transform of the sequence f(n) = 0 if mu(n) = -1, and f(n) = n for mu(n) >= 0. %C A346488 For all i, j: %C A346488 A305800(i) = A305800(j) => a(i) = a(j) => A305980(i) = A305980(j), %C A346488 a(i) = a(j) => b(i) = b(j), where b is the pointwise sum of any two multiplicative sequences c and d that are Dirichlet inverses of each other. For example, b can be a sequence like A319340, A323885, or A347094. %H A346488 Antti Karttunen, <a href="/A346488/b346488.txt">Table of n, a(n) for n = 1..65537</a> %F A346488 a(1) = 1, and for n > 1, if A008683(n) = -1, a(n) = 2, otherwise a(n) = 1 + n - A070549(n). %o A346488 (PARI) %o A346488 up_to = 65537; %o A346488 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 A346488 Aux346488(n) = if(moebius(n)<0,0,n); %o A346488 v346488 = rgs_transform(vector(up_to, n, Aux346488(n))); %o A346488 A346488(n) = v346488[n]; %o A346488 (PARI) %o A346488 A070549(n) = sum(k=1,n,(-1==moebius(k))); %o A346488 A346488(n) = if(1==n,1,if(-1==moebius(n),2,1+n-A070549(n))); %Y A346488 Cf. A008683, A070549, A030059 (positions of 2's). %Y A346488 Cf. also A305800, A305980, A319340, A323885, A347094. %K A346488 nonn %O A346488 1,2 %A A346488 _Antti Karttunen_, Aug 20 2021