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.

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.

This page as a plain text file.
%I A165320 #25 Jun 26 2025 07:58:02
%S A165320 17,19,97,149,163,197,199,241,293,307,337,349,449,491,523,557,577,739,
%T A165320 773,811,881,883,991,1013,1051,1061,1151,1171,1249,1277,1279,1423,
%U A165320 1451,1459,1471,1493,1531,1549,1601,1637,1667,1693,1709,1733,1747,1861,1949
%N 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.
%H A165320 Amiram Eldar, <a href="/A165320/b165320.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%p A165320 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
%t A165320 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 *)
%t A165320 Select[Prime[Range[300]],NoneTrue[Log2[DivisorSigma[0,#+{1,-1}]],IntegerQ]&] (* _Harvey P. Dale_, May 03 2023 *)
%o A165320 (PARI) is1(k) = apply(x -> x >> valuation(x, 2), numdiv(k)) > 1;
%o A165320 isok(p) = isprime(p) && is1(p-1) && is1(p+1); \\ _Amiram Eldar_, Jun 26 2025
%Y A165320 Cf. A000005, A008328, A008329, A036537, A165318, A165319.
%K A165320 nonn
%O A165320 1,1
%A A165320 _Leroy Quet_, Sep 14 2009
%E A165320 More terms from _Robert G. Wilson v_ and _R. J. Mathar_, Sep 16 2009