login
A097277
a(n) = number of permutations <p(1), p(2), ..., p(n)> of <1, 2, ..., n>, such that p(k) > p(k-1) when k is composite and p(k) < p(k-1) when k is prime.
1
1, 1, 1, 3, 9, 35, 155, 791, 2590, 6756, 59091, 414986, 3520583, 31103150, 168701533, 701447397, 9487636929, 99912639989, 1238924779043, 15635917876565, 118729653870976, 678787849773474, 12421571493668547, 174412390122722852
OFFSET
1,4
COMMENTS
Sequence suggested by Leroy Quet.
FORMULA
a(n) = n-th row sum of A097278.
EXAMPLE
a(4) = 3: the 3 permutations are <3,2,1,4>, <4,2,1,3> and <4,3,1,2>.
CROSSREFS
Sequence in context: A074507 A217924 A030268 * A034428 A338793 A370341
KEYWORD
easy,nonn,less
AUTHOR
David Wasserman, Aug 05 2004
STATUS
approved