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

A089451 a(n) = mu(prime(n)-1), where mu is the Moebius function (A008683).

Original entry on oeis.org

1, -1, 0, 1, 1, 0, 0, 0, 1, 0, -1, 0, 0, -1, 1, 0, 1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, 1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 1, 0, 1, 0, 0, 1, -1, 0, 0, 1, 0, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, 0, 0, 1, 1, 1, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 0, -1, 0, 0
Offset: 1

Views

Author

T. D. Noe, Nov 03 2003

Keywords

Comments

Note that A049092 lists prime(n) such that a(n) = 0. Similarly, A078330 lists prime(n) such that a(n) = -1. See A088179 for prime(n) such that a(n) = 1. Also note that a(n) == A088144(n) (mod prime(n)).

References

  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 236.

Crossrefs

Cf. A089495 (mu(p+1) for prime p), A089496 (mu(p+1)+mu(p-1) for prime p), A089497 (mu(p+1)-mu(p-1) for prime p).

Programs

  • Magma
    [MoebiusMu(NthPrime(n)-1): n in [1..100]]; // Vincenzo Librandi, Dec 23 2018
  • Mathematica
    Table[MoebiusMu[Prime[n]-1], {n, 150}]
  • PARI
    a(n)=moebius(prime(n)-1)
    

Formula

a(n) = A067460(n) - 1. - Benoit Cloitre, Nov 04 2003
If p = prime(n), then a(n) is congruent modulo p to the sum of all primitive roots modulo p. [Uspensky and Heaslet]. - Michael Somos, Feb 16 2020

A088179 Primes p such that mu(p-1) = 1; that is, p-1 is squarefree and has an even number of prime factors, where mu is the Moebius function.

Original entry on oeis.org

2, 7, 11, 23, 47, 59, 83, 107, 167, 179, 211, 227, 263, 331, 347, 359, 383, 463, 467, 479, 503, 547, 563, 571, 587, 691, 719, 839, 859, 863, 887, 911, 967, 983, 1019, 1123, 1187, 1231, 1283, 1291, 1303, 1307, 1319, 1327, 1367, 1439, 1483, 1487, 1523, 1619, 1723
Offset: 1

Views

Author

N. J. A. Sloane and T. D. Noe, Nov 03 2003

Keywords

Comments

It is an unsolved problem to determine if this sequence has a positive density in the primes. - Pieter Moree (moree(AT)mpim-bonn.mpg.de), Nov 03 2003
Except for the initial element 2, this sequence seems to be exactly those primes the sum of whose nonquadratic, nonprimitive-root residues is congruent to -1(mod p). - Dimitri Papadopoulos, Jan 10 2016

Crossrefs

Cf. A049092 (primes p with mu(p-1)=0), A078330 (primes p with mu(p-1)=-1), A089451 (mu(p-1) for prime p).
Cf. A002496.

