cp's OEIS Frontend

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.

A344772 Ordinal transform of infinitary phi, A091732.

This page as a plain text file.
%I A344772 #17 Dec 27 2021 10:41:33
%S A344772 1,2,1,1,1,2,1,2,1,2,1,2,1,3,2,1,1,3,1,2,3,2,1,4,1,4,2,2,1,4,1,2,1,3,
%T A344772 2,3,1,3,4,5,1,6,1,2,1,2,1,3,1,5,2,2,1,4,2,4,3,2,1,6,1,4,2,1,3,2,1,4,
%U A344772 1,7,1,8,1,4,5,1,2,9,1,3,1,3,1,5,1,2,1,5,1,3,2,2,4,2,3,6,1,6,2,4,1,4,1,6,7
%N A344772 Ordinal transform of infinitary phi, A091732.
%C A344772 Number of values of k, 1 <= k <= n, with A091732(k) = A091732(n).
%H A344772 Antti Karttunen, <a href="/A344772/b344772.txt">Table of n, a(n) for n = 1..65537</a>
%t A344772 f[p_, e_] := p^(2^(-1 + Position[Reverse @ IntegerDigits[e, 2], 1]));
%t A344772 iphi[1] = 1; iphi[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n]) - 1);
%t A344772 b[_] = 0;
%t A344772 a[n_] := a[n] = With[{t = iphi[n]}, b[t] = b[t] + 1];
%t A344772 Array[a, 105] (* _Jean-François Alcover_, Dec 27 2021, after _Amiram Eldar_ in A091732 *)
%o A344772 (PARI)
%o A344772 up_to = 65537;
%o A344772 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
%o A344772 ispow2(n) = (n && !bitand(n,n-1));
%o A344772 A302777(n) = ispow2(isprimepower(n));
%o A344772 A091732(n) = { my(m=1); while(n > 1, fordiv(n, d, if((d<n)&&A302777(n/d), m *= ((n/d)-1); n = d; break))); (m); };
%o A344772 v344772 = ordinal_transform(vector(up_to,n,A091732(n)));
%o A344772 A344772(n) = v344772[n];
%Y A344772 Cf. A091732, A050376, A302777.
%Y A344772 Cf. also A081373 (ordinal transform of phi), A303756 (of Carmichael's lambda), A330739 (of unitary phi).
%K A344772 nonn,look
%O A344772 1,2
%A A344772 _Antti Karttunen_, May 31 2021