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-10 of 12 results. Next

A101373 a(n) = A063740(A100827(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 19, 20, 22, 25, 28, 31, 34, 41, 42, 46, 52, 58, 59, 69, 74, 77, 83, 93, 99, 116, 130, 138, 140, 156, 165, 166, 167, 173, 192, 200, 218, 219, 223, 241, 242, 271, 276, 292, 304, 331
Offset: 1

Views

Author

Alonso del Arte, Jan 06 2005

Keywords

Comments

Record values attained by the highly cototient numbers. - Amiram Eldar, Apr 08 2023

Crossrefs

Extensions

More terms from Robert G. Wilson v, Jan 08 2005
Name corrected by Amiram Eldar, Apr 08 2023

A051953 Cototient(n) := n - phi(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 4, 3, 6, 1, 8, 1, 8, 7, 8, 1, 12, 1, 12, 9, 12, 1, 16, 5, 14, 9, 16, 1, 22, 1, 16, 13, 18, 11, 24, 1, 20, 15, 24, 1, 30, 1, 24, 21, 24, 1, 32, 7, 30, 19, 28, 1, 36, 15, 32, 21, 30, 1, 44, 1, 32, 27, 32, 17, 46, 1, 36, 25, 46, 1, 48, 1, 38, 35, 40, 17, 54, 1, 48, 27
Offset: 1

Views

Author

Labos Elemer, Dec 21 1999

Keywords

Comments

Unlike totients, cototient(n+1) = cototient(n) never holds -- except 2-phi(2) = 3 - phi(3) = 1 -- because cototient(n) is congruent to n modulo 2. - Labos Elemer, Aug 08 2001
Theorem (L. Redei): b^a(n) == b^n (mod n) for every integer b. - Thomas Ordowski and Robert Israel, Mar 11 2016
Let S be the sum of the cototients of the divisors of n (A001065). S < n iff n is deficient, S = n iff n is perfect, and S > n iff n is abundant. - Ivan N. Ianakiev, Oct 06 2023

Examples

			n = 12, phi(12) = 4 = |{1, 5, 7, 11}|, a(12) = 12 - phi(12) = 8, numbers not exceeding 12 and not coprime to 12: {2, 3, 4, 6, 8, 9, 10, 12}.
		

Crossrefs

Cf. A000010, A001065 (inverse Möbius transform), A005278, A001274, A083254, A098006, A049586, A051612, A053579, A054525, A062790 (Möbius transform), A063985 (partial sums), A063986, A290087.
Records: A065385, A065386.
Number of zeros in the n-th row of triangle A054521. - Omar E. Pol, May 13 2016
Cf. A063740 (number of k such that cototient(k) = n). - M. F. Hasler, Jan 11 2018

Programs

  • Haskell
    a051953 n = n - a000010 n  -- Reinhard Zumkeller, Jan 21 2014
    
  • Maple
    with(numtheory); A051953 := n->n-phi(n);
  • Mathematica
    Table[n - EulerPhi[n], {n, 1, 80}] (* Carl Najafi, Aug 16 2011 *)
  • PARI
    A051953(n) = n - eulerphi(n); \\ Michael B. Porter, Jan 28 2010
    
  • Python
    from sympy.ntheory import totient
    print([i - totient(i) for i in range(1, 101)]) # Indranil Ghosh, Mar 17 2017

Formula

a(n) = n - A000010(n).
Equals Mobius transform (A054525) of A001065. - Gary W. Adamson, Jul 11 2008
a(A006881(n)) = sopf(A006881(n)) - 1; a(A000040(n)) = 1. - Wesley Ivan Hurt, May 18 2013
G.f.: sum(n>=1, A000010(n)*x^(2*n)/(1-x^n) ). - Mircea Merca, Feb 23 2014
From Ilya Gutkovskiy, Apr 13 2017: (Start)
G.f.: -Sum_{k>=2} mu(k)*x^k/(1 - x^k)^2.
Dirichlet g.f.: zeta(s-1)*(1 - 1/zeta(s)). (End)
From Antti Karttunen, Sep 05 2018 & Apr 29 2022: (Start)
Dirichlet convolution square of A317846/A046644 gives this sequence + A063524.
a(n) = A003557(n) * A318305(n).
a(n) = A000010(n) - A083254(n).
a(n) = A318325(n) - A318326(n).
a(n) = Sum_{d|n} A062790(d) = Sum_{d|n, dA007431(d)*(A000005(n/d)-1).
a(n) = A048675(A318834(n)) = A276085(A353564(n)). [These follow from the formula below]
a(n) = Sum_{d|n, dA000010(d).
a(n) = A051612(n) - A001065(n).
(End)

A005278 Noncototients: numbers k such that x - phi(x) = k has no solution.

Original entry on oeis.org

10, 26, 34, 50, 52, 58, 86, 100, 116, 122, 130, 134, 146, 154, 170, 172, 186, 202, 206, 218, 222, 232, 244, 260, 266, 268, 274, 290, 292, 298, 310, 326, 340, 344, 346, 362, 366, 372, 386, 394, 404, 412, 436, 466, 470, 474, 482, 490, 518, 520
Offset: 1

Views

Author

Keywords

Comments

Browkin & Schinzel show that this sequence is infinite. - Labos Elemer, Dec 21 1999
If the strong Goldbach conjecture (every even number > 6 is the sum of at least 2 distinct primes p and q) is true, the sequence contains only even values, since p*q - phi(p*q) = p+q-1 and then every odd number can be expressed as x-phi(x). - Benoit Cloitre, Mar 03 2002
Browkin & Schinzel and Hee-sung Yang (Myerson link, problem 012.17d) ask if this sequence has a positive lower density. - Charles R Greathouse IV, Nov 04 2013
From Amiram Eldar, Feb 13 2021: (Start)
Sierpiński (1959) asked if this sequence is infinite.
Erdős (1973) asked if this sequence has a positive lower density.
Browkin and Schinzel (1995) proved that 509203*2^k is a term for all k>=1.
Flammenkamp and Luca (2000) proved that 509203 can be replaced with any other term of A263958 (and found 6 more terms of A263958).
Banks and Luca (2004) proved that the relative density of primes p within the sequence of primes such that 2*p is noncototient is 1. (End)

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer, 2004, section B36, pp. 138-142.
  • Wacław Sierpiński, Number Theory, Part II, PWN Warszawa, 1959 (in Polish).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006093, A126887, A263958. Complement of A051953.
Cf. A063740 (number of k such that cototient(k) = n).

Programs

  • Mathematica
    nmax = 520; cototientQ[n_?EvenQ] := (x = n; While[test = x - EulerPhi[x] == n ; Not[test || x > 2*nmax], x++]; test); cototientQ[n_?OddQ] = True; Select[Range[nmax], !cototientQ[#]&] (* Jean-François Alcover, Jul 20 2011 *)
  • PARI
    lista(nn)=v = vecsort(vector(nn^2, n, n - eulerphi(n)), ,8); for (n=1, nn, if (! vecsearch(v, n), print1(n, ", "))); \\ Michel Marcus, Oct 03 2016

Formula

{ k | A063740(k) = 0 }. - M. F. Hasler, Jan 11 2018

Extensions

More terms from Jud McCranie, Jan 01 1997

A063507 Least k such that k - phi(k) = n, or 0 if no such k exists.

Original entry on oeis.org

2, 4, 9, 6, 25, 10, 15, 12, 21, 0, 35, 18, 33, 26, 39, 24, 65, 34, 51, 38, 45, 30, 95, 36, 69, 0, 63, 52, 161, 42, 87, 48, 93, 0, 75, 54, 217, 74, 99, 76, 185, 82, 123, 60, 117, 66, 215, 72, 141, 0, 235, 0, 329, 78, 159, 98, 105, 0, 371, 84, 177, 122, 135, 96, 305, 90, 427
Offset: 1

Views

Author

Labos Elemer, Aug 09 2001

Keywords

Comments

Inverse cototient (A051953) sets represented by their minimum, as in A002181 for totient function. Impossible values (A005278) are replaced by zero.
If a(n) > 0, then it appears that a(n) > 1.26n. - T. D. Noe, Dec 06 2006

Examples

			x = InvCototient[24] = {36, 40, 44, 46}; Phi[x] = Phi[{36, 40, 44, 46}] = {12, 16, 20, 22}; x-Phi[x] = {24, 24, 24, 24}, so a(24) = Min[InvCototient[24]]; a(10) = 0 because 10 is in A005278.
		

Crossrefs

Cf. A063748 (greatest solution to x-phi(x)=n).
Cf. A063740 (number of k such that cototient(k) = n).

Programs

  • Mathematica
    Table[SelectFirst[Range[n^2 + 1], # - EulerPhi[#] == n &] /. k_ /; ! IntegerQ@ k -> 0, {n, 67}] (* Michael De Vlieger, Jan 11 2018 *)

Formula

a(n)-A051953(a(n)) = n if possible and a(n)=0 if n belongs to A005278.

Extensions

Edited by N. J. A. Sloane, Oct 25 2008 at the suggestion of R. J. Mathar

A362181 Number of numbers k such that A323410(k) = n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 1, 3, 1, 3, 2, 3, 3, 2, 2, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 5, 4, 5, 4, 5, 3, 4, 4, 5, 3, 5, 3, 5, 5, 5, 4, 6, 4, 6, 4, 6, 2, 7, 4, 6, 4, 6, 3, 7, 3, 5, 4, 6, 3, 8, 2, 6, 6, 7, 4, 8, 4, 6, 6, 7, 3, 9, 4, 7, 4, 5, 5, 9, 6, 9, 4, 7, 3
Offset: 2

Views

Author

Amiram Eldar, Apr 10 2023

Keywords

Comments

The offset is 2 since A323410(p) = 1 for all prime powers p (A246655).
a(0) = 1, since there is only one solution, x = 1, to A323410(x) = 0.

Crossrefs

Row lengths of A362180.
The unitary version of A063740.
Cf. A246655, A323410, A362182 (positions of 0's), A362183 (indices of records), A362184, A362185 (positions of 1's), A362186.
Similar sequences: A014197, A361967.

Programs

  • Mathematica
    ucototient[n_] := n - Times @@ (Power @@@ FactorInteger[n] - 1); ucototient[1] = 0; With[{max = 100}, ucot = Table[ucototient[n], {n, 1, max^2}]; Table[Length[Position[ucot, n]], {n, 2, max}] // Flatten]

Formula

a(A362182(n)) = 0.
a(A362185(n)) = 1.
a(A362186(n)) = n.

A362485 Number of numbers k such that iphi(k) = n, where iphi is the infinitary totient function A091732.

Original entry on oeis.org

2, 2, 2, 2, 0, 4, 0, 4, 0, 2, 0, 6, 0, 0, 2, 4, 0, 4, 0, 2, 0, 2, 0, 10, 0, 0, 0, 2, 0, 6, 0, 4, 0, 0, 0, 8, 0, 0, 0, 4, 0, 2, 0, 2, 2, 2, 0, 14, 0, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 10, 0, 0, 0, 4, 0, 4, 0, 0, 0, 2, 0, 14, 0, 0, 0, 0, 0, 2, 0, 8, 0, 2, 0, 4, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Apr 22 2023

Keywords

Comments

a(n) is even for all n, because if k is a solution to iphi(k) = n, and A007814(k) is even, then 2*k is also a solution, i.e., iphi(2*k) = n.

Crossrefs

Row lengths of A362484.
Cf. A007814, A091732, A362486 (positions of 0's), A362487 (indices of records).
Similar sequences: A014197, A063740, A361967, A362181.

Programs

  • Mathematica
    a[n_] := Length[invIPhi[n]]; Array[a, 100] (* using the function invIPhi from A362484 *)

Formula

a(A362486(n)) = 0.

A063741 Smallest number whose inverse cototient set has n elements.

Original entry on oeis.org

10, 0, 4, 8, 23, 35, 47, 59, 63, 83, 89, 113, 143, 119, 197, 167, 279, 233, 281, 209, 269, 323, 299, 359, 497, 329, 455, 605, 389, 461, 479, 419, 539, 599, 509, 755, 791, 713, 875, 797, 719, 629, 659, 1025, 1163, 929, 779, 1193, 1121, 899, 1133, 1091, 839
Offset: 0

Views

Author

Labos Elemer, Aug 13 2001

Keywords

Comments

Note that 1 is the only number that has infinitely many cototient-inverses, namely, all the primes.

Examples

			For n = 1, 2, 3, 4, 5, ..., the corresponding inverse sets are as follows: {}, {4}, {6, 8}, {12, 14, 16}, {95, 119, 143, 529}, {75, 155, 203, 299, 323}, ..., {455, 815, 1727, 2567, 2831, 4031, 4247, 4847, 5207, 6431, 6527, 6767, 6887, 7031, 27889}, including 0, 1, 2, 3, 4, 5, ..., 15 numbers.
		

Crossrefs

Cf. A000010, A051953 (cototient: n - phi(n)), A063507.
Cf. A063740 (number of k such that cototient(k) = n).

Programs

  • Mathematica
    With[{s = Array[Count[Range[#^2], k_ /; k - EulerPhi@ k == #] &, 300, 2]}, ReplacePart[TakeWhile[First@ FirstPosition[s, #] + 1 & /@ Range[0, Max@ s], IntegerQ], 2 -> 0]] (* Michael De Vlieger, Jan 11 2018 *)

Formula

a(n) = min {x: |InvCot(x)| = n}.
a(n) = min { k | A063740(k) = n }. - M. F. Hasler, Jan 11 2018

Extensions

More terms from David Wasserman, Jul 11 2002

A063748 Greatest x that is a solution to x-phi(x)=n or zero if there is no solution, where phi(x) is Euler's totient function.

Original entry on oeis.org

4, 9, 8, 25, 10, 49, 16, 27, 0, 121, 22, 169, 26, 55, 32, 289, 34, 361, 38, 85, 30, 529, 46, 133, 0, 187, 52, 841, 58, 961, 64, 253, 0, 323, 68, 1369, 74, 391, 76, 1681, 82, 1849, 86, 493, 70, 2209, 94, 589, 0, 667, 0, 2809, 106, 703, 104, 697, 0, 3481, 118, 3721, 122
Offset: 2

Views

Author

Labos Elemer, Aug 13 2001

Keywords

Comments

See A051953 for x-phi(x), the cototient function. Note that a(n)=0 for n in A005278. Also note that n=1 has an infinite number of solutions. If n is prime, then a(n)=n^2. If n is even, then a(n)<=2n. In particular, if n=p+1 for a prime p, then a(n)=2n-2. Also, if n=2^k, then a(n)=2n. If n>9 is odd and composite, then a(n)=pq, with p>q odd primes with p+q=n+1 and p-q minimal. We can take p=A078496((n+1)/2) and q=A078587((n+1)/2).

Examples

			For n=15, the solutions are x=39 and x=55, so a(15)=55. Note that 55=5*11 and 5+11=n+1.
		

Crossrefs

Cf. A063507 (least solution to x-phi(x)=n), A063740 (number of solutions to x-phi(x)=n).

Programs

  • Mathematica
    nn=10^4; lim=Floor[Sqrt[nn]]; mx=Table[0,{lim}]; Do[c=n-EulerPhi[n]; If[0T. D. Noe *)
    Table[Module[{k = n^2}, While[And[k - EulerPhi@ k != n, k > 0], k--];
    k], {n, 2, 62}] (* Michael De Vlieger, Mar 17 2017 *)

Formula

a(n)=Max{x : A051953(x)=n} if the inverse set is not empty; a(n)=0 if no inverse exists.

Extensions

Corrected and edited by T. D. Noe, Oct 30 2006

A362213 Irregular table read by rows in which the n-th row consists of all the numbers m such that cototient(m) = n, where cototient is A051953.

Original entry on oeis.org

4, 9, 6, 8, 25, 10, 15, 49, 12, 14, 16, 21, 27, 35, 121, 18, 20, 22, 33, 169, 26, 39, 55, 24, 28, 32, 65, 77, 289, 34, 51, 91, 361, 38, 45, 57, 85, 30, 95, 119, 143, 529, 36, 40, 44, 46, 69, 125, 133, 63, 81, 115, 187, 52, 161, 209, 221, 841, 42, 50, 58, 87, 247, 961
Offset: 2

Views

Author

Amiram Eldar, Apr 11 2023

Keywords

Comments

The offset is 2 since cototient(p) = 1 for all primes p.
The 0th row consists of one term, 1, since 1 is the only solution to cototient(x) = 0.

Examples

			The table begins:
  n   n-th row
  --  -----------
   2  4;
   3  9;
   4  6, 8;
   5  25;
   6  10;
   7  15, 49;
   8  12, 14, 16;
   9  21, 27;
  10
  11  35, 121;
  12  18, 20, 22;
		

Crossrefs

Programs

  • Mathematica
    With[{max = 50}, cot = Table[n - EulerPhi[n], {n, 1, max^2}]; row[n_] := Position[cot, n] // Flatten; Table[row[n], {n, 2, max}] // Flatten]

A072296 Least number starting a chain of exactly n consecutive even integers that do not have cototient-inverses.

Original entry on oeis.org

10, 50, 532, 2314, 4628, 22578, 115024, 221960, 478302, 3340304, 22527850, 117335136, 1118736102, 1564578508, 6121287812, 7515991946
Offset: 1

Views

Author

Robert G. Wilson v, Jul 12 2002

Keywords

Comments

If the strong Goldbach conjecture (every even number>6 is the sum of at least 2 distinct primes p and q) is true, sequence contains only even values. Since p*q-phi(p*q)=p+q-1 and then every odd number can be expressed as x-phi(x). - Benoit Cloitre, Mar 03 2002.

Examples

			Neither 50 nor 52 have cototient-inverses and since 50 is the first of the two and the least number with this property, a(2) = 50.
		

Crossrefs

Programs

  • Mathematica
    a = Table[0, {5*10^7}]; Do[b = n - EulerPhi[n]; If[ b < 5*10^7 + 1, a[[b/2]]++ ], {n, 2, 615437100}] (* used to find a(7) *) Do[ If[ a[[n]] == a[[n + 1]] == a[[n + 2]] == a[[n + 3]] == a[[n + 4]] == a[[n + 5]] == a[[n + 6]] == 0, Print[n]], {n, 1, 10^6}]

Extensions

a(12)-a(14) from Donovan Johnson, Jun 23 2010
a(15)-a(16) from Donovan Johnson, Jun 03 2013
Showing 1-10 of 12 results. Next