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-10 of 19 results. Next

A084214 Inverse binomial transform of a math magic problem.

Original entry on oeis.org

1, 1, 4, 6, 14, 26, 54, 106, 214, 426, 854, 1706, 3414, 6826, 13654, 27306, 54614, 109226, 218454, 436906, 873814, 1747626, 3495254, 6990506, 13981014, 27962026, 55924054, 111848106, 223696214, 447392426, 894784854, 1789569706, 3579139414, 7158278826, 14316557654
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Inverse binomial transform of A060816.

Crossrefs

Programs

  • Haskell
    a084214 n = a084214_list !! n
    a084214_list = 1 : xs where
       xs = 1 : 4 : zipWith (+) (map (* 2) xs) (tail xs)
    -- Reinhard Zumkeller, Aug 01 2011
    
  • Magma
    [(5*2^n-3*0^n+4*(-1)^n)/6: n in [0..35]]; // Vincenzo Librandi, Jun 15 2011
    
  • Maple
    A084214 := proc(n)
        (5*2^n - 3*0^n + 4*(-1)^n)/6 ;
    end proc:
    seq(A084214(n),n=0..60) ; # R. J. Mathar, Aug 18 2024
  • Mathematica
    f[n_]:=2/(n+1);x=3;Table[x=f[x];Numerator[x],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 12 2010 *)
    LinearRecurrence[{1,2},{1,1,4},50] (* Harvey P. Dale, Mar 05 2021 *)
  • PARI
    a(n) = 5<<(n-1)\3 + bitnegimply(1,n); \\ Kevin Ryde, Dec 20 2023

Formula

a(n) = (5*2^n - 3*0^n + 4*(-1)^n)/6.
G.f.: (1+x^2)/((1+x)*(1-2*x)).
E.g.f.: (5*exp(2*x) - 3*exp(0) + 4*exp(-x))/6.
From Paul Barry, May 04 2004: (Start)
The binomial transform of a(n+1) is A020989(n).
a(n) = A001045(n-1) + A001045(n+1) - 0^n/2. (End)
a(n) = Sum_{k=0..n} A001045(n+1)*C(1, k/2)*(1+(-1)^k)/2. - Paul Barry, Oct 15 2004
a(n) = a(n-1) + 2*a(n-2) for n > 2. - Klaus Brockhaus, Dec 01 2009
From Yuchun Ji, Mar 18 2019: (Start)
a(n+1) = Sum_{i=0..n} a(i) + 1 - (-1)^n, a(0)=1.
a(n) = A000975(n-3)*10 + 5 + (-1)^(n-3), a(0)=1, a(1)=1, a(2)=4. (End)
a(n) = A081254(n) + (n-1 mod 2). - Kevin Ryde, Dec 20 2023
a(n) = 2*A048573(n-2) for n>=2. - Alois P. Heinz, May 20 2025

A134931 a(n) = (5*3^n-3)/2.

Original entry on oeis.org

1, 6, 21, 66, 201, 606, 1821, 5466, 16401, 49206, 147621, 442866, 1328601, 3985806, 11957421, 35872266, 107616801, 322850406, 968551221, 2905653666, 8716961001, 26150883006, 78452649021, 235357947066, 706073841201, 2118221523606
Offset: 0

Views

Author

Rolf Pleisch, Jan 29 2008

Keywords

Comments

Numbers n where the recurrence s(0)=1, if s(n-1) >= n then s(n) = s(n-1) - n else s(n) = s(n-1) + n produces s(n)=0. - Hugo Pfoertner, Jan 05 2012
A046901(a(n)) = 1. - Reinhard Zumkeller, Jan 31 2013
Binomial transform of A146523: (1, 5, 10, 20, 40, ...) and double binomial transform of A010685: (1, 4, 1, 4, 1, 4, ...). - Gary W. Adamson, Aug 25 2016
Also the number of maximal cliques in the (n+1)-Hanoi graph. - Eric W. Weisstein, Dec 01 2017
a(n) is the least k such that f(a(n-1)+1) + ... + f(k) > f(a(n-2)+1) + ... + f(a(n-1)) for n > 1, where f(n) = 1/(n+1). Because Sum_{k=1..5*3^(n-1)} 1/(a(n)+3*k-1) + 1/(a(n)+3*k) + 1/(a(n)+3*k+1) - 1/((a(n)+1+5*3^n)*5*3^(n-1)) < Sum_{k=1..5*3^(n-1)} 1/(a(n-1)+k+1) < Sum_{k=1..5*3^(n-1)} 1/(a(n)+3*k-1) + 1/(a(n)+3*k) + 1/(a(n)+3*k+1), we have 1 < 1/3 + 1/4 + ... + 1/7 < 1/8 + 1/9 + ... + 1/22 < ... . - Jinyuan Wang, Jun 15 2020

