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.

A057979 a(n) = 1 for even n and (n-1)/2 for odd n.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1
Offset: 0

Views

Author

Labos Elemer, Nov 13 2000

Keywords

Comments

a(n) = b(n)/c(n) where b(n) = A001405(n+1) - A001405(n), c(n) = gcd(A001405(n+1), A001405(n)).
Also the minimal number of disjoint edge-paths into which the complete graph on n edges can be partitioned - Felix Goldberg (felixg(AT)tx.technion.ac.il), Jan 19 2001
For n >= 2, number of partitions of n-2 into parts that are distinct mod 2. - Giovanni Resta, Feb 06 2006
Sequence starting with a(3) obeys the rule "smallest positive value such that the ordered pair (a(n-1),a(n)) has not occurred previously", or the rule "smallest positive value such that the ratio a(n-1)/a(n) has not occurred previously". The same subsequence has its ordinal transform equal to itself, shifted left. (The ordinal transform has as its n-th term the number of values in a(1),...,a(n) that are equal to a(n).) - Franklin T. Adams-Watters, Dec 13 2006
Numerators of floor(n/2)/n, n > 0. - Wesley Ivan Hurt, Jun 14 2013
Number of nonisomorphic outer planar graphs of order n >= 3, maximum degree 3, and largest possible size. The size is (3n-2)/2 when n is even and (3n-3)/2 when n is odd. - Christian Barrientos and Sarah Minion, Feb 27 2018

Examples

			For n=12, C(12,6) - C(11,5) = 924 - 462 = 462, gcd(C(12,6), C(11,5)) = 462, and the quotient is 1.
For n=13, C(13,6) - C(12,6) = 792, gcd(C(13,6), C(12,6)) = 132, and the quotient is 6.
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a057979 n = 1 - rest * (1 - n') where (n', rest) = divMod n 2
    a057979_list = concat $ transpose [repeat 1, [0..]]
    -- Reinhard Zumkeller, Aug 11 2014
    
  • Magma
    [Floor(n/2)^(n mod 2): n in [0..100]]; // Vincenzo Librandi, Mar 17 2015
    
  • Maple
    A057979:=n->(n+1)/4+(3-n)*(-1)^n/4; seq(A057979(k), k=0..100); # Wesley Ivan Hurt, Oct 14 2013
  • Mathematica
    With[{no=45},Riffle[Table[1,{no}],Range[0,no-1]]] (* Harvey P. Dale, Feb 18 2011 *)
  • PARI
    a(n)=if(n%2,n-1,2)/2 \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    def A057979(n): return n>>1 if n&1 else 1 # Chai Wah Wu, Jan 04 2024

Formula

