login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Odd primes p such that sigma(p)/2 is a power of an odd prime.
1

%I #19 Nov 14 2014 10:04:41

%S 5,13,17,37,53,61,73,97,157,193,241,277,313,337,397,421,457,541,577,

%T 613,661,673,733,757,877,997,1093,1153,1201,1213,1237,1249,1321,1381,

%U 1453,1621,1657,1753,1873,1933,1993,2017,2137,2341,2473

%N Odd primes p such that sigma(p)/2 is a power of an odd prime.

%C Equivalently odd prime numbers p in increasing order such that p is of the form 2q^h - 1 for some odd prime number q and some positive integer h >= 1.

%H Charles R Greathouse IV, <a href="/A189411/b189411.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 5 one has a(5) = 53 since a(1) = 5, a(2) = 13, a(3) = 17, a(4) = 37 and 53 = 2 * 3^3 - 1 is the smallest prime p > 37 of the form p = 2 * q^h - 1, with q an odd prime and h >= 1 a positive integer.

%p with(numtheory):

%p a:= proc(n) option remember; local l, p;

%p p:= `if`(n=1, 2, a(n-1));

%p do p:= nextprime(p);

%p l:= ifactors(sigma(p)/2)[2];

%p if nops(l)=1 and l[1][1]<>2 then break fi

%p od; p

%p end:

%p seq(a(n), n=1..60); # _Alois P. Heinz_, Apr 22 2011

%t selQ[p_] := Module[{s, f}, s = DivisorSigma[1, p]/2; f = FactorInteger[s]; Length[f] == 1 && f[[1, 1]] > 2]; Select[Prime /@ Range[2, 400], selQ] (* _Jean-François Alcover_, Nov 22 2013 *)

%o (PARI) is(n)=isprime(n) && n>4 && n%4==1 && isprimepower((n+1)/2) \\ _Charles R Greathouse IV_, Nov 22 2013

%Y Subsequence of A002144.

%K nonn

%O 1,1

%A _Luis H. Gallardo_, Apr 21 2011

%E Simpler name from _Charles R Greathouse IV_, Nov 22 2013