Crossrefs

Programs

Formula

a(n) = 3*(a(n-1) + 1), with a(0)=1.
From R. J. Mathar, Jan 31 2008: (Start)
O.g.f.: (5/2)/(1-3*x) - (3/2)/(1-x).
a(n) = (A005030(n) - 3)/2. (End)
a(n) = A060816(n+1) - 1. - Philippe Deléham, Apr 14 2013
E.g.f.: exp(x)*(5*exp(2*x) - 3)/2. - Stefano Spezia, Aug 28 2023

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Dec 25 2008

A057198 a(n) = (5*3^(n-1)+1)/2.

Original entry on oeis.org

3, 8, 23, 68, 203, 608, 1823, 5468, 16403, 49208, 147623, 442868, 1328603, 3985808, 11957423, 35872268, 107616803, 322850408, 968551223, 2905653668, 8716961003, 26150883008, 78452649023, 235357947068, 706073841203, 2118221523608
Offset: 1

Views

Author

Colin Mallows and N. J. A. Sloane, Sep 16 2000

Keywords

Comments

It appears that if s(n) is a first-order rational sequence of the form s(0)=4, s(n) = (2*s(n-1)+1)/(s(n-1)+2), n > 0, then s(n) = a(n)/(a(n)-1), n > 0.

Examples

			G.f. = 3*x + 8*x^2 + 23*x^3 + 68*x^4 + 203*x^5 + 608*x^6 + 1823*x^7 + 5468*x^8 + ...
		

Crossrefs

Related to A046901.
Equals A060816 + 1.
Cf. A135423 (bisection), A191450 (2nd row).

Programs

Formula

a(n+1) = 3*a(n) - 1 for n > 1. - Reinhard Zumkeller, Jan 22 2011
G.f.: (5/2)*U(0) where U(k) = 1 + 2/(5*3^k + 5*3^k/(1 - 30*x*3^k/(15*x*3^k - 1/U(k+1)))); (continued fraction, 4-step). - Sergei N. Gladkovskii, Nov 01 2012
E.g.f.: (5/2)*U(0) where U(k) = 1 + 2/(5*3^k + 5*3^k/(1 - 30*x*3^k/(15*x*3^k - (k+1)/U(k+1)))); (continued fraction, 4-step). - Sergei N. Gladkovskii, Nov 01 2012
G.f.: x*(3-4*x) / ( (3*x-1)*(x-1) ). - R. J. Mathar, Jan 25 2015
E.g.f.: (5*exp(3*x) + 3*exp(x) - 8)/6. - Stefano Spezia, Aug 28 2023

Extensions

Incorrect zeroth term removed by Jon Perry, Oct 11 2012

A084215 Expansion of g.f.: (1+x^2)/(1-2*x).

Original entry on oeis.org

1, 2, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 655360, 1310720, 2621440, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 335544320, 671088640, 1342177280, 2684354560, 5368709120, 10737418240
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Associated with a math magic problem.
Elements are the sums of consecutive pairs of elements of A084214.

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x^2)/(1-2*x))); // G. C. Greubel, Oct 08 2018
  • Mathematica
    Join[{1, 2, a = 5}, Table[a = 2*a, {n,0,40}]] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
    Table[Int[2^(n-2)*5],{n,0,40}] (* Taher Jamshidi, Sep 15 2012 *)
    CoefficientList[Series[(1 + x^2)/(1 - 2 x), {x, 0, 30}], x] (* G. C. Greubel, Oct 08 2018 *)
  • PARI
    x='x+O('x^30); Vec((1+x^2)/(1-2*x)) \\ G. C. Greubel, Oct 08 2018
    

