login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097278 Triangle read by rows: T(n, k) = number of permutations <p(1), p(2), ..., p(n)> of <1, 2, ..., n> that end with k, such that p(k) > p(k-1) when k is composite and p(k) < p(k-1) when k is prime. (n > 0, 1 <= k <= n). 1
1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 3, 3, 2, 1, 0, 0, 3, 6, 8, 9, 9, 35, 35, 32, 26, 18, 9, 0, 0, 35, 70, 102, 128, 146, 155, 155, 0, 0, 35, 105, 207, 335, 481, 636, 791, 0, 0, 0, 35, 140, 347, 682, 1163, 1799, 2590, 6756, 6756, 6756, 6756, 6721, 6581, 6234, 5552, 4389, 2590, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,11

LINKS

Table of n, a(n) for n=1..66.

FORMULA

T(1, 1) = 1, T(n, k) = sum(i = k..(n-1), T(n-1, i)) if n is prime, T(n, k) = sum(i = 1..(k-1), T(n-1, i)) if n is composite.

EXAMPLE

T(5, 2) = 3: the 3 permutations are <4,3,1,5,2>, <5,3,1,4,2> and <5,4,1,3,2>.

CROSSREFS

Cf. A097277.

Sequence in context: A016037 A106449 A256522 * A254411 A056223 A261143

Adjacent sequences:  A097275 A097276 A097277 * A097279 A097280 A097281

KEYWORD

easy,nonn,tabl,less

AUTHOR

David Wasserman, Aug 05 2004

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 16:34 EDT 2021. Contains 348065 sequences. (Running on oeis4.)