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 41-50 of 73 results. Next

A333119 Triangle T read by rows: T(n, k) = (n - k)*(1 - (-1)^k + 2*k)/4, with 0 <= k < n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 3, 2, 2, 0, 4, 3, 4, 2, 0, 5, 4, 6, 4, 3, 0, 6, 5, 8, 6, 6, 3, 0, 7, 6, 10, 8, 9, 6, 4, 0, 8, 7, 12, 10, 12, 9, 8, 4, 0, 9, 8, 14, 12, 15, 12, 12, 8, 5, 0, 10, 9, 16, 14, 18, 15, 16, 12, 10, 5, 0, 11, 10, 18, 16, 21, 18, 20, 16, 15, 10, 6
Offset: 1

Views

Author

Stefano Spezia, Mar 08 2020

Keywords

Comments

T(n, k) is the k-th super- and subdiagonal sum of the matrix M(n) whose permanent is A332566(n).
The h-th subdiagonal of the triangle T gives 0 followed by the multiples of h+1 repeated.
For k > 0, the (2*k-1)-th and (2*k)-th columns of the triangle T give the multiples of k.

Examples

			n\k| 0 1 2 3 4 5
---+------------
1  | 0
2  | 0 1
3  | 0 2 1
4  | 0 3 2 2
5  | 0 4 3 4 2
6  | 0 5 4 6 4 3
...
For n = 4 the matrix M(4) is
      0 1 1 2
      1 0 1 1
      1 1 0 1
      2 1 1 0
and therefore T(4, 0) = 0, T(4, 1) = 3, T(4, 2) = 2 and T(4, 3) = 2.
		

Crossrefs

Cf. A332566.
Cf. A000004: 1st column; A000027: 2nd and 3rd column; A004526: diagonal; A005843: 4th and 5th column; A052928: 1st subdiagonal; A168237: 2nd subdiagonal; A168273: 3rd subdiagonal; A173196: row sums.

Programs

  • Mathematica
    T[n_,k_]:=(n-k)(1-(-1)^k+2k)/4; Flatten[Table[T[n,k],{n,1,12},{k,0,n-1}]] (* or *)
    r[n_] := Table[SeriesCoefficient[y*(x*(2 + y + y^2) - (1 + y + 2*y^2))/((1 - x)^2 *(1 - y)^3 (1 + y)^2), {x, 0, i}, {y, 0, j}], {i, n, n}, {j, 0, n-1}]; Flatten[Array[r, 12]]

Formula

O.g.f.: y*(x*(2 + y + y^2) - (1 + y + 2*y^2))/((1 - x)^2*(1 - y)^3*(1 + y)^2).
T(n, k) = k*(n - k)/2 for k even.
T(n, k) = (1 + k)*(n - k)/2 for k odd.

A372602 The maximal exponent in the prime factorization of the largest square dividing n.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 4, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 2, 6, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 4, 4, 0, 0, 2, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, May 07 2024

Keywords

Crossrefs

Similar sequences: A007424, A368781, A372601, A372603, A372604.

Programs

  • Mathematica
    f[n_] := 2 * Floor[n/2]; a[n_] := f[Max[FactorInteger[n][[;; , 2]]]]; a[1] = 0; Array[a, 100]
  • PARI
    s(n) = n \ 2 * 2;
    a(n) = if(n>1, s(vecmax(factor(n)[,2])), 0);

Formula