Formula

a(n) = Sum_{k=0..n} 2^(n-k)*binomial(1, k/2)*(1+(-1)^k)/2. - Paul Barry, Oct 15 2004
a(n) = A020714(n-2), n > 1. - R. J. Mathar, Dec 19 2008
From Gary W. Adamson, Aug 26 2011: (Start)
a(n) is the sum of top row terms of M^n, M is an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
0, 0, 0, 0, 0, 0, ...
0, 0, 0, 0, 0, 0, ...
...
E.g.: a(4) = 20 = (8 + 8 + 4) since the top row of M^4 = (8, 8, 4, 0, 0, 0, ...). (End)
a(n) = floor(2^(n-2)*5). - Taher Jamshidi, Sep 15 2012
a(n) = 2*a(n-1) for n >= 3, a(0) = 1, a(1) = 2, a(2) = 5. - Philippe Deléham, Mar 13 2013
E.g.f.: (5*exp(2*x) - 2*x - 1)/4. - Stefano Spezia, Feb 20 2023

A237930 a(n) = 3^(n+1) + (3^n-1)/2.

Original entry on oeis.org

3, 10, 31, 94, 283, 850, 2551, 7654, 22963, 68890, 206671, 620014, 1860043, 5580130, 16740391, 50221174, 150663523, 451990570, 1355971711, 4067915134, 12203745403, 36611236210, 109833708631, 329501125894, 988503377683, 2965510133050, 8896530399151
Offset: 0

Views

Author

Philippe Deléham, Feb 16 2014

Keywords

Comments

a(n-1) agrees with the graph radius of the n-Sierpinski carpet graph for n = 2 to at least n = 5. See A100774 for the graph diameter of the n-Sierpinski carpet graph.
The inverse binomial transform gives 3, 7, 14, 28, 56, ... i.e., A005009 with a leading 3. - R. J. Mathar, Jan 08 2020
First differences of A108765. The digital root of a(n) for n > 1 is always 4. a(n) is never divisible by 7 or by 12. a(n) == 10 (mod 84) for odd n. a(n) == 31 (mod 84) for even n > 0. Conjecture: This sequence contains no prime factors p == {11, 13, 23, 61 71, 73} (mod 84). - Klaus Purath, Apr 13 2020
This is a subsequence of A017209 for n > 1. See formula. - Klaus Purath, Jul 03 2020

Examples

			Ternary....................Decimal
10...............................3
101.............................10
1011............................31
10111...........................94
101111.........................283
1011111........................850
10111111......................2551
101111111.....................7654, etc.
		

Crossrefs

Cf. A000244, A003462, A005009, A005032 (first differences), A017209, A060816, A100774, A108765 (partial sums), A199109, A329774.

Programs

  • Magma
    [3^(n+1) + (3^n-1)/2: n in [0..40]]; // Vincenzo Librandi, Jan 09 2020
  • Mathematica
    (* Start from Eric W. Weisstein, Mar 13 2018 *)
    Table[(7 3^n - 1)/2, {n, 0, 20}]
    (7 3^Range[0, 20] - 1)/2
    LinearRecurrence[{4, -3}, {10, 31}, {0, 20}]
    CoefficientList[Series[(3 - 2 x)/((x - 1) (3 x - 1)), {x, 0, 20}], x]
    (* End *)
  • PARI
    Vec((3 - 2*x) / ((1 - x)*(1 - 3*x)) + O(x^30)) \\ Colin Barker, Nov 27 2019
    

Formula

