A158405
Triangle T(n,m) = 1+2*m of odd numbers read along rows, 0<=m
1, 1, 3, 1, 3, 5, 1, 3, 5, 7, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 11, 1, 3, 5, 7, 9, 11, 13, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23
Offset: 1
Examples
The triangle contains the first n odd numbers in row n: 1; 1,3; 1,3,5; 1,3,5,7; From _Seiichi Manyama_, Dec 02 2017: (Start) | a(n) | | A000290(n) ----------------------------------------------------------------- 0| (= 0) 1| 1 = 1/3 * ( 3) (= 1) 2| 1 + 3 = 1/3 * ( 5 + 7) (= 4) 3| 1 + 3 + 5 = 1/3 * ( 7 + 9 + 11) (= 9) 4| 1 + 3 + 5 + 7 = 1/3 * ( 9 + 11 + 13 + 15) (= 16) 5| 1 + 3 + 5 + 7 + 9 = 1/3 * (11 + 13 + 15 + 17 + 19) (= 25) (End)
Links
- Seiichi Manyama, Rows n = 1..140, flattened
- Daniel Erman, The Josephus Problem, Numberphile video (2016)
- Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
- Index entries for sequences related to the Josephus Problem
Crossrefs
Triangle sums (see the comments): A000290 (Row1; Kn11 & Kn4 & Ca1 & Ca4 & Gi1 & Gi4); A000027 (Row2); A005563 (Kn12); A028347 (Kn13); A028560 (Kn14); A028566 (Kn15); A098603 (Kn16); A098847 (Kn17); A098848 (Kn18); A098849 (Kn19); A098850 (Kn110); A000217 (Kn21. Kn22, Kn23, Fi2, Ze2); A000384 (Kn3, Fi1, Ze3); A000212 (Ca2 & Ze4); A000567 (Ca3, Ze1); A011848 (Gi2); A001107 (Gi3). - Johannes W. Meijer, Sep 22 2010
Programs
-
Haskell
a158405 n k = a158405_row n !! (k-1) a158405_row n = a158405_tabl !! (n-1) a158405_tabl = map reverse a099375_tabl -- Reinhard Zumkeller, Mar 31 2012
-
Mathematica
Table[2 Range[1, n] - 1, {n, 12}] // Flatten (* Michael De Vlieger, Oct 01 2015 *)
-
PARI
a(n) = 2*(n-floor((-1+sqrt(8*n-7))/2)*(floor((-1+sqrt(8*n-7))/2)+1)/2)-1; vector(100, n, a(n)) \\ Altug Alkan, Oct 01 2015
Formula
a(n) = 2*i-1, where i = n-t(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Feb 03 2013
a(n) = 2*A002262(n-1) + 1. - Eric Werley, Sep 30 2015
Extensions
Edited by R. J. Mathar, Oct 06 2009
Comments