A097577 Duplicate of A097692.
1, 2, 4, 2, 10, 8, 2, 26, 30, 12, 2, 70, 104, 60, 16, 2, 192, 350, 260, 100, 20, 2, 534, 1152
Offset: 0
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.
G.f. = x + 2*x^2 + 4*x^3 + 10*x^4 + 26*x^5 + 70*x^6 + 192*x^7 + 534*x^8 + ...
a025565 n = a025565_list !! (n-1) a025565_list = 1 : f a001006_list [1] where f (x:xs) ys = y : f xs (y : ys) where y = x + sum (zipWith (*) a001006_list ys) -- Reinhard Zumkeller, Mar 30 2012
seq( add(binomial(i-2, k)*(binomial(i-k, k+1)), k=0..floor(i/2)), i=1..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001 # Alternatively: a := n -> `if`(n=1,1,2*(-1)^n*hypergeom([3/2, 2-n], [2], 4)): seq(simplify(a(n)),n=1..28); # Peter Luschny, Jan 30 2017
T[, 0] = 1; T[1, 1] = 2; T[n, k_] /; 0 <= k <= 2n := T[n, k] = T[n-1, k-2] + T[n-1, k-1] + T[n-1, k]; T[, ] = 0; a[n_] := T[n-1, n-1]; Array[a, 30] (* Jean-François Alcover, Jul 30 2018 *)
def A(): a, b, n = 1, 1, 1 yield a while True: yield a + b n += 1 a, b = b, ((3*(n-1))*a+(2*n-1)*b)//n A025565 = A() print([next(A025565) for in range(28)]) # _Peter Luschny, Jan 30 2017
Triangle read by rows, n>=0. The length of row n is floor((n+1)/2) for n>=1. [ n] [k=0,1,2,...] [row sum] [ 0] [ 1] 1 [ 1] [ 1] 1 [ 2] [ 2] 2 [ 3] [ 4, 2] 6 [ 4] [ 4, 2] 6 [ 5] [ 12, 15, 3] 30 [ 6] [ 10, 8, 2] 20 [ 7] [ 38, 68, 30, 4] 140 [ 8] [ 26, 30, 12, 2] 70 [ 9] [121, 272, 183, 49, 5] 630 [10] [ 70, 104, 60, 16, 2] 252 [11] [384, 1026, 912, 372, 72, 6] 2772 [12] [192, 350, 260, 100, 20, 2] 924 T(6, 2) = 2 because the two orbitals [-1, 1, -1, 1, -1, 1] and [1, -1, 1, -1, 1, -1] have 2 peaks.
# uses[unit_orbitals from A274709] # Brute force counting def orbital_peaks(n): if n == 0: return [1] S = [0]*((n+1)//2) for u in unit_orbitals(n): L = [1 if sgn(u[i]) < sgn(u[i+1]) and sgn(u[i+1]) > sgn(u[i+2]) else 0 for i in (0..n-3)] S[sum(L)] += 1 return S for n in (0..12): print(orbital_peaks(n))
Triangle begins: 1; 2, 1; 5, 4, 1; 13, 15, 6, 1; 35, 52, 30, 8, 1; ...
b:= proc(u, d, t) option remember; `if`(u=0 and d=0, 1/2, expand(`if`(u=0, 0, b(u-1, d, 2)*`if`(t=3, x, 1)) +`if`(d=0, 0, b(u, d-1, `if`(t=2, 3, 1))))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n+1$2, 1)): seq(T(n), n=0..12); # Alois P. Heinz, Apr 29 2015 # second program: A171651:= (n, k)-> binomial(n,k)*add((-1)^(n-k-j)*binomial(n-k,j)*binomial(2*j+1,j+1),j=0..n-k): seq(print(seq(A171651(n, k), k=0..n)), n=0..9); # Mélika Tebni, Dec 16 2023
b[u_, d_, t_] := b[u, d, t] = If[u == 0 && d == 0, 1/2, Expand[If[u == 0, 0, b[u-1, d, 2]*If[t == 3, x, 1]] + If[d == 0, 0, b[u, d-1, If[t == 2, 3, 1]]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n+1, n+1, 1] ]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 21 2016, after Alois P. Heinz *)
Comments