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

A346374 a(n) = f(n,n) where f(0,n) = f(n,0) = n! and f(m,n) = f(m-1,n) + f(m,n-1) + f(m-1,n-1).

Original entry on oeis.org

1, 3, 15, 85, 511, 3221, 21339, 149969, 1133215, 9343525, 85089883, 860979329, 9665236335, 119534610885, 1613648163963, 23564301925713, 369437215969599, 6180713141601765, 109812899448776475, 2063836219057694753, 40894619124091715983, 851891564231714448133
Offset: 0

Views

Author

Keywords

Comments

Main diagonal of square array of Delannoy-like numbers, but with the borders given by n! instead of 1.
All terms are odd.
a(n+1)/a(n) ~ n (conjectured).

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, y!,
          b(x-1, y)+b(sort([x, y-1])[])+b(x-1, y-1))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..26);  # Alois P. Heinz, Jul 14 2021
  • Mathematica
    F[0, 0] = 1; F[m_, 0] := m!; F[0, n_] := n!;
    F[m_, n_] := F[m, n] =   F[m - 1 , n ] + F[m , n - 1] +  F[m - 1, n - 1];
    Table[F[n, n], {n, 0, 100}]

Formula

Conjecture:
0 = (310000 - 87575*n^2 + 25110*n^3 - 2015*n^4)*a(n-6)
+ (-3082368 + 190872*n + 1063326*n^2 - 378291*n^3 + 37173*n^4)*a(n-5)
+ (8418604 - 1615685*n - 3834272*n^2 + 1836495*n^3 - 232486*n^4)*a(n-4)
+ (-4087868 + 3360702*n + 3358400*n^2 - 2858550*n^3 + 517914*n^4)*a(n-3)
+ (-3408770 - 992468*n + 1472981*n^2 + 176556*n^3 - 157931*n^4)*a(n-2)
+ (582108 + 205634*n - 541582*n^2 + 120633*n^3 + 12993*n^4)*a(n-1)
+ (-3362 - 20943*n + 37298*n^2 - 12993*n^3)*a(n).

A369580 a(n) := f(n, n), where f(0,0) = 1/3, f(0,k) = 0 and f(k,0) = 3^(k-1) if k > 0, and f(n, m) = f(n, m-1) + f(n-1, m) + 3*f(n-1, m-1) otherwise.

Original entry on oeis.org

2, 16, 138, 1216, 10802, 96336, 861114, 7708416, 69072354, 619380496, 5557080938, 49879087296, 447852531986, 4022246329936, 36132550233498, 324645166734336, 2917340834679234, 26219438520320016, 235672871308226634, 2118552629658530496, 19046140604787232242, 171241206828437556816
Offset: 1

Views

Author

Tadayoshi Kamegai, Jan 26 2024

Keywords

Comments

Take turns flipping a fair coin. The first to n heads wins. Sequence gives numerator of probability of first player winning. The denominator is .3^(2n-1).
It appears that a(n) for any n is divisible by 2^(A001511(n)).

Crossrefs

Cf. A001511 (see comments), A162326 (see formula).

Programs

  • Python
    def lis(n):
        table = [[0]*(n+1) for _ in range(n+1)]
        table[1][1] = 2
        for i in range(1, n+1) :
            table[i][0] = 3**(i-1)
        for i in range(1, n+1) :
            for j in range(1, n+1) :
                if (i == 1 and j == 1) :
                    continue
                table[i][j] = table[i][j-1] + table[i-1][j] + 3*table[i-1][j-1]
        return [int(table[i][i]) for i in range(1, n+1)]

Formula

Limit_{n->oo} a(n)/3^(2n-1) = 1/2.
a(n) = Sum_{i>=n} Sum_{j=0..n-1} binomial(i-1,n-1)*binomial(i-1,j)*3^(2n-1)/2^(2i-1).
9*a(n) - a(n+1) = 2*A162326(n) (conjectured).
a(n) = 3^(2n-1)*A(n, n) where A(0, k) = 0 for k > 0, A(k, 0) = 1 for k >= 0 and A(n, m) = (A(n-1, m) + A(n, m-1) + A(n-1, m-1))/3.

