The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A176079 Triangle T(n,k) read by rows: If k divides n then k-1, otherwise -1. 5
0, 0, 1, 0, -1, 2, 0, 1, -1, 3, 0, -1, -1, -1, 4, 0, 1, 2, -1, -1, 5, 0, -1, -1, -1, -1, -1, 6, 0, 1, -1, 3, -1, -1, -1, 7, 0, -1, 2, -1, -1, -1, -1, -1, 8, 0, 1, -1, -1, 4, -1, -1, -1, -1, 9, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 0, 1, 2, 3, -1, 5, -1, -1, -1, -1, -1, 11 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
T(n,k) = -A191904(n,k) for n >= k.
Sum_{k=1..n} T(n,k) = A001065(n). - Jon E. Schoenfield, Nov 29 2019
EXAMPLE
Table begins:
0;
0, 1;
0, -1, 2;
0, 1, -1, 3;
0, -1, -1, -1, 4;
0, 1, 2, -1, -1, 5;
0, -1, -1, -1, -1, -1, 6;
0, 1, -1, 3, -1, -1, -1, 7;
0, -1, 2, -1, -1, -1, -1, -1, 8;
0, 1, -1, -1, 4, -1, -1, -1, -1, 9;
MAPLE
seq(seq( `if`(mod(n, k)=0, k-1, -1) , k=1..n), n=1..15); # G. C. Greubel, Nov 27 2019
MATHEMATICA
Table[If[Divisible[n, k], k-1, -1], {n, 15}, {k, n}]//Flatten (* Harvey P. Dale, May 20 2016 *)
PROG
(PARI) T(n, k)= if(Mod(n, k)==0, k-1, -1); \\ G. C. Greubel, Nov 27 2019
(Magma) [(n mod k) eq 0 select k-1 else -1: k in [1..n], n in [1..15]]; // G. C. Greubel, Nov 27 2019
(Sage)
def T(n, k):
if (mod(n, k)==0): return k-1
else: return -1
[[T(n, k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Nov 27 2019
(GAP)
T:= function(n, k)
if (n mod k = 0) then return k-1;
else return -1;
fi; end;
Flat(List([1..15], n-> List([1..n], k-> T(n, k) ))); # G. C. Greubel, Nov 27 2019
CROSSREFS
Cf. A001065 (row sums), A191904.
Sequence in context: A064918 A323076 A286471 * A067586 A078879 A082859
KEYWORD
sign,tabl
AUTHOR
Mats Granvik, Apr 08 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 20:41 EDT 2024. Contains 372494 sequences. (Running on oeis4.)