G.f.: (3-2*x)/((1-x)*(1-3*x)).
a(n) = A000244(n+1) + A003462(n).
a(n) = 3*a(n-1) + 1 for n > 0, a(0)=3. (Note that if a(0) were 1 in this recurrence we would get A003462, if it were 2 we would get A060816. - N. J. A. Sloane, Dec 06 2019)
a(n) = 4*a(n-1) - 3*a(n-2) for n > 1, a(0)=3, a(1)=10.
a(n) = 2*a(n-1) + 3*a(n-2) + 2 for n > 1.
a(n) = A199109(n) - 1.
a(n) = (7*3^n - 1)/2. - Eric W. Weisstein, Mar 13 2018
From Klaus Purath, Apr 13 2020: (Start)
a(n) = A057198(n+1) + A024023(n).
a(n) = A029858(n+2) - A024023(n).
a(n) = A052919(n+1) + A029858(n+1).
a(n) = (A000244(n+1) + A171498(n))/2.
a(n) = 7*A003462(n) + 3.
a(n) = A116952(n) + 2. (End)
a(n) = A017209(7*(3^(n-2)-1)/2 + 3), n > 1. - Klaus Purath, Jul 03 2020
E.g.f.: exp(x)*(7*exp(2*x) - 1)/2. - Stefano Spezia, Aug 28 2023

A198643 a(n) = 5*3^n-1.

Original entry on oeis.org

4, 14, 44, 134, 404, 1214, 3644, 10934, 32804, 98414, 295244, 885734, 2657204, 7971614, 23914844, 71744534, 215233604, 645700814, 1937102444, 5811307334, 17433922004, 52301766014, 156905298044, 470715894134, 1412147682404, 4236443047214
Offset: 0

Views

Author

Vincenzo Librandi, Oct 28 2011

Keywords

Crossrefs

Programs

  • Magma
    [5*3^n-1: n in [0..30]];
    
  • Mathematica
    5*3^Range[0, 30] - 1 (* or *)
    NestList[3*# + 2 &, 4, 30] (* Paolo Xausa, Aug 28 2024 *)
  • PARI
    a(n)=5*3^n-1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 3*a(n-1)+2 = 2*A060816(n+1).
G.f.: ( 4-2*x ) / ( (3*x-1)*(x-1) ). - R. J. Mathar, Nov 17 2011

A008343 a(1)=1; thereafter a(n+1) = a(n)-n if a(n) >= n otherwise a(n+1) = a(n)+n.

Original entry on oeis.org

1, 0, 2, 5, 1, 6, 0, 7, 15, 6, 16, 5, 17, 4, 18, 3, 19, 2, 20, 1, 21, 0, 22, 45, 21, 46, 20, 47, 19, 48, 18, 49, 17, 50, 16, 51, 15, 52, 14, 53, 13, 54, 12, 55, 11, 56, 10, 57, 9, 58, 8, 59, 7, 60, 6, 61, 5, 62, 4, 63, 3
Offset: 1

Views

Author

Keywords

Comments

For n>0, a(A060816(n))=0. - Dmitry Kamenetsky, Feb 14 2017

Crossrefs

Programs

  • Maple
    A008343 := proc(n) option remember; if n = 1 then 1 elif A008343(n-1) >= (n-1) then A008343(n-1)-(n-1) else A008343(n-1)+(n-1); fi; end;
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[a>=n,a-n,a+n]}; Transpose[NestList[nxt,{1,1},60]][[2]] (* Harvey P. Dale, May 04 2014 *)

Formula

a(n) = (n-1+a(n-1)) mod (2*(n-1)). - Jon Maiga, Jul 09 2021

Extensions

Name edited by Dmitry Kamenetsky, Feb 14 2017

