cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A366936 Square array T(n,k), n >= 1, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=1..n} (-1)^j*j^k*floor(n/j).

This page as a plain text file.
%I A366936 #11 Oct 30 2023 09:45:03
%S A366936 -1,-1,-1,-1,0,-3,-1,2,-4,-2,-1,6,-8,1,-4,-1,14,-22,11,-5,-4,-1,30,
%T A366936 -68,49,-15,-1,-6,-1,62,-214,203,-77,15,-9,-4,-1,126,-668,841,-423,
%U A366936 119,-35,4,-7,-1,254,-2062,3491,-2285,807,-225,48,-9,-7,-1,510,-6308,14449
%N A366936 Square array T(n,k), n >= 1, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=1..n} (-1)^j*j^k*floor(n/j).
%F A366936 Let A(n, k) = Sum_{j=1..n} j^k * floor(n/j). Then T(n, k) = 2^(k+1)*A(floor(n/2), k) - A(n, k).
%e A366936 Array begins:
%e A366936 -1, -1,  -1,  -1,   -1,    -1,     -1,     -1,      -1,       -1, ...
%e A366936 -1,  0,   2,   6,   14,    30,     62,    126,     254,      510, ...
%e A366936 -3, -4,  -8, -22,  -68,  -214,   -668,  -2062,   -6308,   -19174, ...
%e A366936 -2,  1,  11,  49,  203,   841,   3491,  14449,   59483,   243481, ...
%e A366936 -4, -5, -15, -77, -423, -2285, -12135, -63677, -331143, -1709645, ...
%o A366936 (Python)
%o A366936 from math import isqrt
%o A366936 from itertools import count, islice
%o A366936 from sympy import bernoulli
%o A366936 def A366936_T(n,k):
%o A366936     if k:
%o A366936         return ((((s:=isqrt(m:=n>>1))+1)*(bernoulli(k+1)-bernoulli(k+1,s+1))<<k+1)-((t:=isqrt(n))+1)*(bernoulli(k+1)-bernoulli(k+1,t+1))+(sum(w**k*(k+1)*((q:=m//w)+1)-bernoulli(k+1)+bernoulli(k+1,q+1) for w in range(1,s+1))<<k+1)-sum(w**k*(k+1)*((q:=n//w)+1)-bernoulli(k+1)+bernoulli(k+1,q+1) for w in range(1,t+1)))//(k+1) if n else -1
%o A366936     else:
%o A366936         return (s:=isqrt(n))**2-((t:=isqrt(m:=n>>1))**2<<1)+((sum(m//k for k in range(1, t+1))<<1)-sum(n//k for k in range(1, s+1))<<1)
%o A366936 def A366936_gen(): return (A366936_T(k+1,n-k-1) for n in count(1) for k in range(n))
%o A366936 A366936_list = list(islice(A366936_gen(),30))
%Y A366936 First column is -A059851.
%Y A366936 Second column is A024919.
%Y A366936 Third column is A366915.
%Y A366936 Fourth column is A366917.
%Y A366936 First row is -A000012.
%Y A366936 Second row is A000918.
%Y A366936 First superdiagonal is A366919.
%Y A366936 Cf. A319649.
%K A366936 sign,tabl
%O A366936 1,6
%A A366936 _Chai Wah Wu_, Oct 29 2023