Programs

  • Magma
    [n: n in [2..2000] | IsPrime(n) and MoebiusMu(n-1) eq 1]; // Vincenzo Librandi, Jan 10 2016
  • Maple
    filter:= proc(p) isprime(p) and numtheory:-mobius(p-1) = 1 end proc:
    select(filter, [2,seq(i,i=3..2000,2)]); # Robert Israel, Feb 03 2016
  • Mathematica
    Select[Prime[Range[400]], MoebiusMu[ #-1]==1&]
  • PARI
    lista(nn) = forprime(p=2, nn, if (moebius(p-1) == 1, print1(p, ", "))); \\ Michel Marcus, Jan 10 2016
    
  • PARI
    list(lim)=my(v=List(),last); forsquarefree(k=1,lim\1, if(moebius(k)==1, last=k[1], if(k[2][,2]==[1]~ && k[1]-last==1, listput(v,k[1])))); Vec(v) \\ Charles R Greathouse IV, Jan 08 2018
    

A049092 Primes p such that p-1 is not squarefree.

Original entry on oeis.org

5, 13, 17, 19, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 127, 137, 149, 151, 157, 163, 173, 181, 193, 197, 199, 229, 233, 241, 251, 257, 269, 271, 277, 281, 293, 307, 313, 317, 337, 349, 353, 373, 379, 389, 397, 401, 409, 421, 433, 449, 457, 461, 487
Offset: 1

Views

Author

Keywords

Comments

Primes p with mu(p-1)=0, where mu is the Möbius function. - T. D. Noe, Nov 03 2003
Primes p such that the sum of the primitive roots of p (see A088144) is 0 mod p. - Jon Wharf, Mar 12 2015
The relative density of this sequence within the primes is 1 - A005596 = 0.626044... - Amiram Eldar, Feb 10 2021

Examples

			p = 257 is here because p-1 = 256 = 2^8.
p = 997 is here because p-1 = 996 = 3*(2^2)*83.
		

Crossrefs

Cf. A005596, A039787, A078330 (primes p with mu(p-1)=-1), A088179 (primes p such that mu(p-1)=1), A089451 (mu(p-1) for prime p), A145199.

Programs

  • Magma
    [ p: p in PrimesUpTo(500) | not IsSquarefree(p-1) ]; // Vincenzo Librandi, Mar 12 2015
    
  • Mathematica
    Select[Prime[Range[400]], MoebiusMu[ #-1]==0&]
  • PARI
    forprime(p=2,500,if(!issquarefree(p-1),print(p))) \\ Michael B. Porter, Mar 16 2015

Formula

a(n) = A145199(n) + 1. - Amiram Eldar, Feb 10 2021

A244466 Nonprimes n such that mu(phi(n)) = 1.

Original entry on oeis.org

1, 9, 14, 18, 22, 46, 94, 118, 166, 214, 334, 358, 422, 454, 526, 662, 694, 718, 766, 926, 934, 958, 961, 1006, 1094, 1126, 1142, 1174, 1382, 1438, 1678, 1718, 1726, 1774, 1822, 1849, 1922, 1934, 1966, 2038, 2246, 2374, 2462, 2566, 2582, 2606, 2614, 2638, 2654, 2734, 2878, 2966, 2974, 3046
Offset: 1

Views

Author

Torlach Rush, Jun 28 2014

Keywords

Comments

Odd terms > 1 are the square of some prime: a(2) = 9 = 3^2, a(23) = 961 = 31^2, a(36) = 1849 = 43^2, ... .
Odd terms > 1 are A078330^2. Even terms are 2*A088179 and 2*A078330^2. - Robert Israel, Aug 01 2014

Examples

			9 is not prime, phi(9) = 6 and mu(6) = 1, mu(phi(9)) = 1, so 9 is here.
		

Crossrefs

Programs

  • C
    a(n) {return mu(phi(n))==1 ? n : ;}
    
  • Maple
    filter:= n -> not isprime(n) and numtheory:-mobius(numtheory:-phi(n))=1:
    select(filter, [$1..10000]); # Robert Israel, Aug 01 2014
  • Mathematica
    Select[Range[3200],
    And[MoebiusMu[EulerPhi[#]] == 1,
       Not[PrimeQ[#]]] &] (* Michael De Vlieger, Aug 06 2014 *)
  • PARI
    for(n=1,10^4,if(moebius(eulerphi(n))==1,print1(n,", "))) \\ Derek Orr, Aug 01 2014
    
  • Python
    from sympy import totient,factorint,primefactors,isprime
    [n for n in range(1,10**5) if n == 1 or (not isprime(n) and max(factorint(totient(n)).values()) < 2 and (-1)**len(primefactors(totient(n))) == 1)] # Chai Wah Wu, Aug 06 2014

A255199 Numbers k such that mu(k) = mu(phi(k)) where mu(k) is the Möbius function and phi(k) is Euler's totient function.

Original entry on oeis.org

1, 3, 8, 12, 14, 16, 20, 22, 24, 25, 27, 28, 31, 32, 36, 40, 43, 44, 45, 46, 48, 50, 52, 54, 56, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 81, 84, 88, 90, 92, 94, 96, 99, 100, 103, 104, 108, 112, 116, 117, 118, 120, 124, 125, 126, 128, 131, 132, 135, 136, 139
Offset: 1

Views

Author

Tom Edgar, Feb 16 2015

Keywords

Comments

If k and phi(k) are both not squarefree then k is in the list.
A prime p is in the list if p - 1 is squarefree and bigomega(p - 1) = A001222(p - 1) is odd.
It follows that the subsequence of primes is A078330. - Bernard Schott, Apr 03 2021

Examples

			8 is in the list since mu(8) = 0 and mu(phi(8)) = mu(4) = 0.
7 is not in the list since mu(7) = -1 and mu(phi(7)) = mu(6) = 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], MoebiusMu[#] == MoebiusMu[EulerPhi[#]] &] (* Alonso del Arte, Feb 16 2015 *)
  • PARI
    for(n=1, 140, if(moebius(n) == moebius(eulerphi(n)), print1(n,", "))) \\  Indranil Ghosh, Mar 11 2017
  • Sage
    [n for n in [1..1000] if moebius(n)==moebius(euler_phi(n))]
    

A244723 Nonprimes n such that, mu(n) = mu(phi(n)).

Original entry on oeis.org

1, 8, 12, 14, 16, 20, 22, 24, 25, 27, 28, 32, 36, 40, 44, 45, 46, 48, 50, 52, 54, 56, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 88, 90, 92, 94, 96, 99, 100, 104, 108, 112, 116, 117, 118, 120, 124, 125, 126, 128, 132, 135, 136, 140, 144, 147, 148, 150, 152, 153, 156, 160, 162, 164, 166
Offset: 1

Views

Author

Torlach Rush, Jul 04 2014

Keywords

Comments

Odd terms, with the exception of 1, are not squarefree. - Torlach Rush, Jul 22 2014.
2*p, where p is an odd prime, is in the sequence iff p is in A088179. - Robert Israel, Jul 31 2014

Crossrefs

Programs

  • Maple
    filter:= proc(n) uses numtheory;  not(isprime(n)) and mobius(n) = mobius(phi(n)) end proc;
    select(filter, [$1..1000]); # Robert Israel, Jul 31 2014
  • Mathematica
    searchMax = 200; Complement[Select[Range[searchMax], MoebiusMu[#] == MoebiusMu[EulerPhi[#]] &], Prime[Range[PrimePi[searchMax]]]] (* Alonso del Arte, Jul 05 2014 *)
    Select[Range[searchMax], !PrimeQ[#] && MoebiusMu[#] == MoebiusMu[EulerPhi[#]]& ] (* Zak Seidov, Jul 31 2014 *)
  • PARI
    for(n=1,10^3,if(!isprime(n)&&moebius(eulerphi(n))==moebius(n),print1(n,", "))) \\ Derek Orr, Jul 30 2014

A255219 Squarefree numbers k such that mu(k) = mu(phi(k)) where mu(k) is the Möbius function and phi(k) is Euler's totient function.

Original entry on oeis.org

1, 3, 14, 22, 31, 43, 46, 67, 71, 79, 94, 103, 118, 131, 139, 166, 191, 214, 223, 239, 283, 311, 334, 358, 367, 419, 422, 431, 439, 443, 454, 499, 526, 599, 607, 619, 643, 647, 659, 662, 683, 694, 718, 743, 766, 787, 823, 827, 907, 926, 934, 947, 958, 971, 1006
Offset: 1

Views

Author

Tom Edgar, Feb 17 2015

Keywords

Comments

A prime p is a term in the sequence if p - 1 is squarefree and bigomega(p - 1) = A001222(p - 1) is odd (see A078330).

Examples

			31 is a term since mu(31) = -1 and mu(phi(31)) = mu(30) = -1.
7 is not a term since mu(7) = -1 and mu(phi(7)) = mu(6) = 1.
24 is not a term since mu(24) = 0 (i.e., 24 is not squarefree).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Abs[MoebiusMu[#] + MoebiusMu[EulerPhi[#]]] == 2 &] (* Alonso del Arte, Feb 17 2015 *)
  • PARI
    for(n=1, 1006, if(abs(moebius(n) + moebius(eulerphi(n))) == 2, print1(n,", "))) \\ Indranil Ghosh, Mar 10 2017
  • Sage
    [n for n in [1..1006] if moebius(n)==moebius(euler_phi(n)) if moebius(n)!=0]
    

A096163 Primes p of the form qrs + 1 where q, r and s are distinct primes.

Original entry on oeis.org

31, 43, 67, 71, 79, 103, 131, 139, 191, 223, 239, 283, 311, 367, 419, 431, 439, 443, 499, 599, 607, 619, 643, 647, 659, 683, 743, 787, 823, 827, 907, 947, 971, 1031, 1039, 1087, 1091, 1103, 1163, 1223, 1259, 1399, 1427, 1447, 1499, 1511, 1543, 1559, 1571, 1579
Offset: 1

Views

Author

Rick L. Shepherd, Jun 18 2004

Keywords

Comments

Each composite number qrs = a(n)-1 is a squarefree 3-almost prime. This sequence is a subsequence of A078330 which, besides having 3 as its first term, first differs by including 2311 = 2*3*5*7*11 + 1 (a squarefree 5-almost prime plus 1).

Crossrefs

Cf. A078330 (primes p with mu(p-1) = -1).

Programs

  • Mathematica
    With[{nn=50},Take[Union[Select[Times@@@Subsets[Prime[Range[2nn]],{3}]+1,PrimeQ]],nn]] (* Harvey P. Dale, Jun 06 2021 *)
  • PARI
    /* Here are five equivalent PARI programs */ forprime(p=2,2400, if(moebius(p-1)==-1 && omega(p-1)==3, print1(p,","))) forprime(p=2,2400, if(moebius(p-1)==-1 && bigomega(p-1)==3, print1(p,","))) forprime(p=2,2400, if(bigomega(p-1)==3 && omega(p-1)==3, print1(p,","))) forprime(p=2,2400, if(omega(p-1)==3 && issquarefree(p-1), print1(p,","))) forprime(p=2,2400, if(bigomega(p-1)==3 && issquarefree(p-1), print1(p,",")))

A322665 Partial sums of A089451.

Original entry on oeis.org

1, 0, 0, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 1, 2, 2, 3, 3, 2, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, -1
Offset: 1

Views

Author

Jianing Song, Dec 22 2018

Keywords

Comments

a(n) is the number of primes p among the first n ones such that the sum of primitive roots is congruent to +1 modulo p minus the number of primes p among the first n ones such that the sum of primitive roots is congruent to -1 modulo p. Here, the prime number 2 is counted in the minuends but not in the subtrahends.
Although there are more positive terms among the first few ones, there are 5887 negative ones among the first 10000 terms, along with 237 zeros.
The largest terms among the first 10000 ones are a(n) = 41 for n in {8389, 8749, 8750, 8751, 8752, 8753}, and the smallest being a(n) = -41 for n in {4037, 4038, 4039, 4040, 4041, 4043, 4044, 4045, 4063, 4064, 4065, 4081, 4082, 4083, 4086, 4098, 4099, 4100}. What is the rate of growth for sup_{i=1..n} a(i) and inf_{i=1..n} a(i)?

Examples

			prime(11) = 31, mu(1) = mu(6) = mu(10) = mu(22) = +1, mu(2) = mu(30) = -1, so a(11) = 4 - 2 = 2.
prime(22) = 79, mu(1) = mu(6) = mu(10) = mu(22) = mu(46) = mu(58) = +1, mu(2) = mu(30) = mu(42) = mu(66) = mu(70) = mu(78) = -1, so a(22) = 6 - 6 = 0.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, moebius(prime(i)-1))
Showing 1-9 of 9 results.