cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

User: Bennett Gardiner

Bennett Gardiner's wiki page.

Bennett Gardiner has authored 2 sequences.

A191798 Number of essentially different ways of arranging numbers 1 through 2*n around a circle so that the sums of each pair of adjacent numbers are neither all prime nor all composite.

Original entry on oeis.org

0, 2, 58, 2474, 180480, 19895936, 3105348340, 652948189204, 177662757810868, 60772232945639507, 25533219938917963508, 12921764841857675170314, 7754002391777621430686566
Offset: 1

Author

Bennett Gardiner, Jun 16 2011

Keywords

Comments

Finding a pattern, recurrence relation or explicit formula for this sequence would allow us to find terms in A191374 using terms from A051252, or vice versa.

Examples

			a(2) = 2 since the arrangements 1,3,2,4 and 1,3,4,2 both satisfy the condition.
		

Crossrefs

Formula

For n>1, a(n) = (2*n-1)!/2 - A051252(n) - A191374(n).

Extensions

a(7) corrected, a(8)-a(13) added by Max Alekseyev, Aug 19 2013

A191374 Number of ways (up to rotations and reflections) of arranging numbers 1 through 2n around a circle such that the sum of each pair of adjacent numbers is composite.

Original entry on oeis.org

0, 0, 1, 44, 912, 61952, 8160260, 888954284, 180955852060, 50317255621843, 12251146829850324, 4243527581615332664, 1602629887788636447221, 622433536382831426225696, 344515231090957672408413959
Offset: 1

Author

Bennett Gardiner, Jun 01 2011

Keywords

Comments

One of the obvious analogs of sequence A051252, which has the sums being prime. Presumably it is an open problem as to whether a(n) > 0 always for this problem as well.
The Guy reference deals with each adjacent pair summing to a prime. - T. D. Noe, Jun 08 2011

Examples

			a(3) = 1, the arrangement is 1,3,6,2,4,5.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, section C1.

Crossrefs

Cf. A051252.

Programs

  • MATLAB
    function D=primecirc(n)
    tic
    a = 2:2*n;
    A=perms(a);
    for i =1:factorial(2*n-1)
    B(i,:)=[1 A(i,:)];
    end
    for k=1:size(B,2)-1
        F(:,k) = B(:,k)+B(:,k+1);
    end
    if k>1
    F(:,k+1)=B(:,end)+B(:,1);
    end
    l=1;
    for i=1:factorial(2*n-1)
    if ~isprime(F(i,:)) == ones(1,length(B(1,:)))
    C(l,:)=B(i,:);
    l=l+1;
    end
    end
    if ~exist('C')
        D=0;
        return
    end
    if size(C,1)==1
    D=1;
    else
    D=size(C,1)/2;
    end
    toc

Formula

Bisection of A182540: a(n) = A182540(2*n). - Max Alekseyev, Aug 18 2013

Extensions

a(8)-a(15) from Max Alekseyev, Aug 19 2013