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

A066078 Duplicate of A058339.

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

Views

Author

Keywords

A058340 Primes p such that phi(x) = p-1 has only 2 solutions, namely x = p and x = 2p.

Original entry on oeis.org

11, 23, 29, 31, 47, 53, 59, 67, 71, 79, 83, 103, 107, 127, 131, 137, 139, 149, 151, 167, 173, 179, 191, 197, 199, 211, 223, 227, 229, 239, 251, 263, 269, 271, 283, 293, 307, 311, 317, 331, 347, 359, 367, 373, 379, 383, 389, 419, 431, 439, 443, 463, 467, 479
Offset: 1

Views

Author

Labos Elemer, Dec 14 2000

Keywords

Comments

Two solutions, p and 2p, exist for all odd primes p; primes in sequence have no other solutions.
Conjecture: if q > 7 is in A005385, then q is in the sequence. - Thomas Ordowski, Jan 04 2017
Proof of conjecture: q'=(q-1)/2 is an odd prime > 3. If phi(x)=2q', which has 2-adic order 1 but is not a power of 2, there must be exactly one odd prime r dividing x. We could also have a factor of 2 (but no higher power, which would contribute more 2's to phi(x)). If x = r^e or 2r^e, then phi(x) = (r-1) r^(e-1). For this to be 2q' one possibility is r-1 = 2 and r^(e-1)=q', but then q'=r=3, ruled out by q > 7. The only other possibility is r-1=2q' and e=1, which makes r=q and x=q or 2q. - Robert Israel, Jan 04 2017
Information from Carl Pomerance: It is known that almost all primes (in the sense of relative asymptotic density) are in the sequence. - Thomas Ordowski, Jan 08 2017

Examples

			For p=2, phi(x)=1 has only two solutions, but they are 1 and 2, not 2 and 4, so 2 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n) and nops(numtheory:-invphi(n-1))=2:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Aug 12 2016
  • Mathematica
    Take[Rest@ Keys@ Select[KeySelect[KeyMap[# + 1 &, PositionIndex@ Array[EulerPhi, 10^4]], PrimeQ], Length@ # == 2 &], 54] (* Michael De Vlieger, Dec 29 2017 *)

Formula

a(n) ~ n log . - Charles R Greathouse IV, Nov 18 2022

Extensions

Edited by Ray Chandler, Jun 06 2008

A066071 Nonprime numbers k such that phi(k) + 1 is prime.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 14, 18, 21, 22, 26, 27, 28, 32, 34, 36, 38, 40, 42, 46, 48, 49, 54, 55, 57, 58, 60, 62, 63, 74, 75, 76, 77, 82, 86, 88, 91, 93, 94, 95, 98, 99, 100, 106, 108, 110, 111, 114, 115, 117, 118, 119, 122, 124, 125, 126, 132, 133, 134, 135, 142, 145, 146
Offset: 1

Views

Author

Labos Elemer, Dec 03 2001

Keywords

Comments

A039698 with the primes removed. For every prime p, 2p is in the sequence. - Ray Chandler, May 26 2008
Includes 3*p for p in A005382 and p^2 for p in A065508. - Robert Israel, Dec 29 2017

Examples

			Solutions to 1+phi(x)=13 are {13, 21, 26, 28, 36, 42} of which the 5 composites are in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] |not IsPrime(n) and IsPrime(EulerPhi(n)+1)]; // Vincenzo Librandi, Jul 02 2016
  • Maple
    select(n -> not isprime(n) and isprime(1+numtheory:-phi(n)), [$1..1000]); # Robert Israel, Dec 29 2017
  • Mathematica
    Select[Complement[Range@ #, Prime@ Range@ PrimePi@ #] &@ 150, PrimeQ[EulerPhi@ # + 1] &] (* Michael De Vlieger, Jul 01 2016 *)
  • PARI
    isok(k) = { !isprime(k) && isprime(eulerphi(k) + 1) } \\ Harry J. Smith, Nov 10 2009
    

A066077 a(n) is the number of x such that sigma(x)-1 is 0 or one of the first n-1 primes.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 10, 11, 14, 15, 17, 18, 21, 22, 25, 27, 30, 31, 32, 37, 38, 40, 43, 46, 48, 49, 51, 53, 54, 56, 58, 60, 61, 63, 64, 66, 67, 68, 74, 75, 79, 81, 86, 87, 88, 89, 90, 93, 96, 97, 100, 107, 108, 114, 115, 117, 120, 122, 123, 124, 125, 128, 130, 134, 135
Offset: 1

Views

Author

Labos Elemer, Dec 03 2001

Keywords

Comments

Former name was: Smallest x such that p(n) = Sigma[x] - 1. That did not match the Data. See A296375 for that sequence.

Crossrefs

Programs

  • Maple
    N:= 100: # To get a(1)..a(N)
    P:= ithprime(N-1):
    S:= select(t -> isprime(t) and t <= P,map(-1+numtheory:-sigma, [$1..P])):
    T:= Statistics:-Tally(sort(S),output=table):
    ListTools:-PartialSums([1,seq(T[ithprime(i)],i=1..N-1)]); # Robert Israel, Dec 27 2017
  • PARI
    first(n) = my(res = vector(n), a = 1); res[1] = 1; for(k=2, n, for(x=1, prime(k-1), if(prime(k-1) == (sigma(x) - 1), a++)); res[k] = a); res \\ Iain Fox, Dec 28 2017

Formula

a(n+1)-a(n) = A066075(n).

Extensions

Edited by Robert Israel, Dec 27 2017

A210500 Number of even solutions to phi(k) = prime(n) - 1.

Original entry on oeis.org

1, 2, 3, 2, 1, 4, 5, 2, 1, 1, 1, 5, 6, 2, 1, 1, 1, 5, 1, 1, 11, 1, 1, 4, 13, 2, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 4, 2, 1, 1, 1, 5, 1, 17, 1, 1, 1, 1, 1, 1, 4, 1, 21, 1, 9, 1, 1, 1, 5, 5, 1, 1, 1, 1, 10, 1, 1, 13, 1, 3, 9, 1, 1, 1, 1, 1, 1, 7, 9, 4, 1, 7, 1, 23, 1, 1, 9
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 19 2013

Keywords

Comments

a(n) >= A210501(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 four even solutions. Hence, a(6) = 4.
		

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 + 2}]; lst2 = {}; Do[p = Prime[n]; AppendTo[lst2, Length@Select[Flatten@Position[Take[lst1, {p - 1, (p - 1)^2 + 2}], Prime[n] - 1], OddQ]], {n, r}]; lst2

Formula

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

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.

A068014 Nonprimes n such that 1+phi(n) and -1 + sigma(n) are prime numbers.

Original entry on oeis.org

6, 10, 14, 21, 26, 34, 38, 40, 46, 55, 57, 58, 60, 63, 74, 76, 86, 88, 93, 111, 114, 117, 118, 124, 126, 135, 145, 153, 158, 166, 178, 184, 186, 190, 194, 198, 206, 208, 209, 216, 221, 224, 230, 232, 238, 250, 252, 254, 260, 266, 270, 278, 280, 295, 297, 298
Offset: 1

Views

Author

Labos Elemer, Feb 08 2002

Keywords

Comments

1+A000010(n) and -1+A000203(n) are primes but n is nonprime.

Examples

			For n = 38, phi(38) + 1 = 19 and sigma(38) - 1 = 1 + 2 + 19 + 38 - 1 = 59. [corrected by _Peter Munn_, Dec 30 2017]
		

Crossrefs

Programs

  • Mathematica
    Do[s=-1+DivisorSigma[1, n]; s1=1+EulerPhi[n]; If[PrimeQ[s]&&PrimeQ[s1]&&!PrimeQ[n], Print[{n, s1, s}]], {n, 1, 1000}] (* generates sequence and related primes too *)
    Select[Range@ 300, And[CompositeQ@ #, AllTrue[{1 + EulerPhi@ #, -1 + DivisorSigma[1, #]}, PrimeQ]] &] (* Michael De Vlieger, Dec 29 2017 *)
  • PARI
    isok(n) = !isprime(n) && isprime(1+eulerphi(n)) && isprime(sigma(n)-1); \\ Michel Marcus, Dec 29 2017
Showing 1-8 of 8 results.