This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A287989 #11 Jun 02 2018 10:35:53 %S A287989 1,1,1,1,6,10,27,84,226,770,2390,7579,25222,84299,285284,976105, %T A287989 3386494,11858759,41782516,148205047,529101609,1899680494,6854597493, %U A287989 24847293152,90460431604,330654288724,1213033321450,4465027739962,16486012746085,61044028354833 %N A287989 Number of Dyck paths of semilength n such that all positive levels up to the highest level have a positive number of peaks and the number of peaks of adjacent levels is different. %H A287989 Alois P. Heinz, <a href="/A287989/b287989.txt">Table of n, a(n) for n = 0..150</a> %H A287989 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a> %e A287989 . (4) = 6: %e A287989 . /\ /\ /\ /\/\ /\/\ %e A287989 . /\/\/\/\ /\/\/ \ /\/ \/\ / \/\/\ /\/ \ / \/\ . %p A287989 b:= proc(n, k, j) option remember; `if`(n=j, 1, add(add( %p A287989 b(n-j, t, i)*binomial(i, t)*binomial(j-1, i-1-t), %p A287989 t={$max(1, i-j)..min(n-j, i-1)} minus {k}), i=1..n-j)) %p A287989 end: %p A287989 a:= n-> `if`(n=0, 1, add(b(n, k$2), k=1..n)): %p A287989 seq(a(n), n=0..30); %t A287989 b[n_, k_, j_] := b[n, k, j] = If[n == j, 1, Sum[Sum[b[n - j, t, i]* Binomial[i, t]*Binomial[j - 1, i - 1 - t], {t, Range[Max[1, i - j], Min[n - j, i - 1]] ~Complement~ {k}}], {i, 1, n - j}]]; %t A287989 a[n_] := If[n == 0, 1, Sum[b[n, k, k], {k, 1, n}]]; %t A287989 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Jun 02 2018, from Maple *) %Y A287989 Cf. A000108, A287993. %K A287989 nonn %O A287989 0,5 %A A287989 _Alois P. Heinz_, Jun 04 2017