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!)
A263987 Number of ways of ordering integers 1 to n such that each number is either a factor of or larger than its predecessor. 0
1, 2, 4, 14, 28, 164, 328, 2240, 9970, 63410, 126820, 1810514, 3621028, 31417838, 294911038, 3344414606, 6688829212, 121919523980, 243839047960, 5307482547686, 56885719183654 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

EXAMPLE

For n=4, the allowable sequences are: (1,2,3,4), (1,3,4,2), (1,4,2,3), (2,1,3,4), (2,3,1,4), (2,3,4,1), (2,4,1,3), (3,1,2,4), (3,1,4,2), (3,4,1,2), (3,4,2,1), (4,1,2,3), (4,2,1,3), (4,2,3,1).

MAPLE

b:= proc(i, s) option remember; `if`(s={}, 1, add(

      `if`(j>i or irem(i, j)=0, b(j, s minus {j}), 0), j=s))

    end:

a:= n-> add(b(i, {$1..n} minus {i}), i=1..n):

seq(a(n), n=1..12);  # Alois P. Heinz, Oct 31 2015

PROG

(Python)#

def p(n):

....count = 0

....for i in permutations(range(1, n+1), r=n):

........for j in range(len(i)-1):

............if i[j]%i[j+1]!=0 and i[j]>i[j+1]:

................break

........else:

............count+=1

....return count

for i in range(1, 100):

....print(p(i))

(PARI) a(n) = {nb = 0; for (k=0, n!-1, perm = numtoperm(n, k); ok = 1; for (j=2, n, if ((perm[j] % perm[j-1]) && (perm[j] > perm[j-1]), ok=0; break); ); if (ok, nb++); ); nb; } \\ Michel Marcus, Nov 02 2015

CROSSREFS

Sequence in context: A283353 A323656 A304341 * A295909 A095977 A129744

Adjacent sequences:  A263984 A263985 A263986 * A263988 A263989 A263990

KEYWORD

nonn,more

AUTHOR

Matthew Scroggs, Oct 31 2015

EXTENSIONS

a(11)-a(21) from Alois P. Heinz, Oct 31 2015

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 January 24 13:24 EST 2020. Contains 331193 sequences. (Running on oeis4.)