a(n) = (n+1)/4+(3-n)*(-1)^n/4. - Paul Barry, Mar 21 2003, corrected by Hieronymus Fischer, Sep 25 2007
a(n) = (a(n-2) + a(n-3)) / a(n-1).
From Paul Barry, Oct 21 2004: (Start)
G.f.: (1-x^2+x^3)/((1+x)^2(1-x)^2);
a(n) = 2*a(n-2) - a(n-4);
a(n) = 0^n + Sum_{k=0..floor((n-2)/2)} C(n-k-2,k) * C(1,n-2k-2). (End)
a(n) = gcd(n-1, floor((n-1)/2)). - Paul Barry, May 02 2005
a(n) = binomial((2n-3)/4-(-1)^n/4, (1-(-1)^n)/2). - Paul Barry, Jun 29 2006
G.f.: (x^3-x^2+1)/(1-x^2)^2 = 1 + x^2*G(0) where G(k) = 1 + x*(k+1)/(1 - x/(x + (k+1)/G(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 29 2012
a(n) = binomial(floor(n/2), n mod 2). - Wesley Ivan Hurt, Oct 14 2013
a(n) = 1 - n mod 2 * (1 - floor(n/2)). - Reinhard Zumkeller, Aug 11 2014
a(n) = floor(n/2)^(n mod 2). - Wesley Ivan Hurt, Mar 16 2015
E.g.f.: ((2 + x)*cosh(x) - sinh(x))/2. - Stefano Spezia, Mar 26 2022

A224783 Denominator of Bernoulli(n,1/2) - Bernoulli(n,0).

Original entry on oeis.org

1, 2, 4, 1, 16, 1, 64, 1, 256, 1, 1024, 1, 4096, 1, 16384, 1, 65536, 1, 262144, 1, 1048576, 1, 4194304, 1, 16777216, 1, 67108864, 1, 268435456, 1, 1073741824, 1, 4294967296, 1, 17179869184, 1, 68719476736, 1, 274877906944, 1, 1099511627776
Offset: 0

Views

Author

Paul Curtz, Apr 17 2013

Keywords

Comments

See A157779 and A157780 for values of Bernoulli(n,1/2), and A027641 and A027642 for values of Bernoulli(n,0).
B(n,1/2) - B(n,0) = 0, 1/2, -1/4, 0, 1/16, 0, -3/64, 0, 17/256, 0, -155/1024, 0, 2073/4096, 0, -38227/16384,... for n>=0.
The sequence of numerators is 0, 1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073, 0, -38227, 0, 929569, 0, -28820619, 0, 1109652905,...and appears to contain a mix of A001469 and A036968.

Examples

			a(0) = 1-1, a(1) = 0+1/2, a(2) = -1/12-1/6=-1/4.
		

Crossrefs

Programs

  • Maple
    A224783 := proc(n)
        bernoulli(n,1/2)-bernoulli(n) ;
        denom(%) ;
    end proc: # R. J. Mathar, Apr 25 2013
  • Mathematica
    Table[Denominator[BernoulliB[n, 1/2] - BernoulliB[n, 0]], {n, 0, 50}] (* Vincenzo Librandi, Mar 19 2014 *)
  • PARI
    Vec((4*x^5-9*x^3-x^2+2*x+1)/((x-1)*(x+1)*(2*x-1)*(2*x+1)) + O(x^100)) \\ Colin Barker, Mar 20 2014

Formula

a(n) = A059222(n+1) if n <> 1.
From Colin Barker, Mar 19 2014: (Start)
G.f.: (4*x^5-9*x^3-x^2+2*x+1) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)).
a(n) = 5*a(n-2)-4*a(n-4) for n>5.
a(n) = (1+(-2)^n-(-1)^n+2^n)/2 for n>1. (End).

A363400 Triangle read by rows. T(n, k) = [x^k] P(n, x), where P(n, x) = Sum_{k=0..n} 2^(n - k) * Sum_{j=0..k} (x^j * binomial(k, j) * ((2 - (n mod 2)) * j + 1)^n).

Original entry on oeis.org

1, 3, 2, 7, 36, 25, 15, 88, 135, 64, 31, 2106, 10000, 14406, 6561, 63, 1824, 10206, 22528, 21875, 7776, 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809, 255, 31616, 478953, 2670592, 7265625, 10357632, 7411887, 2097152
Offset: 0

Views

Author

Peter Luschny, May 31 2023

Keywords

Comments

In A363398 we give an inclusion-exclusion representation for 2^n*Euler(n), and in A363399 we give such a representation of 2^n*Euler(n, 1) = A155585(n). Here the two representations are combined into one of A000111.

Examples

			Triangle T(n, k) starts:
[0]   1;
[1]   3,     2;
[2]   7,    36,      25;
[3]  15,    88,     135,      64;
[4]  31,  2106,   10000,   14406,     6561;
[5]  63,  1824,   10206,   22528,    21875,     7776;
[6] 127, 87480, 1546875, 7529536, 15411789, 14172488, 4826809;
[7] 255, 31616,  478953, 2670592,  7265625, 10357632, 7411887, 2097152;
		

Crossrefs

Cf. A126646 (column 0), A363401 (row sums), A000111, A059222, A002436.
Cf. A363398 (secant case), A363399 (tangent case).

Programs

  • Maple
    P := (n, x) -> add(add(x^j * binomial(k, j) * ((2 - irem(n, 2)) * j + 1)^n,
    j = 0..k) * 2^(n - k), k = 0..n): T := (n, k) -> coeff(P(n, x), x, k):
    seq(seq(T(n, k), k = 0..n), n = 0..8);
  • Mathematica
    From Detlef Meya, Oct 04 2023: (Start)
    T[n_, k_] := (2^(n+1)-Binomial[n+1, n-k+1]*Hypergeometric2F1[1, -k, n-k+2, -1])*(2*k+1-k*Mod[n, 2])^n;
    (* Or: *)
    T[n_, k_] := (2*k+1-k*Mod[n, 2])^(n-1)*Sum[Binomial[n+1, j], {j, 0, n-k}]*(2*k+1-k*Mod[n, 2]);
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* End *)

Formula

T(n, k) = A363399(n, k) for 0 <= k <= n if n is odd otherwise A363398(n, k).
(Sum_{k=0..n} (-1)^k * T(n, k)) / h(n) = A000111(n), where h(n) = (-1)^binomial(n, 2) * 2^(n * iseven(n)), see A059222.
From Detlef Meya, Oct 04 2023: (Start)
T(n, k) = (2*k + 1 - k*(n mod 2))^(n - 1)*add(binomial(n + 1, j), j = 0..n - k)*(2*k + 1 - k*(n mod 2)).
T(n, k) = (2^(n + 1) - binomial(n + 1, n - k + 1)*hypergeom([1, -k], [n - k + 2], -1))*(2*k + 1 - k*(n mod 2))^n. (End)
Showing 1-3 of 3 results.