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.

A109128 Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 for 0

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 11, 7, 1, 1, 9, 19, 19, 9, 1, 1, 11, 29, 39, 29, 11, 1, 1, 13, 41, 69, 69, 41, 13, 1, 1, 15, 55, 111, 139, 111, 55, 15, 1, 1, 17, 71, 167, 251, 251, 167, 71, 17, 1, 1, 19, 89, 239, 419, 503, 419, 239, 89, 19, 1, 1, 21, 109, 329, 659, 923, 923, 659, 329, 109, 21, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 20 2005

Keywords

Comments

Eigensequence of the triangle = A001861. - Gary W. Adamson, Apr 17 2009

Examples

			Triangle begins as:
  1;
  1   1;
  1   3   1;
  1   5   5   1;
  1   7  11   7   1;
  1   9  19  19   9   1;
  1  11  29  39  29  11   1;
  1  13  41  69  69  41  13   1;
  1  15  55 111 139 111  55  15   1;
  1  17  71 167 251 251 167  71  17   1;
  1  19  89 239 419 503 419 239  89  19   1;
		

Crossrefs

Cf. A000325 (row sums).
Sequence m*binomial(n,k) - (m-1): A007318 (m=1), this sequence (m=2), A131060 (m=3), A131061 (m=4), A131063 (m=5), A131065 (m=6), A131067 (m=7), A168625 (m=8).

