A130517 Triangle read by rows: row n counts down from n in steps of 2, then counts up the remaining elements in the set {1,2,...,n}, again in steps of 2.
1, 2, 1, 3, 1, 2, 4, 2, 1, 3, 5, 3, 1, 2, 4, 6, 4, 2, 1, 3, 5, 7, 5, 3, 1, 2, 4, 6, 8, 6, 4, 2, 1, 3, 5, 7, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 14, 12, 10
Offset: 1
Examples
A geometric model of the atomic nucleus: ......------------------------------------------------- ......|...-----------------------------------------...| ......|...|...---------------------------------...|...| ......|...|...|...-------------------------...|...|...| ......|...|...|...|...-----------------...|...|...|...| ......|...|...|...|...|...---------...|...|...|...|...| ......|...|...|...|...|...|...-...|...|...|...|...|...| ......i...h...g...f...d...p...s...p...d...f...g...h...i ......|...|...|...|...|...|.......|...|...|...|...|...| ......|...|...|...|...|.......1.......|...|...|...|...| ......|...|...|...|.......2.......1.......|...|...|...| ......|...|...|.......3.......1.......2.......|...|...| ......|...|.......4.......2.......1.......3.......|...| ......|.......5.......3.......1.......2.......4.......| ..........6.......4.......2.......1.......3.......5.... ......7.......5.......3.......1.......2.......4.......6 ....................................................... ...13/2.11/2.9/2.7/2.5/2.3/2.1/2.1/2.3/2.5/2.7/2.9/2.11/2 ......|...|...|...|...|...|...|...|...|...|...|...|...| ......|...|...|...|...|...|...-----...|...|...|...|...| ......|...|...|...|...|...-------------...|...|...|...| ......|...|...|...|...---------------------...|...|...| ......|...|...|...-----------------------------...|...| ......|...|...-------------------------------------...| ......|...--------------------------------------------- . Triangle begins: 1; 2, 1; 3, 1, 2; 4, 2, 1, 3; 5, 3, 1, 2, 4; 6, 4, 2, 1, 3, 5; 7, 5, 3, 1, 2, 4, 6; 8, 6, 4, 2, 1, 3, 5, 7; 9, 7, 5, 3, 1, 2, 4, 6, 8; 10, 8, 6, 4, 2, 1, 3, 5, 7, 9; ... Also: 1; 2, 1; 3, 1, 2; 4, 2, 1, 3; 5, 3, 1, 2, 4; 6, 4, 2, 1, 3, 5; 7, 5, 3, 1, 2, 4, 6; 8, 6, 4, 2, 1, 3, 5, 7; 9, 7, 5, 3, 1, 2, 4, 6, 8; 10, 8, 6, 4, 2, 1, 3, 5, 7, 9; ... In this view each column contains the same numbers. From _Miquel A. Fiol_, Apr 07 2024: (Start) Eigenvalues of the odd graphs O(n) for n=2..10: 2, -1; 3, 1, -2; 4, 2, -1, -3; 5, 3, 1, -2, -4; 6, 4, 2, -1, -3, -5; 7, 5, 3, 1, -2, -4, -6; 8, 6, 4, 2, -1, -3, -5, -7; 9, 7, 5, 3, 1, -2, -4, -6, -8; 10, 8, 6, 4, 2, -1, -3, -5, -7, -9; ... (End)
Links
- Reinhard Zumkeller, Rows n = 1..120 of triangle, flattened
- N. Bigss, Algebraic Graph Theory, Cambridge Univ. Press, Cambridge, 1974.
- Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions, 2012, arXiv:1212.2732 [math.CO], 2012.
- Eric Weisstein's World of Mathematics, Odd graph
Crossrefs
Programs
-
Haskell
a130517 n k = a130517_tabl !! (n-1) !! (k-1) a130517_row n = a130517_tabl !! (n-1) a130517_tabl = iterate (\row -> (head row + 1) : reverse row) [1] -- Reinhard Zumkeller, Dec 03 2012
-
Maple
A130517 := proc(n,k) if k <= (n+1)/2 then n-2*(k-1) ; else 1-n+2*(k-1) ; end if; end proc: # R. J. Mathar, Jul 21 2012
-
Mathematica
t[n_, 1] := n; t[n_, n_] := n-1; t[n_, k_] := Abs[2*k-n - If[2*k <= n+1, 2, 1]]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 03 2013, from abs(A056951) *)
-
PARI
a130517_row(n) = my(v=vector(n), s=1, n1=0, n2=n+1); forstep(k=n, 1,-1, s=-s; if(s>0, n2--; v[n2]=k, n1++; v[n1]=k)); v \\ Hugo Pfoertner, Aug 26 2024
Formula
a(n) = A162630(n)/2. - Omar E. Pol, Sep 02 2012
T(1,1) = 1; for n > 1: T(n,1) = T(n-1,1)+1 and T(n,k) = T(n-1,n-k+1), 1 < k <= n. - Reinhard Zumkeller, Dec 03 2012
From Boris Putievskiy, Jan 16 2013: (Start)
a(n) = |2*A000027(n) - A003056(n)^2 - 2*A003056(n) - 3| + floor((2*A000027(n) - A003056(n)^2 - A003056(n))/(A003056(n)+3)).
a(n) = |2*n - t^2 - 2*t - 3| + floor((2*n - t^2 - t)/(t+3)) where t = floor((-1+sqrt(8*n-7))/2). (End)
Comments