

A242528


Number of cyclic arrangements of {0,1,...,n1} such that both the difference and the sum of any two neighbors are prime.


18



0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, 13, 62, 8, 133, 225, 209, 32, 2644, 4462, 61341, 113986, 750294, 176301, 7575912, 3575686, 7705362, 36777080, 108638048, 97295807
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,12


COMMENTS

a(n)=NPC(n;S;P) is the count of all neighborproperty cycles for a specific set S of n elements and a specific pairproperty P. For more details, see the link and A242519.
In this case the set is S={0 through n1}. For the same pairproperty P but the set S={1 through n}, see A227050.


LINKS

Table of n, a(n) for n=1..33.
S. Sykora, On NeighborProperty Cycles, Stan's Library, Volume V, 2014.


EXAMPLE

For n=12 (the first n for which a(n)>0) there are two such cycles:
C_1={0, 5, 2, 9, 4, 1, 6, 11, 8, 3, 10, 7},
C_2={0, 7, 10, 3, 8, 5, 2, 9, 4, 1, 6, 11}.


PROG

(C++) See the link.


CROSSREFS

Cf. A227050, A242519, A242520, A242521, A242522, A242523, A242524, A242525, A242526, A242527, A242529, A242530, A242531, A242532, A242533, A242534.
Sequence in context: A275837 A119510 A275725 * A137933 A143116 A115987
Adjacent sequences: A242525 A242526 A242527 * A242529 A242530 A242531


KEYWORD

nonn,hard,more,changed


AUTHOR

Stanislav Sykora, May 30 2014


EXTENSIONS

a(29)a(33) from Fausto A. C. Cariboni, May 20 2017


STATUS

approved