a(n) = A051903(A008833(n)).
a(n) = A052928(A051903(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 * Sum_{i>=1} (1 - (1/zeta(2*i))) = 0.98112786070359477197... .

A128217 Nonnegative integers n such that the square-root of n differs from its nearest integer by less than 1/4.

Original entry on oeis.org

0, 1, 4, 5, 8, 9, 10, 15, 16, 17, 18, 23, 24, 25, 26, 27, 34, 35, 36, 37, 38, 39, 46, 47, 48, 49, 50, 51, 52, 61, 62, 63, 64, 65, 66, 67, 68, 77, 78, 79, 80, 81, 82, 83, 84, 85, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

John W. Layman, Feb 19 2007

Keywords

Comments

The squares are a subsequence; apparently A052928(n-1) = number of terms between (n-1)^2 and n^2. - Reinhard Zumkeller, Jun 20 2015

Crossrefs

Cf. A063656. See the first differences in A128218.

Programs

  • Haskell
    a128217 n = a128217_list !! (n-1)
    a128217_list = filter f [0..] where
       f x = 4 * abs (root - fromIntegral (round root)) < 1
             where root = sqrt $ fromIntegral x
    -- Reinhard Zumkeller, Jun 20 2015
    
  • Mathematica
    nsrQ[n_]:=Module[{sr=Sqrt[n]},Abs[First[sr-Nearest[{Floor[sr], Ceiling[sr]},sr]]]<1/4]; Select[Range[0,150],nsrQ] (* Harvey P. Dale, Aug 19 2011 *)
  • Python
    from itertools import count, islice
    from math import isqrt
    def A128217_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:(m:=n<<4)<(k:=(isqrt(n)<<2)+1)**2 or m>(k+2)**2, count(max(startvalue,0)))
    A128217_list = list(islice(A128217_gen(),40)) # Chai Wah Wu, Jun 06 2025

Extensions

Offset changed by Reinhard Zumkeller, Jun 20 2015

A142961 Irregular triangle read by rows: coefficients of polynomials related to a family of convolutions of certain central binomial sequences.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, -2, 1, 30, 35, -10, 5, 70, 63, 8, -2, -75, 35, 315, 231, 56, -14, -245, 105, 693, 429, -272, 36, 2268, -525, -5880, 2310, 12012, 6435, -2448, 324, 9660, -2037, -16632, 6006, 25740, 12155, 3968, -304, -31260, 3840, 73395, -14091, -90090, 30030, 109395, 46189, 43648, -3344
Offset: 0

Views

Author

Wolfdieter Lang, Sep 15 2008

Keywords

Comments

The row length sequence {r(k)} of this irregular triangle a(k, p) is given by r(0) = 1 = r(1) and r(k) = 2*(floor(k/2)) = A052928(k), k >= 2. This is {1,1,2,2,4,4,6,6,8,8,10,10,...}.
The array of the k-family of convolutions Sigma(k, n) := Sum_{p=0..n} p^k * binomial(2*p, p) * binomial(2*(n-p), n-p) can be written as Sigma(k, n) = ((4^n)*c(k, n) / A046161(k)) * Sum_{p=0..r(k)-1} a(k, p)*n^p, where c(k, n) = n for even k >= 2 and c(k, n) = n^2 for odd k >= 3, with c(0, n) = 1, c(1, n).
The author was led to compute such sums by a question asked by M. Greiter, Jun 27 2008.

Examples

			The irregular triangle a(k, p) begins:
k\p  0  1   2   3   4   5 ...
0:   1
1:   1
2:   1  3
3:   3  5
4:   2 -1  30  35
5: -10  5  70  63
6:   8 -2 -75  35 315 231
...
k=3: Sigma(3, n) = Sum_{p=0..n} p^3 * binomial(2*p, p) * binomial(2*(n-p), n-p) = (4*n/16)*n^2*(3 + 5*n), for n >= 0. This is the sequence {0, 2, 52, 648, 5888, 44800, 304128, 1906688, 11272192, 63700992, ...}.
		

Crossrefs

Formula

a(k, p)= [n^p] P(k, n) where c(k, n)*P(k, n) = A046161(k)*Sigma(k, n)/(4^n), with c(k, n) and the array Sigma(k, n) given above. A046161(k) are the denominators of binomial(2*k, k)/4^k: [1, 2, 8, 16, 128, 256, 1024, 2048, 32768, 65536, 262144,...].
Sigma(k, n)/4^n = Sum_{p=0..min(n, k)} binomial(n, p)*(2*p -1)!!*S2(k, p)/2^p, with the double factorials (2*p -1)!!= A001147(p), with (-1)!! := 1, and the Stirling numbers of the second kind S2(k, p):=A048993(k, p). (Proof from the product of the o.g.f.s and the normal ordering (x^d_x)^k = Sum_{p=0..k} (S2(k, p)*x^p*d_x^p), with the derivative operator d_x.)

Extensions

Name changed, edited and corrected by Wolfdieter Lang, Aug 23 2019

A262666 Irregular table read by rows: T(n,k) is the number of binary bisymmetric n X n matrices with exactly k 1's; n>=0, 0<=k<=n^2.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 4, 0, 8, 0, 12, 0, 14, 0, 12, 0, 8, 0, 4, 0, 1, 1, 1, 4, 4, 10, 10, 20, 20, 31, 31, 40, 40, 44, 44, 40, 40, 31, 31, 20, 20, 10, 10, 4, 4, 1, 1, 1, 0, 6, 0, 21, 0, 56, 0, 120, 0, 216, 0, 336, 0, 456, 0
Offset: 0

Views

Author

Kival Ngaokrajang, Sep 26 2015

Keywords

Comments

T(n,k) = 0 if n is even and k is odd.
T(n,k) = T(n,k+1) if n is odd and k is even.

Examples

			Irregular table begins:
n\k 0   1   2   3   4   5   6   7   8   9   ...
0:  1
1:  1   1
2:  1   0   2   0   1
3:  1   1   2   2   2   2   2   2   1   1
4:  1   0   4   0   8   0  12   0  14   0   ...
5:  1   1   4   4  10  10  20  20  31  31   ...
...
		

Crossrefs

Row sums give A060656(n+1).
Columns k=0-3 give: A000012, A000035, A052928, A237420(n+1).

Programs

  • Maple
    T:= n-> seq(coeff((t->(1+x^2)^(n-t)*(1+x)^t*(1+x^4)^
          (((n-2)*n+t)/4))(irem(n, 2)), x, i), i=0..n^2):
    seq(T(n), n=0..6);  # Alois P. Heinz, Sep 27 2015

Formula

G.f. for row n: (1+x)^t*(1+x^2)^(n-t)*(1+x^4)^(((n-2)*n+t)/4) where t = n mod 2. - Alois P. Heinz, Sep 27 2015

Extensions

More terms from Alois P. Heinz, Sep 27 2015

A268819 Column 32769 of array A269158: a(n) = F(n,65537), function F as defined in A269158.

Original entry on oeis.org

0, 98305, 3, 0, 6, 98306, 2, 98305, 12, 98311, 14, 3, 1, 98307, 9, 0, 24, 98317, 24, 6, 16, 98319, 27, 98306, 0, 98304, 23, 2, 30, 98312, 2, 98305, 48, 98329, 0, 12, 52, 98329, 6, 98311, 3, 98321, 3, 14, 14, 98330, 3, 3, 41, 98305, 43, 1, 4, 98326, 45, 98307, 6, 98335, 43, 9, 27, 98307, 19, 0, 27, 98353, 2, 24, 100, 98305, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

Terms a(1) .. a(65536) occur as column 32769 in arrays A268728 and A269158.

Crossrefs

Cf. arrays A268728 and A269158.
Cf. A269157 (indices of zeros).

Programs

  • Scheme
    ;; Two variants, both give same results in range n=1..65536:
    (define (A268819 n) (A268728auxbi n 65537))
    (define (A268819 n) (A269158auxbi n 65537))

Formula

a(n) = F(n,65537) = A269158(n,32769), function F as defined in A269158.
Other identities. For n = 1..65536:
a(n) = A268728(n,32769).
A165471(n) = 1 - A010873(A052928(a(n))).

A275730 Square array A(n,d): overwrite with zero the digit at position d from right (indicating radix d+2) in the factorial base representation of n, then convert back to decimal, read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 4, 0, 1, 2, 3, 0, 4, 0, 1, 2, 3, 4, 1, 6, 0, 1, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 1, 6, 8, 0, 1, 2, 3, 4, 5, 6, 7, 2, 7, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 3, 6, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 7, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 12, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14
Offset: 0

Views

Author

Antti Karttunen, Aug 08 2016

Keywords

Examples

			Columns 0-4 of rows 0 - 24 of the array:
  0, 0, 0, 0, 0, ... [No matter which digit of zero we clear, it stays zero forever]
  0, 1, 1, 1, 1  ... [When clearing the least significant digit (pos. 0) of one, "1", we get zero, and clearing any other digit past the most significant digit keeps one as one]
2, 0, 2, 2, 2, ... [Clearing the least significant digit of 2, "10", doesn't affect it, but clearing the digit-1 zeros the whole number].
  2, 1, 3, 3, 3, ... [Clearing the least significant factorial base digit of 3 ("11") gives "10", 2, clearing the digit-1 gives "01" = 1, and clearing any digit past the most significant keeps "11" as it is, 3].
  4, 0, 4, 4, 4
  4, 1, 5, 5, 5
  6, 6, 0, 6, 6
  6, 7, 1, 7, 7
  8, 6, 2, 8, 8
  8, 7, 3, 9, 9
  10, 6, 4, 10, 10
  10, 7, 5, 11, 11
  12, 12, 0, 12, 12
  12, 13, 1, 13, 13
  14, 12, 2, 14, 14
  14, 13, 3, 15, 15
  16, 12, 4, 16, 16
  16, 13, 5, 17, 17
  18, 18, 0, 18, 18
  18, 19, 1, 19, 19
  20, 18, 2, 20, 20
  20, 19, 3, 21, 21
  22, 18, 4, 22, 22
  22, 19, 5, 23, 23
  24, 24, 24, 0, 24
  ...
		

Crossrefs

Transpose: A275731.
Column 0: A052928, Main diagonal: A001477.
Can be used when computing A275732 and A275736.

Programs

  • Scheme
    (define (A275730 n) (A275730bi (A002262 n) (A025581 n)))
    (define (A275730bi n c) (let loop ((z 0) (n n) (m 2) (f 1) (c c)) (let ((d (modulo n m))) (cond ((zero? n) z) ((zero? c) (loop z (/ (- n d) m) (+ 1 m) (* f m) (- c 1))) (else (loop (+ z (* f d)) (/ (- n d) m) (+ 1 m) (* f m) (- c 1)))))))

Formula

Other identities:
For all n >= 1, A(n,A084558(n)-1) = A257687(n).
For all n >= 0, A(n,A084558(n)) = n.

A316354 Triangle read by rows: T(1,1)=1, T(n,k) = T(n,k+1)+T(n-k,max(2*floor(k/2)-1,1)) and T(n,k) = 0 if k > A316355(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 1, 7, 3, 1, 13, 6, 2, 24, 11, 4, 45, 21, 8, 1, 84, 39, 15, 2, 1, 156, 72, 27, 3, 1, 291, 135, 51, 6, 2, 543, 252, 96, 12, 4, 1013, 470, 179, 23, 8, 1889, 876, 333, 42, 15, 3524, 1635, 622, 79, 28, 1, 6575, 3051, 1162, 149, 53, 2, 1, 12266, 5691
Offset: 1

Views

Author

Seiichi Manyama, Jun 30 2018

Keywords

Examples

			  n\k |   1   2   3  4  5
  ----+-------------------
   1  |   1;
   2  |   1;
   3  |   2,  1;
   4  |   4,  2,  1;
   5  |   7,  3,  1;
   6  |  13,  6,  2;
   7  |  24, 11,  4;
   8  |  45, 21,  8, 1;
   9  |  84, 39, 15, 2, 1;
  10  | 156, 72, 27, 3, 1;
		

Crossrefs

Columns 1,2 give A224704, A316356 (for n>0).

A346663 The number of nonreal roots of Sum_{k=0..n} prime(k+1)*x^k.

Original entry on oeis.org

0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 46, 48, 48, 50, 50, 52, 52, 54, 54, 56, 56, 58, 58, 60, 60, 62, 62, 64, 64, 66, 66, 68, 68, 70, 70, 72, 72
Offset: 0

Views

Author

W. Edwin Clark, Jul 27 2021

Keywords

Comments

This agrees with A052928 until n = 2436. a(2436) = 2434 and A052928(2436) = 2436. For n >= 2436 we have a(n) = n-2 for n even and a(n) = n - 1 for n odd, for an as yet undetermined number of n. A052928(n) = n - (n mod 2) for all n. See the paper by W. Clark and M. Shattuck linked to below.

Crossrefs

A360764 Number T(n,k) of sets of nonempty strict integer partitions with a total of k parts and total sum of n; triangle T(n,k), n>=0, 0<=k<=max(i:T(n,i)>0), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 1, 0, 1, 4, 2, 0, 1, 4, 6, 1, 0, 1, 6, 8, 4, 0, 1, 6, 13, 9, 1, 0, 1, 8, 18, 16, 6, 0, 1, 8, 24, 29, 13, 2, 0, 1, 10, 30, 43, 29, 6, 0, 1, 10, 39, 64, 52, 19, 1, 0, 1, 12, 46, 89, 89, 42, 7, 0, 1, 12, 56, 122, 139, 85, 22, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 19 2023

Keywords

Comments

T(n,k) is defined for all n >= 0 and k >= 0. Terms that are not in the triangle are zero.

Examples

			T(6,1) = 1: {[6]}.
T(6,2) = 4: {[1],[5]}, {[2],[4]}, {[1,5]}, {[2,4]}.
T(6,3) = 6: {[1,2,3]}, {[1],[1,4]}, {[1],[2,3]}, {[2],[1,3]}, {[3],[1,2]}, {[1],[2],[3]}.
T(6,4) = 1: {[1],[2],[1,2]}.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1;
  0, 1,  2;
  0, 1,  2,  1;
  0, 1,  4,  2;
  0, 1,  4,  6,  1;
  0, 1,  6,  8,  4;
  0, 1,  6, 13,  9,  1;
  0, 1,  8, 18, 16,  6;
  0, 1,  8, 24, 29, 13,  2;
  0, 1, 10, 30, 43, 29,  6;
  0, 1, 10, 39, 64, 52, 19, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A052928(n-1) for n>=3.
Row sums give A050342.

Programs

  • Maple
    h:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, h(n, i-1)+x*h(n-i, min(n-i, i-1)))))
        end:
    g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
          g(n, i-1, j-k)*x^(i*k)*binomial(coeff(h(n$2), x, i), k), k=0..j))))
        end:
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
         `if`(i<1, 0, add(b(n-i*j, i-1)*g(i$2, j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..14);
  • Mathematica
    h[n_, i_] := h[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, h[n, i - 1] + x*h[n - i, Min[n - i, i - 1]]]]];
    g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i<0, 0, Sum[g[n, i - 1, j - k]*x^(i*k)*Binomial[Coefficient[h[n, n], x, i], k], {k, 0, j}]]]];
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]*g[i, i, j], {j, 0, n/i}]]]] ;
    T[n_] := CoefficientList[b[n, n], x];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Nov 17 2023, after Alois P. Heinz *)
Previous Showing 41-50 of 73 results. Next