login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004197 Triangle read by rows. T(n, k) = n - k if n - k < k, otherwise k. 14
0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,13
COMMENTS
Table of min(x,y), where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...
Highest power of 6 that divides A036561. - Fred Daniel Kline, May 29 2012
Triangle T(n,k) read by rows: T(n,k) = min(k,n-k). - Philippe Deléham, Feb 25 2014
LINKS
FORMULA
a(n) = A003983(n) - 1.
G.f.: x*y/((1-x)*(1-y)*(1-x*y)). - Franklin T. Adams-Watters, Feb 06 2006
2^T(n,k) = A144464(n,k), 3^T(n,k) = A152714(n,k), 4^T(n,k) = A152716(n,k), 5^T(n,k) = A152717(n,k). - Philippe Deléham, Feb 25 2014
a(n) = (1/2)*(t - 1 - abs(t^2 - 2*n - 1)), where t = floor(sqrt(2*n+1)+1/2). - Ridouane Oudra, May 03 2019
EXAMPLE
From Philippe Deléham, Feb 25 2014: (Start)
Top left corner of table:
0 0 0 0
0 1 1 1
0 1 2 2
0 1 2 3
Triangle T(n,k) begins:
0;
0, 0;
0, 1, 0;
0, 1, 1, 0;
0, 1, 2, 1, 0;
0, 1, 2, 2, 1, 0;
0, 1, 2, 3, 2, 1, 0;
0, 1, 2, 3, 3, 2, 1, 0;
0, 1, 2, 3, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0;
0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0;
... (End)
MAPLE
T := (n, k) -> if n - k < k then n - k else k fi:
for n from 0 to 9 do seq(T(n, k), k=0..n) od; # Peter Luschny, May 07 2023
MATHEMATICA
Flatten[Table[IntegerExponent[2^(n - k) 3^k, 6], {n, 0, 20}, {k, 0, n}]] (* Fred Daniel Kline, May 29 2012 *)
PROG
(Haskell)
a004197 n k = a004197_tabl !! n !! k
a004197_tabl = map a004197_row [0..]
a004197_row n = hs ++ drop (1 - n `mod` 2) (reverse hs)
where hs = [0..n `div` 2]
-- Reinhard Zumkeller, Aug 14 2011
(PARI) T(x, y)=min(x, y) \\ Charles R Greathouse IV, Feb 07 2017
CROSSREFS
Similar to but strictly different from A087062 and A261684.
Row sums give A002620. - Reinhard Zumkeller, Jul 27 2005
Positions of zero are given in A117142. - Ridouane Oudra, Apr 30 2019
Sequence in context: A111143 A356969 A342955 * A261684 A048571 A025880
KEYWORD
tabl,nonn,easy,nice
AUTHOR
EXTENSIONS
Mathematica program fixed by Harvey P. Dale, Nov 26 2020
Name edited by Peter Luschny, May 07 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 18:46 EDT 2024. Contains 372141 sequences. (Running on oeis4.)