Number of ways of writing the numbers 1 .. n in a sequence so that the sum of any two adjacent numbers is a prime; reversing the sequence does not count as different.

A064821

Number of ways of writing the numbers 1 .. n in a sequence so that the sum of any two adjacent numbers is a prime; reversing the sequence does not count as different.

Terms

    a(0) =0a(1) =1a(2) =1a(3) =4a(4) =2a(5) =8a(6) =12a(7) =30a(8) =70a(9) =664a(10) =1072a(11) =8768a(12) =11648a(13) =37108a(14) =95772a(15) =1059816a(16) =2047488a(17) =12111712a(18) =22802028a(19) =120779959a(20) =337801784a(21) =4361743860a(22) =11425028900a(23) =142573286216a(24) =429917269469

External references