Programs

  • Haskell
    a109128 n k = a109128_tabl !! n !! k
    a109128_row n = a109128_tabl !! n
    a109128_tabl = iterate (\row -> zipWith (+)
       ([0] ++ row) (1 : (map (+ 1) $ tail row) ++ [0])) [1]
    -- Reinhard Zumkeller, Apr 10 2012
    
  • Magma
    [2*Binomial(n,k) -1: k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 12 2020
    
  • Maple
    A109128 := proc(n,k)
        2*binomial(n,k)-1 ;
    end proc: # R. J. Mathar, Jul 12 2016
  • Mathematica
    Table[2*Binomial[n,k] -1, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 12 2020 *)
  • Sage
    [[2*binomial(n,k) -1 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Mar 12 2020

Formula

T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 with T(n,0) = T(n,n) = 1.
Sum_{k=0..n} T(n, k) = A000325(n+1) (row sums).
T(n, k) = 2*binomial(n,k) - 1. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Sep 30 2007
T(n, 1) = 2*n - 1 = A005408(n+1) for n>0.
T(n, 2) = n^2 + n - 1 = A028387(n-2) for n>1.
T(n, k) = Sum_{j=0..n-k} C(n-k,j)*C(k,j)*(2 - 0^j) for k <= n. - Paul Barry, Apr 27 2006
T(n,k) = A014473(n,k) + A007318(n,k), 0 <= k <= n. - Reinhard Zumkeller, Apr 10 2012
From G. C. Greubel, Apr 06 2024: (Start)
T(n, n-k) = T(n, k).
T(2*n, n) = A134760(n).
T(2*n-1, n) = A030662(n), for n >= 1.
Sum_{k=0..n-1} T(n, k) = A000295(n+1), for n >= 1.
Sum_{k=0..n} (-1)^k*T(n, k) = 2*[n=0] - A000035(n+1).
Sum_{k=0..n-1} (-1)^k*T(n, k) = A327767(n), for n >= 1.
Sum_{k=0..floor(n/2)} T(n-k, k) = A281362(n).
Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A281362(n-1) - (1+(-1)^n)/2 for n >= 1.
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = b(n), where b(n) is the repeating pattern {1,1,0,-2,-3,-1,2,2,-1,-3,-2,0} with b(n) = b(n-12). (End)

Extensions

Offset corrected by Reinhard Zumkeller, Apr 10 2012

A062803 Number of solutions to x^2 == y^2 (mod n).

Original entry on oeis.org

1, 2, 5, 8, 9, 10, 13, 24, 21, 18, 21, 40, 25, 26, 45, 64, 33, 42, 37, 72, 65, 42, 45, 120, 65, 50, 81, 104, 57, 90, 61, 160, 105, 66, 117, 168, 73, 74, 125, 216, 81, 130, 85, 168, 189, 90, 93, 320, 133, 130, 165, 200, 105, 162, 189, 312, 185, 114, 117, 360, 121, 122, 273
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 19 2001

Keywords

Crossrefs

Programs

  • Mathematica
    f[2, e_] := e*2^e; f[p_, e_] := ((p-1)*e+p)*p^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 10 2020 *)

Formula

a(n) is multiplicative and, for an odd prime p, a(p) = 2*p - 1.
Multiplicative with a(2^e)=e*2^e and a(p^e)=((p-1)*e+p)*p^(e-1) for an odd prime p. - Vladeta Jovovic, Sep 22 2003
From Ridouane Oudra, Jun 17 2025: (Start)
a(n) = (-1)^n*gcd(n,2)*Sum_{d|n} (-1)^d*d*phi(n/d).
a(n) = A327767(n)*A332794(n).
a(2*n) = 2*A344372(n).
a(2*n+1) = A332794(2*n+1). (End)

Extensions

More terms from Vladeta Jovovic, Sep 22 2003

A108524 Number of ordered rooted trees with n generators.

Original entry on oeis.org

1, 2, 7, 32, 166, 926, 5419, 32816, 203902, 1292612, 8327254, 54358280, 358769152, 2390130038, 16051344307, 108548774240, 738563388214, 5052324028508, 34727816264050, 239733805643552, 1661351898336676, 11553558997057772, 80603609263563262, 563972937201926432
Offset: 1

Views

Author

Christian G. Bower, Jun 07 2005

Keywords

Comments

A generator is a leaf or a node with just one child.
The Hankel transform of this sequence is 3^C(n+1,2). The Hankel transform of this sequence with 1 prepended (1,1,2,7,...) is 3^C(n,2). - Paul Barry, Jan 26 2011
a(n) is the number of Schroder paths of semilength n-1 in which the (2,0)-steps that are not on the horizontal axis come in 2 colors. Example: a(3)=7 because we have HH, UDUD, UUDD, HUD, UDH, UBD, and URD, where U=(1,1), H=(2,0), D=(1,-1), while B and R are, respectively, blue and red (2,0)-steps. - Emeric Deutsch, May 02 2011
Also the compositional inverse of A327767. - Peter Luschny, Oct 08 2022

Crossrefs

Programs

  • Maple
    # Using function CompInv from A357588.
    CompInv(24, n -> [1, -2][irem(n-1, 2) + 1]); # Peter Luschny, Oct 08 2022
  • Mathematica
    Rest[CoefficientList[Series[(Sqrt[4*x^2-8*x+1]-1)/(2*x-4), {x, 0, 20}], x]] (* Vaclav Kotesovec, Oct 18 2012 *)
  • Maxima
    a(n):=sum((i*binomial(n+1,i)*sum((-1)^j*2^(n-j)*binomial(n,j)*binomial(2*n-j-i-1,n-1),j,0,n-i))/2^i,i,1,n+1)/(n*(n+1)); /* Vladimir Kruchinin, May 10 2011 */

Formula

G.f.: (sqrt(4*x^2-8*x+1) - 1)/(2*x-4).
G.f.: 1/(1-x-x/(1-2x-x/(1-2x-x/(1-2x-x/(1-2x-x/(1-... (continued fraction). - Paul Barry, Feb 10 2009
a(n) = sum(i=1..n+1, (i*C(n+1,i)*sum(j=0..n-i, (-1)^j*2^(n-j)*C(n,j)*C(2*n-j-i-1,n-1)))/2^i)/(n*(n+1)). - Vladimir Kruchinin, May 10 2011
From Gary W. Adamson, Jul 11 2011: (Start)
a(n) is upper left term in the following infinite square production matrix:
1, 1, 0, 0, 0, ...
1, 1, 1, 0, 0, ...
3, 3, 1, 1, 0, ...
9, 9, 3, 1, 1, ...
...
where columns are (1, 1, 3, 9, 27, 81, ...) prefaced with (0,0,1,2,3,...) zeros. (End)
Conjecture: 2*n*a(n) +(24-17*n)*a(n-1) +4*(4*n-9)*a(n-2) +4*(3-n)*a(n-3)=0. - R. J. Mathar, Nov 14 2011
G.f.: A(x)=(sqrt(4*x^2-8*x+1) - 1)/x/(2*x-4) = 1/(G(0)-x); G(k) = 1 + 2*x - 3*x/G(k+1); (continued fraction, 1-step ). - Sergei N. Gladkovskii, Jan 05 2012
a(n) ~ 3^(1/4)*(3^(3/2)-5)*(4+2*sqrt(3))^n/(2*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 18 2012
From Peter Bala, Mar 13 2015: (Start)
The o.g.f. A(x) satisfies the differential equation (2 - 17*x + 16*x^2 - 4*x^3)A'(x) + (7 - 4*x)*A(x) = 2 - 2*x. Mathar's conjectural recurrence above follows from this.
The o.g.f. A(x) is the series reversion of the rational function x*(1 - 2*x)/(1 - x^2). (End)

A135351 a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n.

Original entry on oeis.org

0, 2, 0, 3, 2, 7, 10, 23, 42, 87, 170, 343, 682, 1367, 2730, 5463, 10922, 21847, 43690, 87383, 174762, 349527, 699050, 1398103, 2796202, 5592407, 11184810, 22369623, 44739242, 89478487, 178956970, 357913943, 715827882, 1431655767, 2863311530, 5726623063, 11453246122, 22906492247, 45812984490
Offset: 0

Views

Author

Miklos Kristof, Dec 07 2007

Keywords

Comments

Partial sums of A155980 for n > 2. - Klaus Purath, Jan 30 2021

Crossrefs

Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.

Programs

  • GAP
    List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # G. C. Greubel, Sep 02 2019
  • Magma
    a135351:=func< n | (2^n+3-7*(-1)^n+3*0^n)/6 >; [ a135351(n): n in [0..32] ]; // Klaus Brockhaus, Dec 05 2009
    
  • Maple
    G(x):=x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)): f[0]:=G(x): for n from 1 to 30 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/n!,n=0..30);
  • Mathematica
    Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n,40}]] (* G. C. Greubel, Oct 11 2016 *)
    LinearRecurrence[{2,1,-2},{0,2,0,3},40] (* Harvey P. Dale, Feb 13 2024 *)
  • PARI
    a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ Michel Marcus, Oct 11 2016
    
  • Sage
    [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # G. C. Greubel, Sep 02 2019
    

Formula

G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).
E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.
From Paul Curtz, Dec 20 2020: (Start)
a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).
a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).
a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).
a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).
a(n+4) = a(n+1) + 7*A001045(n).
a(n+4) + a(n+1) = A181565(n).
a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).
a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)

Extensions

First part of definition corrected by Klaus Brockhaus, Dec 05 2009
Showing 1-4 of 4 results.