OFFSET
1,1
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
EXAMPLE
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.
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 *)
PROG
(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
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 23 2016
STATUS
approved