login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176298 Triangle T(n,k) = 1 + n - floor(n/(k+1)) - floor(n/(n-k+1)) read by rows. 4
1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 3, 4, 4, 3, 1, 1, 3, 4, 5, 4, 3, 1, 1, 4, 5, 6, 6, 5, 4, 1, 1, 4, 6, 6, 7, 6, 6, 4, 1, 1, 5, 6, 7, 8, 8, 7, 6, 5, 1, 1, 5, 7, 8, 8, 9, 8, 8, 7, 5, 1, 1, 6, 8, 9, 9, 10, 10, 9, 9, 8, 6, 1, 1, 6, 8, 9, 10, 10, 11, 10, 10, 9, 8, 6, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,8

COMMENTS

Row sums are (n+1)^2 - 2*A006218(n) = {1, 2, 3, 6, 9, 16, 21, 32, 41, 54, 67, ...}.

LINKS

Indranil Ghosh, Rows 0..125, flattened

FORMULA

T(n,k) = T(n,n-k).

EXAMPLE

Triangle begins as:

  1;

  1, 1;

  1, 1, 1;

  1, 2, 2, 1;

  1, 2, 3, 2, 1;

  1, 3, 4, 4, 3, 1;

  1, 3, 4, 5, 4, 3, 1;

  1, 4, 5, 6, 6, 5, 4, 1;

  1, 4, 6, 6, 7, 6, 6, 4, 1;

  1, 5, 6, 7, 8, 8, 7, 6, 5, 1;

  1, 5, 7, 8, 8, 9, 8, 8, 7, 5, 1;

MAPLE

A176298 := proc(n, m) 1+n-floor(n/(m+1)) - floor(n/(n-m+1)) ; end proc: # R. J. Mathar, Jan 29 2011

MATHEMATICA

T[n_, k_]:= 1+n -Floor[n/(k+1)] -Floor[n/(n-k+1)]; Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten

PROG

(Python)

#Program to generate the b-file

i=0

for n in range(126):

    for m in range(n+1):

        print(str(i)+" "+str(1+n-(n/(m+1))-(n/(n-m+1))))

        i+=1 # Indranil Ghosh, Feb 20 2017

(PARI) T(n, k) = 1+n -floor(n/(k+1)) -floor(n/(n-k+1)); \\ G. C. Greubel, Nov 26 2019

(MAGMA) [1+n -Floor(n/(k+1)) -Floor(n/(n-k+1)): k in [0..n], n in [0..15]]; // G. C. Greubel, Nov 26 2019

(Sage) [[1+n -(n//(k+1)) -(n//(n-k+1)) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Nov 26 2019

(GAP) Flat(List([0..15], n-> List([0..n], k-> 1+n -Int(n/(k+1)) -Int(n/(n-k+1)) ))); # G. C. Greubel, Nov 26 2019

CROSSREFS

Cf. A006218.

Sequence in context: A115092 A172281 A304945 * A259575 A169623 A245558

Adjacent sequences:  A176295 A176296 A176297 * A176299 A176300 A176301

KEYWORD

nonn,tabl,easy

AUTHOR

Roger L. Bagula, Apr 14 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 08:46 EDT 2021. Contains 348074 sequences. (Running on oeis4.)