Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Aug 26 2017 13:17:21
%S 1,1,0,1,3,8,48,206,1838,13336,133764,1081556,11046816,108196128,
%T 1555323224,16279258144,289771660328,3495882548784,66923393467216,
%U 942785369844048,15625264115770992,315553823251866304,5974132307015712032,104979988889030774848
%N Number of permutations s_1,s_2,...,s_n of 1,2,...,n such that for all j=1,2,...,n, Sum_{i=1..j} s_i is not a prime.
%e 1 is not a prime,
%e 1 + 3 is not a prime,
%e 1 + 3 + 2 is not a prime,
%e 1 + 3 + 2 + 4 is not a prime.
%e So [1, 3, 2, 4] satisfies all the conditions.
%e ---------------------------------------------
%e a(1) = 1: [[1]];
%e a(3) = 1: [[1, 3, 2]];
%e a(4) = 3: [[1, 3, 2, 4], [1, 3, 4, 2], [4, 2, 3, 1]];
%e a(5) = 8: [[1, 3, 2, 4, 5], [1, 3, 4, 2, 5], [1, 5, 2, 4, 3], [1, 5, 4, 2, 3], [4, 2, 3, 1, 5], [4, 2, 3, 5, 1], [4, 5, 1, 2, 3], [4, 5, 3, 2, 1]].
%t Table[Count[Permutations@ Range@ n, _?(AllTrue[Accumulate@ #, ! PrimeQ@ # &] &)], {n, 0, 10}] (* _Michael De Vlieger_, Aug 26 2017 *)
%Y Cf. A067957, A291355.
%K nonn
%O 0,5
%A _Seiichi Manyama_, Aug 25 2017
%E a(0), a(12)-a(23) from _Alois P. Heinz_, Aug 25 2017