login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246694 Triangle t(n,k) = t(n,k-2) + 1 if n > 1 and 2 <= k <= n; t(0,0) = 1, t(1,0) = 1, t(1,1) = 2; if n > 1 is odd, then t(n,0) = t(n-1,n-2) + 1 and t(n,1) = t(n-1,n-1) + 1; if n > 1 is even, then t(n,0) = t(n-1,n-1) + 1 and t(n,1) = t(n-1,n-2) + 1. 6
1, 1, 2, 3, 2, 4, 3, 5, 4, 6, 7, 5, 8, 6, 9, 7, 10, 8, 11, 9, 12, 13, 10, 14, 11, 15, 12, 16, 13, 17, 14, 18, 15, 19, 16, 20, 21, 17, 22, 18, 23, 19, 24, 20, 25, 21, 26, 22, 27, 23, 28, 24, 29, 25, 30, 31, 26, 32, 27, 33, 28, 34, 29, 35, 30, 36, 31, 37, 32 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

As an array, for each m, row 2*m has m odd numbers and m+1 even numbers; row 2*m-1 has m odds and m evens.  As a sequence, every positive integer n occurs exactly twice, separated by floor((n+1)/2) other numbers.

LINKS

Reinhard Zumkeller, Rows n = 0..125 of triangle, flattened

EXAMPLE

First 8 rows:

1

1 ... 2

3 ... 2 ... 4

3 ... 5 ... 4 ... 6

7 ... 5 ... 8 ... 6 ... 9

7 ... 10 .. 8 ... 11 .. 9 ... 12

13 .. 10 .. 14 .. 11 .. 15 .. 12 .. 16

13 .. 17 .. 14 .. 18 .. 15 .. 19 .. 16 .. 20

MATHEMATICA

z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;

t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];

t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];

t[n_, k_] := t[n, k - 2] + 1; Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]](*A246694*)

PROG

(Haskell)

a246694 n k = a246694_tabl !! n !! k

a246694_row n = a246694_tabl !! n

a246694_tabl = [1] : [1, 2] : f 1 2 [1, 2] where

   f i z xs = ys : f j (z + 1) ys where

     ys = take (z + 1) $ map (+ 1) (xs !! (z - i) : xs !! (z - j) : ys)

     j = 3 - i

-- Reinhard Zumkeller, Sep 03 2014

CROSSREFS

Cf. A246705, A246706, A246696.

Cf. A246695 (row sums), A174114 (central terms).

Sequence in context: A264116 A283368 A199474 * A054384 A026400 A026409

Adjacent sequences:  A246691 A246692 A246693 * A246695 A246696 A246697

KEYWORD

nonn,easy,tabl

AUTHOR

Clark Kimberling, Sep 01 2014

EXTENSIONS

Edited by M. F. Hasler, Nov 17 2014

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 17 06:13 EDT 2017. Contains 290635 sequences.