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

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
Showing 1-2 of 2 results.