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 16 results. Next

A103664 Primes p such that the number of divisors of p-1 is less than the number of divisors of p+1.

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 29, 47, 53, 59, 71, 79, 83, 89, 107, 131, 139, 149, 167, 173, 179, 191, 197, 223, 227, 233, 239, 251, 263, 269, 293, 311, 317, 347, 359, 367, 383, 389, 419, 431, 439, 443, 449, 461, 467, 479, 499, 503, 509, 557, 563, 569, 587, 593, 599, 607
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Mathematica coding by Wouter Meeussen and Robert G. Wilson v.

Examples

			a(1)=2 because d(1)=1 < d(3)=2; a(2)=3 because d(2)=2 < d(4)=3.
		

Crossrefs

Cf. A008328 number of divisors of p-1, A008329 number of divisors of p+1, A103665, A103666, A103667.

Programs

  • Maple
    with(numtheory): p:=proc(n) if isprime(n) and tau(n-1)Emeric Deutsch, Feb 22 2005
  • Mathematica
    Select[Prime[Range[1, 140]], Length[Divisors[ # - 1]] < Length[Divisors[ # + 1]] &]
    Select[Prime[Range[200]],DivisorSigma[0,#-1]Harvey P. Dale, May 31 2019 *)

A103665 Primes p such that the number of divisors of p-1 is greater than the number of divisors of p+1.

Original entry on oeis.org

13, 31, 37, 43, 61, 67, 73, 97, 101, 109, 113, 127, 151, 157, 163, 181, 193, 211, 229, 241, 257, 271, 277, 281, 283, 313, 331, 337, 353, 373, 379, 397, 401, 409, 421, 433, 457, 463, 487, 521, 523, 541, 547, 571, 577, 601, 613, 617, 631, 641, 661, 673, 677
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Mathematica coding by Wouter Meeussen and Robert G. Wilson v.

Examples

			a(1)=13 because d(12)=6 > d(14)=4.
		

Crossrefs

Cf. A008328 number of divisors of p-1, A008329 number of divisors of p+1, A103664, A103666, A103667.

Programs

  • Mathematica
    Select[Prime[Range[2, 140]], Length[Divisors[ # - 1]] > Length[Divisors[ # + 1]] &]
    Select[Prime[Range[200]],DivisorSigma[0,#-1]>DivisorSigma[0,#+1]&] (* Harvey P. Dale, Aug 21 2022 *)
  • PARI
    forprime (k=2,700,if(numdiv(k-1)>numdiv(k+1),print1(k,", ")))
    \\ Hugo Pfoertner, Nov 30 2017

A103199 Primes p such that p-1 has more divisors than any smaller prime-1.

Original entry on oeis.org

2, 3, 5, 7, 13, 31, 37, 61, 181, 241, 421, 1009, 1321, 1801, 2161, 2521, 6301, 7561, 12601, 15121, 20161, 30241, 45361, 55441, 100801, 110881, 196561, 332641, 498961, 786241, 982801, 1108801, 1580041, 1940401, 1995841, 2402401, 3880801, 4324321, 11476081, 11531521
Offset: 1

Views

Author

Don Reble, Mar 19 2005

Keywords

Comments

There are infinitely many primes p such that d(p-1) > exp(c*log(p)/log(log(p))), where d(k) is the number of divisors of k, and c > 0 is a constant (Prachar, 1955). Therefore, this sequence is infinite. - Amiram Eldar, Apr 16 2024

Crossrefs

Programs

  • Mathematica
    seq[pmax_] := Module[{d, dm = 0, s = {}, p = 1}, While[p < pmax, p = NextPrime[p]; d = DivisorSigma[0, p-1]; If[d > dm, dm = d; AppendTo[s, p]]]; s]; seq[10^6] (* Amiram Eldar, Apr 16 2024 *)
  • PARI
    lista(pmax) = {my(dm = 0, d); forprime(p = 1, pmax, d = numdiv(p-1); if(d > dm, dm = d; print1(p, ", ")));} \\ Amiram Eldar, Apr 16 2024

Extensions

a(38)-a(40) added and name clarified by Amiram Eldar, Apr 16 2024

A145337 a(n) = d(p(n)+1) - d(p(n)-1), where d(m) = the number of divisors of m, p(n) = the n-th prime.

Original entry on oeis.org

1, 1, 1, 0, 2, -2, 1, 0, 4, 2, -2, -5, 0, -2, 6, 2, 8, -8, -2, 4, -8, 2, 8, 4, -6, -1, 0, 8, -4, -2, -4, 4, 0, 4, 6, -4, -8, -4, 12, 2, 14, -10, 6, -10, 3, 0, -10, 4, 8, -4, 4, 12, -14, 10, -1, 12, 10, -6, -8, -8, -2, 6, 0, 8, -12, 2, -10, -14, 8, 0, -4, 20, 2, -4, -4, 12, 10, -14, -7, -8
Offset: 0

Views

Author

Leroy Quet, Oct 08 2008

Keywords

Crossrefs

Programs

Formula

a(n) = A008329(n) - A008328(n). - R. J. Mathar, Oct 10 2008

Extensions

More terms from R. J. Mathar and Ray Chandler, Oct 10 2008

A165318 Primes p where the number of divisors of p-1 is a power of 2.

Original entry on oeis.org

2, 3, 7, 11, 23, 31, 41, 43, 47, 59, 67, 71, 79, 83, 89, 103, 107, 131, 137, 139, 167, 179, 191, 211, 223, 227, 233, 239, 251, 263, 271, 281, 283, 311, 313, 331, 347, 359, 367, 379, 383, 409, 419, 431, 439, 443, 457, 463, 467, 479, 499, 503, 521, 547, 563, 569
Offset: 1

Views

Author

Leroy Quet, Sep 14 2009

Keywords

Crossrefs

Programs

  • Maple
    isA000079 := proc(n) RETURN( n=1 or numtheory[factorset](n) = {2}) ; end: A165318 := proc(n) if n = 1 then 2; else p := nextprime(procname(n-1)) ; while not isA000079(numtheory[tau](p-1)) do p := nextprime(p) ; od; p ; fi; end: seq(A165318(n),n=1..90) ; # R. J. Mathar, Sep 18 2009
  • Mathematica
    Select[Prime[Range[200]],IntegerQ[Log[2,DivisorSigma[0,#-1]]]&] (* Harvey P. Dale, Oct 14 2018 *)
  • PARI
    isok(p) = isprime(p) && apply(x -> x >> valuation(x, 2), numdiv(p-1)) == 1; \\ Amiram Eldar, Jun 26 2025

Extensions

More terms from R. J. Mathar, Sep 18 2009

A165320 Primes p where neither the number of divisors of p+1 nor the number of divisors of p-1 is a power of 2.

Original entry on oeis.org

17, 19, 97, 149, 163, 197, 199, 241, 293, 307, 337, 349, 449, 491, 523, 557, 577, 739, 773, 811, 881, 883, 991, 1013, 1051, 1061, 1151, 1171, 1249, 1277, 1279, 1423, 1451, 1459, 1471, 1493, 1531, 1549, 1601, 1637, 1667, 1693, 1709, 1733, 1747, 1861, 1949
Offset: 1

Views

Author

Leroy Quet, Sep 14 2009

Keywords

Crossrefs

Programs

  • Maple
    isA000079 := proc(n) RETURN( n=1 or numtheory[factorset](n) = {2}) ; end: isA165320 := proc(n) RETURN ( isprime(n) and not isA000079(numtheory[tau](n-1)) and not isA000079(numtheory[tau](n+1)) ) ; end: for n from 1 to 10000 do if isA165320(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 18 2009
  • Mathematica
    fQ[n_] := Union[ IntegerQ@# & /@ Log[2, DivisorSigma[0, {n - 1, n + 1}]]] == {False}; Select[ Prime@ Range@ 300, fQ@# &] (* Robert G. Wilson v, Sep 16 2009 *)
    Select[Prime[Range[300]],NoneTrue[Log2[DivisorSigma[0,#+{1,-1}]],IntegerQ]&] (* Harvey P. Dale, May 03 2023 *)
  • PARI
    is1(k) = apply(x -> x >> valuation(x, 2), numdiv(k)) > 1;
    isok(p) = isprime(p) && is1(p-1) && is1(p+1); \\ Amiram Eldar, Jun 26 2025

Extensions

More terms from Robert G. Wilson v and R. J. Mathar, Sep 16 2009

A174842 Irregular triangle T(i,n) giving the number of elements of Zp having multiplicative order di, the i-th divisor of p-1, where p is the n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 2, 6, 6, 1, 1, 10, 10, 1, 1, 2, 6, 6, 12, 1, 1, 2, 4, 2, 4, 8, 8, 1, 1, 2, 2, 2, 6, 4, 6, 12, 1, 1, 2, 4, 4, 4, 8, 16, 1, 1, 2, 2, 6, 6, 12, 12, 1, 1, 22, 22, 1, 1, 2, 12, 12, 24, 1, 1, 28, 28, 1, 1, 2, 2, 4, 2, 4, 4, 8, 8
Offset: 1

Views

Author

T. D. Noe, Mar 30 2010

Keywords

Comments

The divisors of p-1 are assumed to be in increasing order. The first row, for prime 2, has only one term. All other rows begin with two 1s and end with phi(p-1). There are tau(p-1), the number of divisors of p-1, terms in each row. The sum of the terms in each row is p-1. When p is a prime of the form 4k-1, then the last two terms in the row are equal. When p is a prime of the form 4k+1, then the last two terms in the row have a ratio of 2.

Examples

			For prime p=17, the 7th prime, the multiplicative order of the numbers 1 to p-1 is 1, 8, 16, 4, 16, 16, 16, 8, 8, 16, 16, 16, 4, 16, 8, 2. There is one 1, one 2, two 4's, four 8's, and eight 16's. Hence row 7 is 1, 1, 2, 4, 8.
		

Crossrefs

A008328 (tau(p-1)), A008330 (phi(p-1)), A174843 (divisors of p-1)

Programs

  • Mathematica
    Flatten[Table[EulerPhi[Divisors[p-1]], {p, Prime[Range[100]]}]]

Formula

T(i,n) = phi(di), where di is the i-th divisor of prime(n)-1.

A079552 Record values in A079551.

Original entry on oeis.org

0, 1, 3, 6, 10, 14, 20, 25, 31, 35, 41, 49, 58, 66, 74, 78, 84, 88, 100, 108, 116, 128, 136, 140, 148, 160, 169, 177, 181, 193, 203, 215, 223, 231, 239, 245, 257, 269, 279, 283, 289, 293, 311, 319, 333, 342, 354, 370, 378, 382, 394, 402, 410, 430, 438, 447, 451, 457, 473
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2003

Keywords

Crossrefs

Partial sums of A008328.

Programs

  • Mathematica
    RecurrenceTable[{a[0]==0, a[n]==DivisorSigma[0,Prime[n]-1]+a[n-1]}, a, {n, 100}] (* Jon Maiga, Jan 02 2019 *)

Formula

a(n) = A000005(A006093(n)) + a(n-1). - Jon Maiga, Jan 02 2019

A145339 a(n) = the minimum of d(p(n)-1) and d(p(n)+1), where d(m) is the number of divisors of m and p(n) is the n-th prime.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 5, 6, 4, 6, 6, 4, 8, 6, 4, 6, 4, 4, 6, 8, 4, 8, 4, 8, 6, 8, 8, 4, 8, 8, 8, 8, 8, 8, 6, 8, 4, 6, 4, 6, 4, 8, 8, 4, 9, 12, 6, 8, 4, 8, 8, 8, 6, 8, 8, 4, 6, 10, 4, 8, 6, 6, 12, 8, 4, 6, 6, 6, 4, 12, 8, 4, 8, 8, 12, 4, 6, 4, 8, 8, 8, 4, 8, 8, 8, 8, 14, 4, 12, 10, 4, 4, 8, 12, 8, 4, 6, 12, 6, 4, 6
Offset: 1

Views

Author

Leroy Quet, Oct 08 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Min[DivisorSigma[0, Prime[n]-1], DivisorSigma[0, Prime[n]+1]], {n, 1, 100}] (* Stefan Steinerberger, Oct 11 2008 *)
  • PARI
    a(n) = my(p = prime(n)); min(numdiv(p-1), numdiv(p+1)); \\ Michel Marcus, Sep 28 2018

Extensions

More terms from Stefan Steinerberger and Ray Chandler, Oct 11 2008

A174843 Irregular triangle in which row n lists the divisors of prime(n)-1.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 3, 6, 1, 2, 5, 10, 1, 2, 3, 4, 6, 12, 1, 2, 4, 8, 16, 1, 2, 3, 6, 9, 18, 1, 2, 11, 22, 1, 2, 4, 7, 14, 28, 1, 2, 3, 5, 6, 10, 15, 30, 1, 2, 3, 4, 6, 9, 12, 18, 36, 1, 2, 4, 5, 8, 10, 20, 40, 1, 2, 3, 6, 7, 14, 21, 42, 1, 2, 23, 46, 1, 2, 4, 13, 26, 52, 1, 2, 29, 58, 1, 2, 3, 4
Offset: 1

Views

Author

T. D. Noe, Mar 30 2010

Keywords

Comments

Row n begins with 1, ends with prime(n)-1, and has A008328(n) terms.

Examples

			The first 10 rows:
  1
  1, 2
  1, 2, 4
  1, 2, 3, 6
  1, 2, 5, 10
  1, 2, 3, 4, 6, 12
  1, 2, 4, 8, 16
  1, 2, 3, 6, 9, 18
  1, 2, 11, 22
  1, 2, 4, 7, 14, 28
		

Crossrefs

Cf. A008328 (row lengths), A008332 (row sums).

Programs

  • Mathematica
    Flatten[Table[Divisors[p-1], {p, Prime[Range[100]]}]]
  • PARI
    row(n) = divisors(prime(n)-1); \\ Amiram Eldar, May 02 2025
Showing 1-10 of 16 results. Next