login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051239 Number of ways to arrange integers 1 through n so that the sum of each adjacent pair is prime, not counting reversals. 8
1, 1, 1, 4, 2, 8, 12, 30, 70, 664, 1072, 8768, 11648, 37108, 95772, 1059816, 2047488, 12111712, 22802028, 120779959, 337801784, 4361743860, 11425028900, 142573286216, 429917269469, 4138239848098, 16171519847028, 214845911686065 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Similar to A036440, but not requiring 1 to be first and n to be last.
LINKS
FORMULA
For n>1, a(n) = A103839(n)/2.
EXAMPLE
a(5)=2 since 1,4,3,2,5 and 3,4,1,2,5 have the property that the sum of each adjacent pair is prime.
CROSSREFS
Sequence in context: A321119 A246202 A134042 * A064821 A002291 A225872
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Max Alekseyev, Jan 04 2008
a(25)-a(28) from Giovanni Resta, Apr 01 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 13:42 EDT 2024. Contains 374377 sequences. (Running on oeis4.)