Permutations: Adjacent Elements Sum to Primes

Leroy Quet qq-quet at mindspring.com
Sat Mar 26 20:11:50 CET 2005


I wonder if this sequence is already in the database, perhaps with a 
different definition.

a(n) = number of permutations,[p(1),p(2),...,p(n)],
of [1,2,3,..,n] where p(1)+p(2), p(2)+p(3), p(3)+p(4),...,p(n-1)+p(n)
are each equal to primes.

I get, by hand, the sequence beginning
0, 2, 2, 8, 4,...

(offset = 1)

For example,
5, 2, 1, 4, 3
is a permutation included in the count for n=5.

thanks,
Leroy Quet





More information about the SeqFan mailing list