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!)
A127648 Triangle read by rows: row n consists of n zeros followed by n+1. 40
1, 0, 2, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Alternatively, a(n) = k if n+1 is the k-th triangular number and 0 otherwise.
Triangle T(n,k), 0<=k<=n, read by rows, given by (0,0,0,0,0,0,0,0,0,0,...) DELTA (2,-1/2,1/2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 27 2011
LINKS
FORMULA
Infinite lower triangular matrix with (1, 2, 3, ...) in the main diagonal and the rest zeros.
This sequence * A007318 (Pascal's Triangle) = A003506.
A007318 * this sequence = A103406.
G.f.: 1/(x*y-1)^2. - R. J. Mathar, Aug 11 2015
a(n) = (1/2) (round(sqrt(4 + 2 n)) - round(sqrt(2 + 2 n))) (-1 + round(sqrt(2 + 2 n)) + round(sqrt(4 + 2 n))). - Brian Tenneson, Jan 27 2017
From G. C. Greubel, Mar 13 2024: (Start)
T(n, n) = n+1.
Sum_{k=0..n} T(n, k) = n+1.
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^n*(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A142150(n+2).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^floor(n/2)*A142150(n+2). (End)
EXAMPLE
First few rows of the triangle:
1;
0, 2;
0, 0, 3;
0, 0, 0, 4;
0, 0, 0, 0, 5;
0, 0, 0, 0, 0, 6;
0, 0, 0, 0, 0, 0, 7;
...
MAPLE
A127648 := proc(n)
for i from 0 do
if A000217(i) = n+1 then
return i ;
elif A000217(i) >n then
return 0 ;
end if;
end do;
end proc: # R. J. Mathar, Apr 23 2013
MATHEMATICA
Flatten[Table[{n, Table[0, {n}]}, {n, 15}]] (* Harvey P. Dale, Jul 27 2011 *)
PROG
(Haskell)
a127648 n k = a127648_tabl !! n !! k
a127648_row n = a127648_tabl !! n
a127648_tabl = map reverse $ iterate (\(x:xs) -> x + 1 : 0 : xs) [1]
a127648_list = concat a127648_tabl
-- Reinhard Zumkeller, Jul 13 2013
(Python)
for i in range(1, 15):
print(i, end=", ")
for j in range(i):
print("0", end=", ") # Mohammad Saleh Dinparvar, May 11 2020
(Magma) [k eq n select n+1 else 0: k in [0..n], n in [0..20]]; // G. C. Greubel, Mar 12 2024
(SageMath)
def A127648(n): return (sqrt(9+8*n)-1)//2 if ((sqrt(9+8*n)-3)/2).is_integer() else 0
[A127648(n) for n in range(153)] # G. C. Greubel, Mar 12 2024
CROSSREFS
Sequence in context: A284269 A140579 A132681 * A212209 A259481 A132825
KEYWORD
nonn,easy,tabl
AUTHOR
Gary W. Adamson, Jan 22 2007
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 May 8 15:46 EDT 2024. Contains 372340 sequences. (Running on oeis4.)