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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Antti Karttunen, May 31 2021

Keywords

Comments

Number of values of k, 1 <= k <= n, with A091732(k) = A091732(n).

Crossrefs

Cf. also A081373 (ordinal transform of phi), A303756 (of Carmichael's lambda), A330739 (of unitary phi).

Programs

  • Mathematica
    f[p_, e_] := p^(2^(-1 + Position[Reverse @ IntegerDigits[e, 2], 1]));
    iphi[1] = 1; iphi[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n]) - 1);
    b[_] = 0;
    a[n_] := a[n] = With[{t = iphi[n]}, b[t] = b[t] + 1];
    Array[a, 105] (* Jean-François Alcover, Dec 27 2021, after Amiram Eldar in A091732 *)
  • PARI
    up_to = 65537;
    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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A091732(n) = { my(m=1); while(n > 1, fordiv(n, d, if((dA302777(n/d), m *= ((n/d)-1); n = d; break))); (m); };
    v344772 = ordinal_transform(vector(up_to,n,A091732(n)));
    A344772(n) = v344772[n];