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-3 of 3 results.

A058339 Number of solutions to 1 + phi(x) = prime(n), where phi is A000010.

Original entry on oeis.org

2, 3, 4, 4, 2, 6, 6, 4, 2, 2, 2, 8, 9, 4, 2, 2, 2, 9, 2, 2, 17, 2, 2, 6, 17, 4, 2, 2, 9, 6, 2, 2, 2, 2, 2, 2, 7, 4, 2, 2, 2, 10, 2, 21, 2, 2, 2, 2, 2, 2, 6, 2, 31, 2, 10, 2, 2, 2, 9, 8, 2, 2, 2, 2, 16, 2, 2, 18, 2, 6, 12, 2, 2, 2, 2, 2, 2, 13, 13, 6, 2, 13, 2, 34
Offset: 1

Views

Author

Labos Elemer, Dec 14 2000

Keywords

Examples

			The equation phi(x) = p-1 always has at least 2 solutions: p and 2p a prime and a composite. Many times more than 2 x gives phi(x) = p-1. For p-1 = 96 there are 17 (that is, an odd number of) solutions: {97, 119, 153, 194, 195, 208, 224, 238, 260, 280, 288, 306, 312, 336, 360, 390, 420}, 4 odd and 13 even numbers while for p-1 = 100 there are 4 (an even number of) solutions: {101, 125, 202, 250}. For all odd solutions x, 2x is also a solution.
1+phi(x) = 11 has 2 solutions: 11 and 22; 1+phi(x) = 241 has 31 solutions: x = {241, 287, 305, 325, 369, 385, 429, 465, 482, 488, 495, 496, 525, 572, 574, 610, 616, 620, 650, 700, 732, 738, 744, 770, 792, 858, 900, 924, 930, 990, 1050}.
		

Crossrefs

Programs

  • Maple
    with(numtheory): >[seq(nops(invphi(-1+ithprime(i))),i=1..256)];
  • Mathematica
    Needs["CNT`"]; Table[Length[PhiInverse[Prime[n] - 1]], {n, 100}] (* T. D. Noe, Dec 11 2013 *)
    Take[Length /@ Values@ KeySelect[KeyMap[# + 1 &, PositionIndex@ Array[EulerPhi, 10^4]], PrimeQ], 84] (* Michael De Vlieger, Dec 29 2017 *)
  • PARI
    a(n) = invphiNum(prime(n) - 1); \\ Amiram Eldar, Aug 18 2024, using Max Alekseyev's invphi.gp

Formula

a(n) = A210500(n) + A210501(n). - Arkadiusz Wesolowski, Jan 19 2013

Extensions

Offset corrected by Arkadiusz Wesolowski, Jan 19 2013

A210501 Number of odd solutions to phi(k) = prime(n) - 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 4, 1, 1, 6, 1, 1, 2, 4, 2, 1, 1, 4, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 5, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, 10, 1, 1, 1, 1, 1, 4, 3, 1, 1, 1, 1, 6, 1, 1, 5, 1, 3, 3, 1, 1, 1, 1, 1, 1, 6, 4, 2, 1, 6, 1, 11, 1, 1, 3
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 19 2013

Keywords

Comments

a(n) <= A210500(n).

Examples

			The set {k: phi(k) = 12} is {13, 21, 26, 28, 36, 42}. Thus, if phi(k) = prime(6) - 1, the equation has exactly two odd solutions. Hence, a(6) = 2.
		

References

  • Alexander S. Karpenko, Lukasiewicz's Logics and Prime Numbers, Luniver Press, Beckington, 2006, pp. 52-56.

Crossrefs

Programs

  • Mathematica
    r = 87; lst1 = Table[EulerPhi[n], {n, (Prime[r] - 1)^2 + 1}]; lst2 = {}; Do[p = Prime[n]; AppendTo[lst2, Length@Select[Flatten@Position[Take[lst1, {p - 1, (p - 1)^2 + 1}], Prime[n] - 1], EvenQ]], {n, r}]; lst2

Formula

a(n) = A058339(n) - A210500(n).

A210502 a(1) = 1, a(n) = A210501(n) - 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 2, 1, 0, 0, 0, 3, 0, 0, 5, 0, 0, 1, 3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 9, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 5, 0, 0, 4, 0, 2, 2, 0, 0, 0, 0, 0, 0, 5, 3, 1, 0, 5, 0, 10, 0, 0, 2
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 20 2013

Keywords

Comments

Number of odd solutions to phi(k) = prime(n) - 1, except k = prime(n).

References

  • Alexander S. Karpenko, Lukasiewicz's Logics and Prime Numbers, Luniver Press, Beckington, 2006, pp. 52-56.

Crossrefs

Formula

a(1) = 1, a(n) = A058339(n) - A210500(n) - 1.
Showing 1-3 of 3 results.