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-3 of 3 results.

A240857 Triangle read by rows: T(0,0) = 0; T(n+1,k) = T(n,k+1), 0 <= k < n; T(n+1,n) = T(n,0); T(n+1,n+1) = T(n,0)+1.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 1, 2, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 1, 2, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 3, 0, 1, 1, 2, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 14 2014

Keywords

Comments

Let h be the initial term of row n, to get row n+1, remove h and then append h and h+1.

Examples

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

Crossrefs

Cf. A048881 (left edge), A000120 (right edge), A000788 (row sums), A000523 (row maxima), A240883 (central terms).
Cf. A035327.

Programs

  • Haskell
    a240857 n k = a240857_tabl !! n !! k
    a240857_row n = a240857_tabl !! n
    a240857_tabl = iterate (\(x:xs) -> xs ++ [x, x + 1]) [0]
    
  • Mathematica
    T[n_, k_] := DigitCount[n + k + 1, 2, 1] - 1; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Amiram Eldar, Aug 01 2023 *)
  • Python
    from math import isqrt
    def A240857(n): return (n-((r:=(m:=isqrt(k:=n+1<<1))+(k>m*(m+1)))*(r-3)>>1)).bit_count()-1 # Chai Wah Wu, Nov 11 2024

Formula

T(n,k) = A048881(n+k), 0 <= k <= n.
For n > 0: T(n,A035327(n)) = 0.

A046818 Number of 1's in binary expansion of 3n+1.

Original entry on oeis.org

1, 1, 3, 2, 3, 1, 3, 3, 3, 3, 5, 2, 3, 2, 4, 4, 3, 3, 5, 4, 5, 1, 3, 3, 3, 3, 5, 3, 4, 3, 5, 5, 3, 3, 5, 4, 5, 3, 5, 5, 5, 5, 7, 2, 3, 2, 4, 4, 3, 3, 5, 4, 5, 2, 4, 4, 4, 4, 6, 4, 5, 4, 6, 6, 3, 3, 5, 4, 5, 3, 5, 5, 5, 5, 7, 4, 5, 4, 6, 6, 5, 5, 7, 6, 7, 1, 3, 3, 3, 3, 5, 3, 4
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000120, A016777 (3n+1).

Programs

  • Haskell
    a046818 = a000120 . a016777  -- Reinhard Zumkeller, Apr 14 2014
  • Mathematica
    Table[Count[IntegerDigits[3 n + 1, 2], 1], {n, 0, 92}] (* Jayanta Basu, Jun 29 2013 *)
    DigitCount[#,2,1]&/@(3Range[0,100]+1) (* Harvey P. Dale, Apr 03 2021 *)

Formula

a(n) = A000120(3n+1).
a(n) = A240883(n) + 1. - Reinhard Zumkeller, Apr 14 2014

A351864 Numerator of zeta({6}_n)/Pi^(6n).

Original entry on oeis.org

1, 1, 4, 2, 4, 1, 4, 4, 4, 4, 16, 2, 4, 2, 8, 8, 4, 4, 16, 8, 16, 1, 4, 4, 4, 4, 16, 4, 8, 4, 16, 16, 4, 4, 16, 8, 16, 4, 16, 16, 16, 16, 64, 2, 4, 2, 8, 8, 4, 4, 16, 8, 16, 2, 8, 8, 8, 8, 32, 8, 16, 8, 32, 32, 4, 4, 16, 8, 16, 4, 16
Offset: 0

Views

Author

Roudy El Haddad, Feb 22 2022

Keywords

Comments

({6}_n) is standard notation for multiple zeta values. It represents (6, ..., 6) where the multiplicity of 6 is n.

Crossrefs

Cf. A351806 (denominators).

Programs

  • Mathematica
    a[n_] := Numerator[6*2^(6*n)/(6*n + 3)!]; Array[a, 71, 0]
  • PARI
    a(n) = 1 << (hammingweight(3*n+1) - 1);

Formula

a(n) = numerator(6*2^(6*n)/(6*n + 3)!).
a(n) = 2^(A000120(3*n + 1) - 1).
a(n) = 2^A240883(n).
Showing 1-3 of 3 results.