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!)
A327580 Triangle read by rows: T(n,k) = Sum_{1<=j*k<=n} cos(Pi*(j*k-1)/2). 1

%I #66 Aug 08 2020 02:15:18

%S 1,1,0,0,0,-1,0,0,-1,0,1,0,-1,0,1,1,0,-1,0,1,0,0,0,-1,0,1,0,-1,0,0,-1,

%T 0,1,0,-1,0,1,0,0,0,1,0,-1,0,1,1,0,0,0,1,0,-1,0,1,0,0,0,0,0,1,0,-1,0,

%U 1,0,-1,0,0,0,0,1,0,-1,0,1,0,-1,0,1,0,0,0,1,0,-1,0,1,0,-1,0,1

%N Triangle read by rows: T(n,k) = Sum_{1<=j*k<=n} cos(Pi*(j*k-1)/2).

%C a(n) is a (-1, 0, 1)-valued sequence.

%C The identity Sum_{k=1..n} T(n,k) mu(k)=1 holds for every n. The function mu is the Moebius function and T(n,k) is entry k of row n in the triangular array.

%C T(n,2k) = 0 for all k.

%C T(n,k) is 4-periodic when k > n/3.

%C T(n,*) gives the transpose of the n-th truncation of Dirichlet convolution by (1,1,1,...) applied to the periodic sequence (1,0,-1,0,...).

%H Jeffery Kline, <a href="/A327580/b327580.txt">Table of n, a(n) for n = 1..4950</a> (Rows n = 1..99 of triangle, flattened)

%H Jeffery Kline, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Kline/kline4.html">Unital sums of the Moebius and Mertens functions</a>, Journal of Integer Sequences, 23 (2020), Article 20.8.1.

%e The first 20 rows of the triangle:

%e 1;

%e 1, 0;

%e 0, 0, -1;

%e 0, 0, -1, 0;

%e 1, 0, -1, 0, 1;

%e 1, 0, -1, 0, 1, 0;

%e 0, 0, -1, 0, 1, 0, -1;

%e 0, 0, -1, 0, 1, 0, -1, 0;

%e 1, 0, 0, 0, 1, 0, -1, 0, 1;

%e 1, 0, 0, 0, 1, 0, -1, 0, 1, 0;

%e 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1;

%e 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0;

%e 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1;

%e 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0;

%e 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1;

%e 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0;

%e 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1;

%e 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0;

%e 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1;

%e 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0;

%e ...

%p T:= (n, k)-> add(cos(Pi*(j*k-1)/2), j=1..n/k):

%p seq(seq(T(n, k), k=1..n), n=1..14); # _Alois P. Heinz_, Sep 29 2019

%o (Python)

%o import numpy as np

%o for n in range(1, 21):

%o A = [ sum([ np.cos(np.pi * (j*k-1)/2) for k in range(1, n//j+1)])

%o for j in range(1, n+1) ]

%o print(np.array(np.rint(A), dtype=int))

%o (Python)

%o import numpy as np

%o m, maxn = 1, 1000

%o D = np.zeros((maxn, maxn), dtype=int);

%o for j in range(maxn): D[j::j+1, j]=1

%o cm = np.zeros(maxn, dtype=int); cm[ ::4*m] = 1; cm[2*m::4*m] = -1

%o for n in range(1, 21): print( D[:n, :n].T.dot(cm[:n]))

%Y Cf. A002321, A008683, A056594.

%K sign,tabl

%O 1

%A _Jeffery Kline_, Sep 17 2019

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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)