Permuations & Inverses Have Coprime Adjacent Pairs

Max maxale at gmail.com
Mon Mar 20 23:50:01 CET 2006


On 3/20/06, Leroy Quet <qq-quet at mindspring.com> wrote:
> I just submitted:
> >%S A000001 0,2,2,8,4
> >%N A000001 Number of permutations of (1,2,3,...,n) where each of the (n-1)
> >adjacent pairs of elements sums to a prime.
> >%e A000001 For n = 5, we have the 4 permutations and the sums of adjacent
> >elements:
> >1,4,3,2,5 (1+4=5, 4+3=7, 3+2=5, 2+5=7)
> >3,4,1,2,5 (3+4=7, 4+1=5, 1+2=3, 2+5=7)
> >5,2,1,4,3 (5+2=7, 2+1=3, 1+4=5, 4+3=7)
> >5,2,3,4,1 (5+2=7, 2+3=5, 3+4=7, 4+1=5)
> >%O A000001 1
> >%K A000001 ,more,nonn,

First off, for n=1 it should 1 since permutation [1] satisfies the
property (there are no adjacent elements but that's fine).

> I wonder how slow/fast this sequence grows. When is the next 0? Did I
> calculate even these few terms correctly? Could someone please
> calculate/submit more terms when the sequence finally appears (after Neil
> gets back)?

My calculations give

1, 2, 2, 8, 4, 16, 24, 60, 140, 1328, 2144, 17536, 23296, 74216,
191544, 2119632, 4094976, 24223424, 45604056, 241559918

> Could someone calculate/submit the sequence of number of such
> permutations where the first and last elements must sum to a prime too
> (and so every odd term after the first is 0)?

Up to rotations these numbers are

1, 1, 0, 2, 0, 2, 0, 4, 0, 96, 0, 1024, 0, 2880, 0, 81024, 0, 770144, 0, 6309300

Max






More information about the SeqFan mailing list