login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A036440 Number of ways of arranging row n of the prime pyramid. 6
1, 1, 1, 1, 1, 1, 2, 4, 7, 24, 80, 216, 648, 1304, 3392, 13808, 59448, 155464, 480728, 1588162, 5626309, 28279112, 157469880, 842498189, 4998554801, 28466978744, 166572523589 (list; graph; refs; listen; history; internal format)
OFFSET

1,7

COMMENTS

Number of ways to arrange numbers from 1 to n in a row, starting with 1 and ending with n, such that the sum of every two adjacent numbers is prime.

From Daniel Forgues, May 18 2011: (Start)

Since the sum of any two adjacent entries is at least 3, the sum is thus an odd prime, which implies that any two consecutive entries have opposite parity. Since the first and last entries of row n are fixed to 1 and n, we have to find n-2 entries, where ceiling((n-2)/2) are even and floor((n-2)/2) are odd, so for row n the number of arrangements to investigate is

    (ceiling((n-2)/2))! * (floor((n-2)/2))!   (Cf. A010551(n-2), n >= 2)

Prime pyramids are also (more fittingly?) called prime triangles. (End)

REFERENCES

R. K. Guy, Unsolved Problems Number Theory, C1.

LINKS

Eric Weisstein's World of Mathematics, Prime Triangle

EXAMPLE

a(8)=4 because of the 720 permutations P of {1,2,3,4,5,6,7,8) with first element 1 and last element 8, these four satisfy the "prime pyramid" condition that P[ i ]+P[ i+1 ] be prime for i=1..7:

1 2 3 4 7 6 5 8; (lexicographically earliest row 8)

1 2 5 6 7 4 3 8;

1 4 7 6 5 2 3 8;

1 6 7 4 3 2 5 8.

For row 8, there are 6! = 720 permutations of {2,3,4,5,6}, but if we take into account that the parity of all entries of row n must alternate, we only have to consider ceiling((8-2)/2)! * floor((8-2)/2)! = 36 cases.

CROSSREFS

Cf. A051237 for lexicographically earliest prime pyramid.

Sequence in context: A059501 A138049 A099387 * A103001 A179386 A065846

Adjacent sequences:  A036437 A036438 A036439 * A036441 A036442 A036443

KEYWORD

nonn,nice

AUTHOR

John W. Layman (layman(AT)math.vt.edu)

EXTENSIONS

More terms from Jud McCranie (JudMcCranie(AT)ugaalum.uga.edu)

a(25..27) from Max Alekseyev (maxale(AT)gmail.com), Jan 05 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 08:04 EST 2012. Contains 205883 sequences.