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.

Showing 1-1 of 1 results.

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).

Original entry on oeis.org

-1, -1, -1, -1, 0, -3, -1, 2, -4, -2, -1, 6, -8, 1, -4, -1, 14, -22, 11, -5, -4, -1, 30, -68, 49, -15, -1, -6, -1, 62, -214, 203, -77, 15, -9, -4, -1, 126, -668, 841, -423, 119, -35, 4, -7, -1, 254, -2062, 3491, -2285, 807, -225, 48, -9, -7, -1, 510, -6308, 14449
Offset: 1

Views

Author

Chai Wah Wu, Oct 29 2023

Keywords

Examples

			Array begins:
-1, -1,  -1,  -1,   -1,    -1,     -1,     -1,      -1,       -1, ...
-1,  0,   2,   6,   14,    30,     62,    126,     254,      510, ...
-3, -4,  -8, -22,  -68,  -214,   -668,  -2062,   -6308,   -19174, ...
-2,  1,  11,  49,  203,   841,   3491,  14449,   59483,   243481, ...
-4, -5, -15, -77, -423, -2285, -12135, -63677, -331143, -1709645, ...
		

Crossrefs

First column is -A059851.
Second column is A024919.
Third column is A366915.
Fourth column is A366917.
First row is -A000012.
Second row is A000918.
First superdiagonal is A366919.
Cf. A319649.

Programs

  • Python
    from math import isqrt
    from itertools import count, islice
    from sympy import bernoulli
    def A366936_T(n,k):
        if k:
            return ((((s:=isqrt(m:=n>>1))+1)*(bernoulli(k+1)-bernoulli(k+1,s+1))<>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)
    def A366936_gen(): return (A366936_T(k+1,n-k-1) for n in count(1) for k in range(n))
    A366936_list = list(islice(A366936_gen(),30))

Formula

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).
Showing 1-1 of 1 results.