A346385 a(n) = f(n,n) where f(0,n) = f(n,0) = n^n and f(m,n) = f(m-1,n) + f(m,n-1) + f(m-1,n-1).

Original entry on oeis.org

1, 3, 19, 151, 1439, 16651, 234651, 3966271, 78504063, 1778555587, 45302809003, 1279960719335, 39697452556959, 1340332692660027, 48929424425580219, 1920103548827941263, 80597817202971009535, 3603262730476776975731, 170923354522784683176267
Offset: 0

Views

Author

Keywords

Comments

Main diagonal of square array of Delannoy-like numbers, but with the borders given by n^n instead of 1.
a(n+1)/a(n) ~ e*n (conjectured).

Crossrefs

Programs

  • Mathematica
    F[0, 0] = 1; F[m_, 0] := m!; F[0, n_] := n^n;
    F[m_, n_] := F[m, n] =   F[m - 1 , n ] + F[m , n - 1] +  F[m - 1, n - 1];
    Table[F[n, n], {n, 0, 100}]

Formula

Conjecture:
0 = (310000 - 87575*n^2 + 25110*n^3 - 2015*n^4)*a(n-6)
+ (-3082368 + 190872*n + 1063326*n^2 - 378291*n^3 + 37173*n^4)*a(n-5)
+ (8418604 - 1615685*n - 3834272*n^2 + 1836495*n^3 - 232486*n^4)*a(n-4)
+ (-4087868 + 3360702*n + 3358400*n^2 - 2858550*n^3 + 517914*n^4)*a(n-3)
+ (-3408770 - 992468*n + 1472981*n^2 + 176556 n^3 - 157931*n^4)*a(n-2)
+ (582108 + 205634*n - 541582*n^2 + 120633*n^3 + 12993*n^4)*a(n-1)
+ (-3362 - 20943*n + 37298*n^2 - 12993*n^3)*a(n).

A350519 a(n) = A(n,n) where A(1,n) = A(n,1) = prime(n+1) and A(m,n) = A(m-1,n) + A(m,n-1) + A(m-1,n-1) for m > 1 and n > 1.

Original entry on oeis.org

3, 13, 63, 325, 1719, 9237, 50199, 275149, 1518263, 8422961, 46935819, 262512929, 1472854451, 8285893713, 46723439019, 264009961733, 1494486641911, 8473508472009, 48112827862527, 273541139290857, 1557023508876891, 8872219429659729, 50605041681538595, 288897992799897481
Offset: 1

Views

Author

Yigit Oktar, Jan 02 2022

Keywords

Comments

Replacing prime(n+1) by other functions f(n) we can get many other sequences. For example, with f(n) = 1 we get A001850.

Examples

			The two-dimensional recurrence A(m,n) can be depicted in matrix form as
   3   5   7   11   13    17    19 ...
   5  13  25   43   67    97   133 ...
   7  25  63  131  241   405   635 ...
  11  43 131  325  697  1343  2383 ...
  13  67 241  697 1719  3759  7485 ...
  17  97 405 1343 3759  9237 20481 ...
  19 133 635 2383 7485 20481 50199 ...
  ...
and then a(n) is the main diagonal of this matrix, A(n,n).
		

Crossrefs

Cf. A000040, A001850, A002002, A050151, A344576 (see comments).

Programs

  • MATLAB
    clear all
    close all
    sz = 14
    f = zeros(sz,sz);
    pp = primes(50);
    f(1,:) = pp(2:end);
    f(:,1) = pp(2:end);
    for m=2:sz
        for  n=2:sz
            f(m,n) = f(m-1,n-1)+f(m,n-1)+f(m-1,n);
        end
    end
    an = []
    for n=1:sz
        an = [an f(n,n)];
    end
    S = sprintf('%i,',an);
    S = S(1:end-1)
  • Mathematica
    f[1,1]=3;f[m_,1]:=Prime[m+1];f[1,n_]:=Prime[n+1];f[m_,n_]:=f[m,n]=f[m-1,n]+f[m,n-1]+f[m-1,n-1];Table[f[n,n],{n,25}] (* Giorgos Kalogeropoulos, Jan 03 2022 *)
Showing 1-4 of 4 results.