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.

A275598 Primes p such that the number of odd divisors of p-1 is a prime q which is equal to the number of odd divisors of p+1.

Original entry on oeis.org

11, 13, 23, 47, 193, 383, 577
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 23 2016

Keywords

Comments

Conjecture: this sequence is finite.
Any further terms are greater than 10^10. - Charles R Greathouse IV, Aug 22 2016
Any further terms are greater than 2 * 10^12. - Dana Jacobsen, Aug 30 2016

Examples

			11 is in this sequence because there are 2 odd divisors 1 and 5 of 10 and there are 2 odd divisors 1 and 3 of 12, and 2 is a prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(p) local r,q;
       r:= numtheory:-tau((p-1)/2^padic:-ordp(p-1,2));
       if not isprime(r) then return false fi;
       r = numtheory:-tau((p+1)/2^padic:-ordp(p+1,2))
    end proc:
    res:= NULL: p:= 0:
    while p < 1000 do
      p:= nextprime(p);
      if filter(p) then
        res:= res, p;
      fi;
    od:
    res; # Robert Israel, Aug 24 2016
  • Mathematica
    okQ[p_?PrimeQ] := Module[{r}, r = DivisorSigma[0, (p-1)/2^IntegerExponent[p-1, 2]]; If[!PrimeQ[r], Return[False]]; r == DivisorSigma[0, (p+1)/2^IntegerExponent[p+1, 2]]];
    Select[Prime[Range[1000]], okQ] (* Jean-François Alcover, Feb 09 2023, after Robert Israel *)
  • PARI
    f(n)=numdiv(n>>valuation(n,2))
    is(n)=if(!isprime(n), return(0)); my(q=f(n-1)); isprime(q) && f(n+1)==q \\ Charles R Greathouse IV, Aug 24 2016
  • Perl
    use ntheory ":all"; forprimes { $n1 = scalar(grep { $&1 } divisors($-1)); say if is_prime($n1) && $n1 == scalar(grep { $&1 } divisors($+1)); } 1e7; # Dana Jacobsen, Aug 24 2016