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.

Showing 1-5 of 5 results.

A116550 The bi-unitary analog of Euler's totient function of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 3, 6, 7, 8, 6, 10, 8, 12, 9, 9, 15, 16, 12, 18, 14, 14, 15, 22, 17, 24, 18, 26, 21, 28, 15, 30, 31, 23, 24, 25, 29, 36, 27, 28, 31, 40, 21, 42, 35, 34, 33, 46, 36, 48, 36, 37, 42, 52, 39, 42, 46, 42, 42, 58, 34, 60, 45, 51, 63, 50, 35, 66, 56, 51, 38, 70, 62, 72, 54
Offset: 1

Views

Author

Leroy Quet, Mar 16 2006

Keywords

Comments

a(1)=1; for n>1, a(n) is the number of numbers mA225174(m,n)=1. - N. J. A. Sloane, May 01 2013

Examples

			12 = 2^2 * 3^1. Of the positive integers < 12, there are 8 integers where no prime divides these integers the same number of times the prime divides 12: 1, 2 = 2^1, 5 = 5^1, 7 = 7^1, 8 = 2^3, 9 = 3^2, 10 = 2^1 *5^1 and 11 = 11^1. So a(12) = 8. The other positive integers < 12 (3 = 3^1, 4 = 2^2 and 6 = 2^1 * 3^1) each are divisible by at least one prime the same number of times this prime divides 12.
		

References

  • M. Lal, H. Wareham and R. Mifflin, Iterates of the bi-unitary totient function, Utilitas Math., 10 (1976), 347-350.

Crossrefs

