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.

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

This page as a plain text file.
%I A165318 #24 Jun 26 2025 07:58:08
%S A165318 2,3,7,11,23,31,41,43,47,59,67,71,79,83,89,103,107,131,137,139,167,
%T A165318 179,191,211,223,227,233,239,251,263,271,281,283,311,313,331,347,359,
%U A165318 367,379,383,409,419,431,439,443,457,463,467,479,499,503,521,547,563,569
%N A165318 Primes p where the number of divisors of p-1 is a power of 2.
%H A165318 Amiram Eldar, <a href="/A165318/b165318.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%p A165318 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
%t A165318 Select[Prime[Range[200]],IntegerQ[Log[2,DivisorSigma[0,#-1]]]&] (* _Harvey P. Dale_, Oct 14 2018 *)
%o A165318 (PARI) isok(p) = isprime(p) && apply(x -> x >> valuation(x, 2), numdiv(p-1)) == 1; \\ _Amiram Eldar_, Jun 26 2025
%Y A165318 Cf. A000005, A008328, A036537, A165319, A165320.
%K A165318 nonn
%O A165318 1,1
%A A165318 _Leroy Quet_, Sep 14 2009
%E A165318 More terms from _R. J. Mathar_, Sep 18 2009