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!)
A291504 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. 0
1, 1, 0, 1, 3, 8, 48, 206, 1838, 13336, 133764, 1081556, 11046816, 108196128, 1555323224, 16279258144, 289771660328, 3495882548784, 66923393467216, 942785369844048, 15625264115770992, 315553823251866304, 5974132307015712032, 104979988889030774848 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
EXAMPLE
1 is not a prime,
1 + 3 is not a prime,
1 + 3 + 2 is not a prime,
1 + 3 + 2 + 4 is not a prime.
So [1, 3, 2, 4] satisfies all the conditions.
---------------------------------------------
a(1) = 1: [[1]];
a(3) = 1: [[1, 3, 2]];
a(4) = 3: [[1, 3, 2, 4], [1, 3, 4, 2], [4, 2, 3, 1]];
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]].
MATHEMATICA
Table[Count[Permutations@ Range@ n, _?(AllTrue[Accumulate@ #, ! PrimeQ@ # &] &)], {n, 0, 10}] (* Michael De Vlieger, Aug 26 2017 *)
CROSSREFS
Sequence in context: A210373 A247033 A309578 * A034183 A003216 A366755
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Aug 25 2017
EXTENSIONS
a(0), a(12)-a(23) from Alois P. Heinz, Aug 25 2017
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 April 18 15:48 EDT 2024. Contains 371780 sequences. (Running on oeis4.)