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.

Previous Showing 21-24 of 24 results.

A214458 Let S_3(n) denote difference between multiples of 3 in interval [0,n) with even and odd binary digit sums. Then a(n)=(-1)^A000120(n)*(S_3(n)-3*S_3(floor(n/4))).

Original entry on oeis.org

0, -1, -1, 1, 1, -1, -1, 0, 0, 0, 1, -1, 1, -2, -2, 2, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 0, 1, -1, 1, -2, -2, 2, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 0, 1, -1, 1, -2, -2, 2, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, -1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

In 1969, D. J. Newman (see the reference) proved L. Moser's conjecture that difference between numbers of multiples of 3 with even and odd binary digit sums in interval [0,x] is always positive. This fact is known as Moser-Newman phenomenon.
Theorem: The sequence is periodic with period of length 24.

Crossrefs

Formula

Recursion for evaluation S_3(n): S_3(n)=3*S_3(floor(n/4))+(-1)^A000120(n)*a(n). As a corollary, we have |S_3(n)-3*S_3(n/4)|<=2.

A377657 Array read by ascending antidiagonals: A(n, k) = Sum_{j=0..k} tan(j*Pi/(1 + 2*k))^(2*n).

Original entry on oeis.org

1, 0, 2, 0, 3, 3, 0, 9, 10, 4, 0, 27, 90, 21, 5, 0, 81, 850, 371, 36, 6, 0, 243, 8050, 7077, 1044, 55, 7, 0, 729, 76250, 135779, 33300, 2365, 78, 8, 0, 2187, 722250, 2606261, 1070244, 113311, 4654, 105, 9, 0, 6561, 6841250, 50028755, 34420356, 5476405, 312390, 8295, 136, 10
Offset: 0

Views

Author

Peter Luschny, Nov 10 2024

Keywords

Comments

Based on an observation made by Fredrik Johansson about A376777, which is the main diagonal of this array.

Examples

			Array begins
  [0] 1,    2,       3,         4,           5,            6, ... A000027
  [1] 0,    3,      10,        21,          36,           55, ... A014105
  [2] 0,    9,      90,       371,        1044,         2365, ... A377858
  [3] 0,   27,     850,      7077,       33300,       113311, ... A376778
  [4] 0,   81,    8050,    135779,     1070244,      5476405, ...
  [5] 0,  243,   76250,   2606261,    34420356,    264893255, ...
  [6] 0,  729,  722250,  50028755,  1107069876,  12813875437, ...
  [7] 0, 2187, 6841250, 960335173, 35607151476, 619859803695, ...
  .
Seen as a triangle T(n, k) = A(n-k, k):
  [0] 1;
  [1] 0,    2;
  [2] 0,    3,      3;
  [3] 0,    9,     10,       4;
  [4] 0,   27,     90,      21,       5;
  [5] 0,   81,    850,     371,      36,      6;
  [6] 0,  243,   8050,    7077,    1044,     55,    7;
  [7] 0,  729,  76250,  135779,   33300,   2365,   78,   8;
  [8] 0, 2187, 722250, 2606261, 1070244, 113311, 4654, 105, 9;
		

Crossrefs

Columns: A376478.
Cf. A376777 (main diagonal), A377658 (antidiagonal sums).
Cf. A091042.

Programs

  • Maple
    A := (n, k) -> add(tan(j*Pi/(1 + 2*k))^(2*n), j = 0..k):
    seq(print(seq(round(evalf(A(n, k), 32)), k = 0..6)), n = 0..7);
  • PARI
    A(n, k) = {trace(matcompanion(sum(m=0, k, x^m*binomial(2*k+1, 2*(k-m))*(-1)^(m+1)))^n)+(n==0) } \\ Thomas Scheuerle, Nov 11 2024

Formula