A191451 Dispersion of (3*n-2), for n>=2, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 13, 7, 3, 40, 22, 10, 5, 121, 67, 31, 16, 6, 364, 202, 94, 49, 19, 8, 1093, 607, 283, 148, 58, 25, 9, 3280, 1822, 850, 445, 175, 76, 28, 11, 9841, 5467, 2551, 1336, 526, 229, 85, 34, 12, 29524, 16402, 7654, 4009, 1579, 688, 256, 103, 37, 14, 88573
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Row 1: A003462
Row 2: A060816
Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...4....13...40...121
  2...7....22...67...202
  3...10...31...94...283
  5...16...49...148..445
  6...19...58...175..526
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=3n+1 (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191451 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191451 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A181655 Expansion of (1+2x-x^3+x^4)/(1-4x^2+3x^4).

Original entry on oeis.org

1, 2, 4, 7, 14, 22, 44, 67, 134, 202, 404, 607, 1214, 1822, 3644, 5467, 10934, 16402, 32804, 49207, 98414, 147622, 295244, 442867, 885734, 1328602, 2657204, 3985807, 7971614, 11957422, 23914844, 35872267, 71744534, 107616802, 215233604
Offset: 0

Views

Author

Paul Barry, Nov 03 2010

Keywords

Comments

Row sums of A181654.

Crossrefs

Cf. A060816, A198643 (bisections).

Programs

  • Mathematica
    CoefficientList[Series[(1+2x-x^3+x^4)/(1-4x^2+3x^4),{x,0,40}],x] (* or *) Join[{1},LinearRecurrence[{0,4,0,-3},{2,4,7,14},40]] (* Harvey P. Dale, Jan 11 2012 *)
  • PARI
    A181655(n)=if(bitand(n,1), 3^(n\2)*5\2, n, 3^(n\2-1)*5-1, 1) \\ M. F. Hasler, Apr 06 2019

Formula

G.f.: (1+2*x-x^3+x^4)/((1-x^2)*(1-3*x^2)).
a(n) = 5*A038754(n+1)/6 - A040001(n)/2. - R. J. Mathar, May 14 2016
a(2n-1) = A060816(n-1), a(2n) = A198643(n-1); n >= 1. a(n+1) = 2*a(n) if n is odd. - M. F. Hasler, Apr 06 2019

A193728 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (x+2)^n and q(n,x) = (2*x+1)^n.

Original entry on oeis.org

1, 2, 1, 8, 10, 3, 32, 64, 42, 9, 128, 352, 360, 162, 27, 512, 1792, 2496, 1728, 594, 81, 2048, 8704, 15360, 14400, 7560, 2106, 243, 8192, 40960, 87552, 103680, 73440, 31104, 7290, 729, 32768, 188416, 473088, 677376, 604800, 344736, 122472, 24786, 2187
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.
Triangle T(n,k), read by rows, given by (2,2,0,0,0,0,0,0,0,...) DELTA (1,2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 05 2011

Examples

			First six rows:
    1;
    2,    1;
    8,   10,    3;
   32,   64,   42,    9;
  128,  352,  360,  162,  27;
  512, 1792, 2496, 1728, 594, 81;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193728
      if k lt 0 or k gt n then return 0;
      elif n lt 2 then return n-k+1;
      else return 4*T(n-1, k) + 3*T(n-1, k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 28 2023
    
  • Mathematica
    (* First program *)
    z = 8; a = 1; b = 2; c = 2; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]  (* A193728 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]   (* A193729 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, n-k+1, 4*T[n-1,k] + 3*T[n-1,k-1]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 28 2023 *)
  • SageMath
    def T(n, k): # T = A193728
        if (k<0 or k>n): return 0
        elif (n<2): return n-k+1
        else: return 4*T(n-1, k) + 3*T(n-1, k-1)
    flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Nov 28 2023

Formula

T(n,k) = 3*T(n-1,k-1) + 4*T(n-1,k) with T(0,0)=T(1,1)=1 and T(1,0)=2. - Philippe Deléham, Oct 05 2011
G.f.: (1-2*x-2*x*y)/(1-4*x-3*x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 28 2023: (Start)
T(n, n-k) = A193729(n, k).
T(n, 0) = A081294(n).
T(n, n-1) = 2*A081038(n-1).
T(n, n) = A133494(n).
Sum_{k=0..n} T(n, k) = (1/7)*(4*[n=0] + 3*A000420(n)).
Sum_{k=0..n} (-1)^k * T(n, k) = A000012(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = (5*b(n) + 4*b(n-1))/14 + (2/3)*[n=0].
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A060816(n),
where b(n) = (2 + sqrt(7))^n + (2 - sqrt(7))^n. (End)
Showing 1-10 of 19 results. Next