login
Primes of the form k$ + 1 which are the greater of twin primes. Here '$' denotes the swinging factorial function (A056040).
3

%I #8 Mar 22 2020 23:41:07

%S 7,31,51481,1580132580471901

%N Primes of the form k$ + 1 which are the greater of twin primes. Here '$' denotes the swinging factorial function (A056040).

%C Subsequence of A163075 and of A006512.

%H Jinyuan Wang, <a href="/A163083/b163083.txt">Table of n, a(n) for n = 1..5</a>

%H Peter Luschny, <a href="http://www.luschny.de/math/primes/SwingingPrimes.html"> Swinging Primes.</a>

%p a := proc(n) select(s->isprime(s) and isprime(s-2), map(k -> A056040(k)+1,[$4..n])) end:

%t sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; Do[ If[ PrimeQ[p = sf[n] + 1] && PrimeQ[p - 2], Print["n = ", n, " p = ", p]], {n, 1, 400}] (* _Jean-François Alcover_, Jul 29 2013 *)

%Y Cf. A056040, A006512, A163075.

%K nonn

%O 1,1

%A _Peter Luschny_, Jul 21 2009