Row n of A091042(n, k) = binomial(2*n+1, 2*k) gives the polynomial Pe(n, x), with zeros in -tan(Pi/2*n+1)^2, -tan(2*Pi/2*n+1)^2, ..., -tan(n*Pi/2*n+1)^2. Let Pm(n, k, x) be the polynomial with zeros in (-tan(Pi/2*n+1)^2)^k, (-tan(2*Pi/2*n+1)^2)^k, ..., (-tan(n*Pi/2*n+1)^2)^k, then A(k, n) is the coefficient of X^(n-1) in the polynomial Pm(n, k, x). A way to do this calculation without evaluation of irrational numbers is to obtain the companion matrix M of the polynomial Pe(n, x), then A(k, n) = tr(M^k) (the trace of M^k). - Thomas Scheuerle, Nov 11 2024

A212822 Triangle of coefficients of polynomials concerning Newman-like phenomenon of multiples of b+1 in even base b in interval [0,b^n) (see comment).

Original entry on oeis.org

1, 2, -1, 1, 3, -1, 2, 6, -8, 3, 2, 10, 10, -10, 3, 4, 20, 10, -50, 46, -15, 17, 119, 245, 35, -217, 161, -45, 34, 238, 406, -350, -644, 1372, -1056, 315, 62, 558, 1722, 1638, -1092, -1008, 1828, -1188, 315, 124, 1116, 3138, 1134, -5838, 1134, 9452, -14724, 10134, -2835
Offset: 2

Views

Author

Keywords

Comments

In 1969, D. J. Newman (see the reference) proved that difference between numbers of multiples of 3 with even and odd binary digit sums in interval [0,x] is always positive. This fact now is known as Newman phenomenon.
Consider difference between numbers of multiples of b+1 with even and odd digit sums in even base b in interval [0, b^n). It is a polynomial in b P_n(b) of degree n-1 and multiple of b, if n is even, and n-2, if n is odd, such that all polynomials Q_n(b):=A156769(n/2)*P_n(b)/b, if n is even, and Q_n(b):=A156769((n-1)/2)*P_n(b), if n is odd, presumably have integer coefficients and are of degree n-2. The sequence is triangle of coefficients of polynomials Q_n(b).
The r-th row contains r-1 entries.
Since, evidently, P_n(1)=1, then the row sums form sequence A156769 repeated.

Examples

			Triangle begins (r is the number of row or the number of polynomial; coefficients of b^k, k=r-2-i, i=0,1,..., r-2)
r/i.|..0......1......2.....3.....4......5......6.....7
======================================================
.2..|..1
.3..|..2.....-1
.4..|..1......3.....-1
.5..|..2......6.....-8.....3
.6..|..2.....10.....10...-10.....3
.7..|..4.....20.....10...-50....46....-15
.8..|.17....119....245....35..-217....161....-45
.9..|.34....238....406..-350..-644...1372..-1056....315
For example, if r=4, the polynomial
P_4(b)=b*(b^2+3*b-1)/A156769(4/2)=b/3*(b^2+3*b-1) (b==0 mod 2)
gives difference between multiples of b+1 with even and odd digit sums in  base b in interval [0, b^4). Note also that P_2(b)=b. Therefore, setting in the formula n=r=3, again for P_4(b) we have P_4(b)=b*C(b+1,2)-C(b,3)=b/3*(b^2+3*b-1).
		

Crossrefs

Programs

  • Mathematica
    A156769[n_] := Denominator[(2^(2*n-2)/Factorial[2*n-1])]; poly[1, b_] := 1; poly[2, b_] := b; poly[n_, b_] :=  poly[n, b] = If[OddQ[n], (-1)^((n - 1)/2) (FunctionExpand[Binomial[b - 1, n - 1]] - Sum[(-1)^(k/2) FunctionExpand[Binomial[b + 1, n - k - 1]] poly[k + 1, b], {k, 0, n - 2, 2}]), (-1)^((n - 2)/2) (FunctionExpand[Binomial[b, n - 1]] - Sum[(-1)^((k - 1)/2) FunctionExpand[Binomial[b + 1, n - k - 1]] poly[k + 1, b], {k, 1, n - 2, 2}])]; Table[If[EvenQ[z], Most[Reverse[CoefficientList[poly[z, b] A156769[z/2], b]]], Reverse[CoefficientList[poly[z, b] A156769[(z - 1)/2], b]]], {z, 2, 12}]