Programs

  • Maple
    # returns the greatest common unitary divisor of m and n, A225174(m,n)
    f:=proc(m,n)
       local i,ans;
       ans:=1;
       for i from 1 to min(m,n) do
         if ((m mod i) = 0) and (igcd(i,m/i) = 1)  then
           if ((n mod i) = 0) and (igcd(i,n/i) = 1)  then ans:=i; fi;
         fi;
       od;
    ans; end;
    A116550:=proc(n)
      global f; local ct,m;
      ct:=0;
      if n = 1 then RETURN(1) else
      for m from 1 to n-1 do
        if f(m,n)=1 then ct:=ct+1; fi;
      od:
      fi;
      ct;
    end; # N. J. A. Sloane, May 01 2013
    A116550 := proc(n)
        local a,k;
        a := 0 ;
        for k from 1 to n do
            if A165430(k,n) = 1 then
                a := a+1 ;
            end if ;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 21 2016
  • Mathematica
    a[1] = 1; a[n_] := With[{pp = Power @@@ FactorInteger[n]}, Count[Range[n], m_ /; Intersection[pp, Power @@@ FactorInteger[m]] == {}]]; Table[a[n], {n, 1, 90}] (* Jean-François Alcover, Sep 05 2013 *)
    phi[x_, n_] := DivisorSum[n, MoebiusMu[#]*Floor[x/#] &]; a[n_] := DivisorSum[n, (-1)^PrimeNu[#]*phi[n/#, #] &, CoprimeQ[#, n/#] &]; Array[a, 100] (* Amiram Eldar, Jul 16 2022 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
    a(n) = if (n==1, 1, sum(k=1, n-1, gcud(n, k) == 1)); \\ Michel Marcus, Nov 09 2017
    
  • PARI
    phi(x,n) = sumdiv(n, d, moebius(d)*floor(x/d));
    a(n) = sumdiv(n, d, (gcd(d, n/d) == 1) * (-1)^omega(d) * phi(n/d,d)); \\ Amiram Eldar, Jul 16 2022

Formula

For n>1, if n = product{p=primes,p|n} p^b(n,p), where each b(n,p) is a positive integer, then a(n) is number of positive integers m, m < n, such that each b(m,p) does not equal b(n,p).
a(n) = Sum_{d|n, gcd(d,n/d)=1} (-1)^omega(d) * phi(x, n), where phi(x, n) = #{1 <= k <= x, gcd(k, n) = 1} = Sum_{d|n} mu(d) * floor(x/d) (Tóth, 2009). - Amiram Eldar, Jul 16 2022

Extensions

More terms from R. J. Mathar, Jan 23 2008
Entry revised by N. J. A. Sloane, May 01 2013

A225175 Largest number which requires n iterations of the bi-unitary totient function (A116550) to reach 1.

Original entry on oeis.org

1, 2, 3, 6, 10, 11, 12, 18, 30, 42, 78, 106, 210, 366, 550, 603, 750, 1290, 2562, 4398, 4305, 7470, 9090, 14322, 24558, 35382, 55482, 78020, 141190, 207519, 301642, 429870, 552693, 684846, 1060710, 1391390, 2385246, 3454044
Offset: 0

Views

Author

N. J. A. Sloane, May 01 2013

Keywords

Comments

a(26) >= 55482. a(27) >= 78020. - R. J. Mathar, May 05 2013

References

  • M. Lal, H. Wareham and R. Mifflin, Iterates of the bi-unitary totient function, Utilitas Math., 10 (1976), 347-350.

Crossrefs

Extensions

a(26)-a(37) from Donovan Johnson, Dec 07 2013

A225176 Number of numbers which require n iterations of the bi-unitary totient function (A116550) to reach 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 2, 4, 7, 6, 13, 12, 16, 24, 31, 51, 66, 87, 126, 139, 187, 260, 331, 412, 551, 693
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2013

Keywords

References

  • M. Lal, H. Wareham and R. Mifflin, Iterates of the bi-unitary totient function, Utilitas Math., 10 (1976), 347-350.

Crossrefs

A225320 The number of iterations of the bi-unitary totient A116550 needed to reach 1 starting with n.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 5, 6, 4, 5, 6, 7, 7, 7, 8, 9, 7, 8, 8, 8, 8, 9, 10, 11, 8, 9, 9, 10, 8, 9, 10, 10, 11, 12, 11, 12, 10, 10, 10, 11, 9, 10, 13, 12, 11, 12, 12, 13, 12, 13, 10, 11, 11, 10, 12, 10, 10, 11, 12, 13, 13, 14, 15, 13, 13, 14, 13, 14, 11, 12, 14, 15, 12, 13, 15, 14, 10, 11, 14
Offset: 1

Views

Author

R. J. Mathar, May 05 2013

Keywords

Examples

			a(6) = 3 because the first step is A116550(6) = 3, the second A116550(3) = 2, the third A116550(2) = 1, where 1 is reached.
		

Crossrefs

Cf. A005424 (positions of records), A116550.

Programs

  • Maple
    A225320 := proc(n)
        option remember;
        if n = 1 then
            0;
        else
            1+procname(A116550(n)) ;
        end if;
    end proc:
  • Mathematica
    A116550[1] = 1; A116550[n_] := With[{pp = Power @@@ FactorInteger[n]}, Count[Range[n], m_ /; Intersection[pp, Power @@@ FactorInteger[m]] == {}]]; a[n_] := a[n] = If[n == 1, 0, 1 + a[A116550[n]]]; Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Dec 16 2013 *)

Formula

The smallest x such that A116550^x(n) = 1, where the operation Op^x denotes x nestings of the operator Op.

A385747 Least number that reaches 1 after exactly n iterations of the infinitary analog of the totient function A384247.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 16, 17, 41, 73, 101, 197, 467, 829, 1109, 2761, 4849, 7831, 12401, 26189, 52379, 85853, 139589, 237007, 395533, 947043, 1967027, 3446033, 5396427, 9510437, 17502533, 35005067, 71202449, 90187609, 164664701, 395199461, 705113873, 1265735729, 1803553457
Offset: 0

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Comments

a(n) is the least number k such that A385744(k) = n.
Also, indices of records of A385744.

Examples

			  n | a(n) | iterations
  --+------+---------------------------
  1 |    2 | 2 -> 1
  2 |    3 | 3 -> 2 -> 1
  3 |    4 | 4 -> 3 -> 2 -> 1
  4 |    5 | 5 -> 4 -> 3 -> 2 -> 1
  5 |    9 | 9 -> 8 -> 4 -> 3 -> 2 -> 1
		

Crossrefs

Similar sequences: A003271, A005424, A007755, A333610.

Programs

  • Mathematica
    f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
    numiter[n_] := Length @ NestWhileList[iphi, n, # != 1 &] - 1;
    seq[len_] := Module[{s = {}, k = 0, i = 0}, While[Length[s] < len, k++; If[numiter[k] == i, AppendTo[s, k]; i++]]; s]; seq[25]
  • PARI
    iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));}
    numiter(n) = if(n ==  1, 0, 1 + numiter(iphi(n)));
    list(len) = {my(k = 0, i = 0, c = 0); while(c < len, k++; if(numiter(k) == i, c++; print1(k, ", "); i++));}
Showing 1-5 of 5 results.