login

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

a(n) is the number of ways to arrange numbers from 1 to 2*n in a row, starting with 1, such that the sum of every two adjacent numbers is prime, but also considering the ends as adjacent.
0

%I #19 Feb 26 2020 00:39:52

%S 1,2,2,4,96,1024,2880,81024,770144,6309300,213812336,6395634044,

%T 165849732426,8050337724850,255709623233382

%N a(n) is the number of ways to arrange numbers from 1 to 2*n in a row, starting with 1, such that the sum of every two adjacent numbers is prime, but also considering the ends as adjacent.

%C When the size of the row is odd, it is impossible to find such an arrangement, so that sequence is only defined for even-sized rows.

%H Situ Zhengmei, <a href="https://zhuanlan.zhihu.com/p/85591313">Prime ring</a>, Chinese Math Blog.

%F a(n) = 2*A051252(n), for n > 1. - _Giovanni Resta_, Feb 25 2020

%e a(1) = 1, because of [1, 2].

%e a(2) = 2, because of [1, 2, 3, 4] and [1, 4, 3, 2].

%e a(3) = 2, because of [1, 4, 3, 2, 5, 6] and [1, 6, 5, 2, 3, 4].

%Y Cf. A036440, A051252, A051239, A242527, A242528.

%K nonn,more

%O 1,2

%A _Michel Marcus_, Feb 11 2018

%E a(9)-a(11) from _Jackson Bahm_, Feb 25 2020

%E a(12)-(15) from _Giovanni Resta_, using A051252, Feb 25 2020