Formula

If n>=2 is even, then P_(n+1)(b) = (-1)^((n-2)/2)*(C(b+1,n)-C(b-1,n))-sum{i=2,4,...,n-2}(-1)^((n+i)/2)*C(b+1, n-i)*P_(i+1)(b), where P_n(b)=b*Q_n(b)/A156769(n/2);
if n>=3 is odd, then P_(n+1)(b) = (-1)^((n-1)/2)*(C(b,n)-b*C(b+1,n-1))+sum{i=3,5,...,n-2}(-1)^((n+i)/2)*C(b+1, n-i)*P_(i+1)(b), where
P_n(b) = Q_n(b)/A156769((n-1)/2).
P_n(b) = 2/(b+1)*Sum_{j=1..b/2}(tan(j*Pi/(b+1)))^n, if n is even, and
P_n(b) = 2/(b+1)*Sum_{j=1..b/2}(tan(j*Pi/(b+1)))^n*sin(j*Pi/(b+1)), if n is odd.

A232535 Triangle T(n,k), 0 <= k <= n, read by rows defined by: T(n,k) = (binomial(2*n,2*k) + binomial(2*n+1,2*k))/2.

Original entry on oeis.org

1, 1, 2, 1, 8, 3, 1, 18, 25, 4, 1, 32, 98, 56, 5, 1, 50, 270, 336, 105, 6, 1, 72, 605, 1320, 891, 176, 7, 1, 98, 1183, 4004, 4719, 2002, 273, 8, 1, 128, 2100, 10192, 18590, 13728, 4004, 400, 9, 1, 162, 3468, 22848, 59670, 68068, 34476, 7344, 561, 10, 1, 200, 5415
Offset: 0

Views

Author

Philippe Deléham, Nov 25 2013

Keywords

Comments

Sum_{k=0..n}T(n,k)*x^k = A164111(n), A000012(n), A002001(n), A001653(n+1), A001019(n), A166965(n) for x =-1, 0, 1, 2, 4, 9 respectively.

Examples

			Triangle begins:
1
1, 2
1, 8, 3
1, 18, 25, 4
1, 32, 98, 56, 5
1, 50, 270, 336, 105, 6
1, 72, 605, 1320, 891, 176, 7
1, 98, 1183, 4004, 4719, 2002, 273, 8
1, 128, 2100, 10192, 18590, 13728, 4004, 400, 9
		

Crossrefs

Cf. Columns : A000012, A001105, A180324 ; Diagonals: A000027, A131423
Cf. T(2*n,n): A228329, Row sums : A002001

Programs

  • Maple
    T := (n,k) -> binomial(2*n, 2*k)*(2*n+1-k)/(2*n+1-2*k);
    seq(seq(T(n,k), k=0..n), n=0..9); # Peter Luschny, Nov 26 2013
  • Mathematica
    Flatten[Table[(Binomial[2n,2k]+Binomial[2n+1,2k])/2,{n,0,10},{k,0,n}]] (* Harvey P. Dale, Jul 05 2015 *)

Formula

G.f.: (1-x)/(1-2*x*(1+y)+x^2*(1-y)^2).
T(n,k) = 2*T(n-1,k)+2*T(n-1,k-1)+2*T(n-2,k-1)-T(n-2,k)-T(n-2,k-2), T(0,0)=T(1,0)=1, T(1,1)=2, T(n,k)=0 if k<0 or if k>n.
T(n,k) = (A086645(n,k) + A091042(n,k))/2.
T(n,k) = binomial(2*n,2*k)*(2*n+1-k)/(2*n+1-2*k). - Peter Luschny, Nov 26 2013
Previous Showing 21-24 of 24 results.