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 10 results.

A154117 Expansion of (1 - x + 3*x^2)/((1-x)*(1-2*x)).

Original entry on oeis.org

1, 2, 7, 17, 37, 77, 157, 317, 637, 1277, 2557, 5117, 10237, 20477, 40957, 81917, 163837, 327677, 655357, 1310717, 2621437, 5242877, 10485757, 20971517, 41943037, 83886077, 167772157, 335544317, 671088637, 1342177277, 2684354557
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of 1,1,4,1,4,1,4,1,4,1,4,1,4,1,4,... - Philippe Deleham, Jan 05 2009

Crossrefs

Programs

  • Magma
    [1] cat [5*2^n-3 : n in [0..30]]; // Vincenzo Librandi, Nov 11 2011
    
  • Mathematica
    Join[{1}, Table[ 5*2^(n - 1) - 3, {n, 1, 10}]] (* or *) Join[{1, 2, 7}, LinearRecurrence[{3, -2}, {17, 37}, 10]] (* G. C. Greubel, Sep 02 2016 *)
  • PARI
    a(n)=if(n, 5<<(n-1)-3, 1) \\ Charles R Greathouse IV, Sep 02 2016

Formula

From Philippe Deléham, Jan 05 2009: (Start)
a(n) = 3*a(n-1) - 2*a(n-2), n > 2.
a(n) = 2*a(n-1) + 3, n > 1.
a(n) = 5*2^(n-1) - 3, n >= 1. (End)
E.g.f.: (1/2)*(3 - 6*exp(x) + 5*exp(2*x)). - G. C. Greubel, Sep 02 2016

Extensions

a(0) added by Philippe Deléham, Jan 05 2009

A154251 Expansion of (1-x+7x^2)/((1-x)(1-2x)).

Original entry on oeis.org

1, 2, 11, 29, 65, 137, 281, 569, 1145, 2297, 4601, 9209, 18425, 36857, 73721, 147449, 294905, 589817, 1179641, 2359289, 4718585, 9437177, 18874361, 37748729, 75497465, 150994937, 301989881, 603979769, 1207959545, 2415919097
Offset: 0

Views

Author

Philippe Deléham, Jan 05 2009

Keywords

Comments

Binomial transform of 1,1,8,1,8,1,8,1,8,1,8,1,8,1,8,...

Crossrefs

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{3,-2},{2,11}, 25]] (* or *) Join[{1},Table[9*2^(n-1) - 7, {n,1,25}]] (* G. C. Greubel, Sep 08 2016 *)
  • PARI
    Vec((1-x+7*x^2)/((1-x)*(1-2*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

a(n) = 3*a(n-1) - 2*a(n-2), n>2, with a(0)=1, a(1)=2, a(2)=11.
a(n) = 9*2^(n-1) - 7, n>0, with a(0)=1.
a(n) = 2*a(n-1) + 7, n>1, with a(0)=1, a(1)=2.
From G. C. Greubel, Sep 08 2016: (Start)
a(n) = 9*2^(n-1) - 7 for n >= 1.
E.g.f.: (1/2)*(9*exp(2*x) - 14*exp(x) + 7). (End)

A288732 a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) for n >= 5, where a(0) = 2, a(1) = 4, a(2) = 6, a(3) = 8, a(4) = 10.

Original entry on oeis.org

2, 4, 6, 8, 10, 14, 18, 22, 26, 34, 42, 50, 58, 74, 90, 106, 122, 154, 186, 218, 250, 314, 378, 442, 506, 634, 762, 890, 1018, 1274, 1530, 1786, 2042, 2554, 3066, 3578, 4090, 5114, 6138, 7162, 8186, 10234, 12282, 14330, 16378, 20474, 24570, 28666, 32762
Offset: 0

Views

Author

Clark Kimberling, Jun 16 2017

Keywords

Comments

Conjecture: a(n) is the number of letters (0's and 1's) in the n-th iterate of the mapping 00->1000, 10->01, starting with 00; see A288729.
From Michel Dekking, Mar 25 2018: (Start)
Note that a(n) - a(n-1) = 2*[a(n-4) - a(n-5)] for n>4.
It follows that this sequence is a union of four simple sequences:
a(4k-4) = 4*2^k - 6 = A131130(k) for k = 1,2,3,...
a(4k-3) = 5*2^k - 6 = A020714(k) - 6 for k = 1,2,3...
a(4k-2) = 6*2^k - 6 = A007283(k+1) - 6 for k = 1,2,3, ...
a(4k-1) = 7*2^k - 6 = A048489(k) for k = 1,2,3...
(End)

Crossrefs

Cf. A288729.

Programs

  • GAP
    a:=[2,4,6,8,10];; for n in [6..45] do a[n]:=a[n-1]+2*a[n-4]-2*a[n-5]; od; a; # Muniru A Asiru, Mar 22 2018
    
  • Maple
    f:= gfun:-rectoproc({a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5),
    a(0) = 2, a(1) = 4, a(2) = 6, a(3) = 8, a(4) = 10},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Mar 25 2018
  • Mathematica
    LinearRecurrence[{1, 0, 0, 2, -2}, {2, 4, 8, 8, 10}, 40]
  • PARI
    x='x+O('x^99); Vec(2*(1+x+x^2+x^3-x^4)/(1-x-2*x^4+2*x^5)) \\ Altug Alkan, Mar 22 2018

Formula

a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) for n >= 5, where a(0) = 2, a(1) = 4, a(2) = 6, a(3) = 8, a(4) = 10.
G.f.: -((2*(-1 - x - x^2 - x^3 + x^4))/(1 - x - 2*x^4 + 2*x^5)).

Extensions

a(41)-a(49) from Muniru A Asiru, Mar 22 2018

A154252 Expansion of (1-x+8x^2)/((1-x)(1-2x)) .

Original entry on oeis.org

1, 2, 12, 32, 72, 152, 312, 632, 1272, 2552, 5112, 10232, 20472, 40952, 81912, 163832, 327672, 655352, 1310712, 2621432, 5242872, 10485752, 20971512, 41943032, 83886072, 167772152, 335544312, 671088632, 1342177272, 2684354552, 5368709112, 10737418232
Offset: 0

Views

Author

Philippe Deléham, Jan 05 2009

Keywords

Comments

Binomial transform of 1,1,9,1,9,1,9,1,9,1,9,1,9,1,9,...

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) - 2*a(n-2), n>2, with a(0)=1, a(1)=2, a(2)=12.
a(n) = 2*a(n-1) + 8, n>1, with a(0)=1, a(1)=2.
a(n) = 10*2^(n-1) - 8, n>=1, with a(0)=1.
E.g.f.: 5*exp(2*x) - 8*exp(x) + 4. - G. C. Greubel, Sep 08 2016

Extensions

Two terms corrected by Johannes W. Meijer, May 26 2011

A177227 Triangle, read by rows, T(n, k) = -binomial(n,k) for 0 < k < n, otherwise T(n, k) = 2.

Original entry on oeis.org

2, 2, 2, 2, -2, 2, 2, -3, -3, 2, 2, -4, -6, -4, 2, 2, -5, -10, -10, -5, 2, 2, -6, -15, -20, -15, -6, 2, 2, -7, -21, -35, -35, -21, -7, 2, 2, -8, -28, -56, -70, -56, -28, -8, 2, 2, -9, -36, -84, -126, -126, -84, -36, -9, 2, 2, -10, -45, -120, -210, -252, -210, -120, -45, -10, 2
Offset: 0

Views

Author

Roger L. Bagula, May 05 2010

Keywords

Comments

This triangle may also be constructed in the following way. Let f_{n}(t) = d^n/dt^n t/(1+t) = (-1)^(n+1)*n!*(1+t)^(-n-1). Then the triangle is given as f_{n}(t)/((1+t)*f_{k}(t)*f_{n-k}(t)) when t = 1/2 (this sequence), t = 1/3 (A177228), and t = 1/4 (A177229).

Examples

			Triangle begins as:
  2;
  2,   2;
  2,  -2,   2;
  2,  -3,  -3,    2;
  2,  -4,  -6,   -4,    2;
  2,  -5, -10,  -10,   -5,    2;
  2,  -6, -15,  -20,  -15,   -6,    2;
  2,  -7, -21,  -35,  -35,  -21,   -7,    2;
  2,  -8, -28,  -56,  -70,  -56,  -28,   -8,   2;
  2,  -9, -36,  -84, -126, -126,  -84,  -36,  -9,   2;
  2, -10, -45, -120, -210, -252, -210, -120, -45, -10,  2;
		

Crossrefs

Cf. A007318, A131130 (related to row sums), A177228, A177229.

Programs

  • Magma
    A177227:= func< n,k | k eq 0 or k eq n select 2 else -Binomial(n,k) >;
    [A177227(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 09 2024
    
  • Mathematica
    T[n_, k_]:= If[k==0 || k==n, 2, -Binomial[n,k]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A177227(n,k): return 2 if (k==0 or k==n) else -binomial(n,k)
    flatten([[A177227(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 09 2024

Formula

T(n, 0) = T(n, n) = 2, otherwise T(n, k) = -binomial(n,k).
Sum_{k=0..n} T(n, k) = -A131130(n-2) - 3*[n=0], n >= 1 (row sums).
From G. C. Greubel, Apr 09 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = 3*(1 + (-1)^n) - 4*[n=0].
Sum_{k=0..floor(n/2)} T(n-k,k) = (3/2)*(3 + (-1)^n - 2*[n=0])-Fibonacci(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k,k) = 3*(1 + cos(n*Pi/2) - [n=0]) - (2/sqrt(3))*cos((2*n-1)*Pi/6). (End)

Extensions

Edited by G. C. Greubel, Apr 09 2024

A246168 a(n) = 2^n - 10.

Original entry on oeis.org

-9, -8, -6, -2, 6, 22, 54, 118, 246, 502, 1014, 2038, 4086, 8182, 16374, 32758, 65526, 131062, 262134, 524278, 1048566, 2097142, 4194294, 8388598, 16777206, 33554422, 67108854, 134217718, 268435446, 536870902, 1073741814, 2147483638
Offset: 0

Views

Author

Vincenzo Librandi, Aug 18 2014

Keywords

Crossrefs

Sequences of the form 2^n-k: A000079 (k=0), A000225 (k=1), A000918 (k=2), A036563 (k=3), A028399 (k=4), A168616 (k=5), A131130 (k=6), A048490 (k=7), A159741 (k=8), A185346 (k=9), this sequence (k=10).

Programs

  • Magma
    [2^n-10: n in [0..40]];
    
  • Mathematica
    Table[2^n - 10, {n, 0, 35}] (* or *) CoefficientList[Series[(-9 + 19 x)/(1 - 3 x + 2 x^2), {x, 0, 35}], x]
    LinearRecurrence[{3,-2},{-9,-8},50] (* Harvey P. Dale, Jan 11 2024 *)
  • PARI
    vector(50, n, 2^(n-1)-10) \\ Derek Orr, Aug 18 2014

Formula

G.f.: (-9+19*x)/(1-3*x+2*x^2).
a(n) = 3*a(n-1) - 2*a(n-2).
a(n) = A000079(n) - 10.
From Elmo R. Oliveira, Dec 21 2023: (Start)
a(n) = 2*a(n-1) + 10 for n>0.
E.g.f.: exp(x)*(exp(x) - 10). (End)

A131131 4*A007318 - 3*A097806.

Original entry on oeis.org

1, 1, 1, 4, 5, 1, 4, 12, 9, 1, 4, 16, 24, 13, 1, 4, 20, 40, 40, 17, 1, 4, 24, 60, 80, 60, 21, 1, 4, 28, 84, 140, 140, 84, 25, 1, 4, 32, 112, 224, 280, 224, 112, 29, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 16 2007

Keywords

Comments

Row sums = A131130, (1, 2, 10, 26, 52, 98, 190, ...), the binomial transform of (1, 1, 7, 1, 7, 1, ...). Generally, triangles generated from N*A007318 - (N-1)*A097806 have row sums that are binomial transforms of (1, 1, (N-1), 1, (N-1), 1, ...). A095121 = (1, 2, 6, 14, 30, 62, ...), the binomial transform of (1, 1, 3, 1, 3, 1, ...) and = row sums of A131108.
Triangle T(n,k), 0 <= k <= n,read by rows given by [1,3,-4,1,0,0,0,0,0,0,0,...] DELTA [1,0,0,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 18 2007

Examples

			First few rows of the triangle:
  1;
  1,  1;
  4,  5,  1;
  4, 12,  9,  1;
  4, 16, 24, 13,  1
  4, 20, 40, 40, 17,  1;
  ...
		

Crossrefs

Formula

4*A007318 - 3*A097806, where A007318 = Pascal's triangle and A097806 = the pairwise operator.
G.f.: (1-x*y+3*x^2+3*x^2*y)/((-1+x+x*y)*(x*y-1)). - R. J. Mathar, Aug 12 2015

A185647 Expansion of (1+2x)*(1+2*x^2)/((1-x)*(1+x)*(1-2*x^2)).

Original entry on oeis.org

1, 2, 5, 10, 13, 26, 29, 58, 61, 122, 125, 250, 253, 506, 509, 1018, 1021, 2042, 2045, 4090, 4093, 8186, 8189, 16378, 16381, 32762, 32765, 65530, 65533, 131066, 131069, 262138, 262141, 524282, 524285, 1048570, 1048573, 2097146, 2097149, 4194298, 4194301
Offset: 0

Views

Author

Philippe Deléham, Apr 23 2013

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 3, 0, -2}, {1, 2, 5, 10}, 50] (* G. C. Greubel, Jul 09 2017 *)
  • PARI
    x='x+O('x^50); Vec((1+2*x)*(1+2*x^2)/((1-x)*(1+x)*(1-2*x^2))) \\ G. C. Greubel, Jul 09 2017

Formula

a(n) = a(n-1)*2 if n odd.
a(n) = a(n-1)+3 if n even.
a(2n) = 2^(n+2)-3 = A036563(n+2).
a(2n+1) = 2^(n+3)-6 = A131130(n+1).
a(n) = 3*a(n-2) - 2*a(n-4) with a(0)=1, a(1)=2, a(2)=5, a(3)=10.

A306352 a(n) is the least k >= 0 such that all the positive divisors of n have a distinct value under the mapping d -> d AND k (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 2, 7, 10, 13, 2, 15, 4, 5, 6, 15, 16, 31, 2, 29, 6, 7, 2, 31, 12, 9, 10, 11, 4, 15, 2, 31, 42, 49, 6, 63, 4, 7, 6, 63, 8, 15, 2, 14, 14, 5, 2, 63, 18, 29, 18, 21, 4, 31, 6, 23, 18, 9, 2, 31, 4, 5, 14, 63, 76, 127, 2, 115, 6, 15, 2, 127, 8, 13
Offset: 1

Views

Author

Rémy Sigrist, Feb 09 2019

Keywords

Comments

This sequence has similarities with A167234.
Will every nonnegative integer appear in the sequence?

Examples

			For n = 15:
- the divisors of 15 are: 1, 3, 5 and 15,
- their values under the mapping d -> d AND k for k = 0..6 are:
  k\d|  1  3  5  15
  ---+-------------
    0|  0  0  0  0
    1|  1  1  1  1
    2|  0  2  0  2
    3|  1  3  1  3
    4|  0  0  4  4
    5|  1  1  5  5
    6|  0  2  4  6
- the first row with 4 distinct values corresponds to k = 6,
- hence a(15) = 6.
		

Crossrefs

Programs

  • PARI
    a(n) = my (d=divisors(n)); for (m=0, oo, if (#Set(apply(v -> bitand(v, m), d))==#d, return (m)))

Formula

a(2^k) = 2^k - 1 for any k >= 0.
a(n) = 2 iff n belongs to A002145.
a(n) <= A218388(n).
a(n) AND A218388(n) = a(n).
A000120(a(n)) = 1 iff n is a prime number.
Apparently:
- a(3^k) belongs to A131130 for any k > 0,
- a(5^k) belongs to A028399 for any k >= 0.

A154312 Triangle T(n,k), 0<=k<=n, read by rows, given by [0,1/2,-1/2,0,0,0,0,0,0,0,...] DELTA [2,-1/2,-1/2,2,0,0,0,0,0,0,0 ...] where DELTA is the operator defined in A084938 .

Original entry on oeis.org

1, 0, 2, 0, 1, 3, 0, 0, 3, 5, 0, 0, 0, 7, 9, 0, 0, 0, 0, 15, 17, 0, 0, 0, 0, 0, 31, 33, 0, 0, 0, 0, 0, 0, 63, 65, 0, 0, 0, 0, 0, 0, 0, 127, 129, 0, 0, 0, 0, 0, 0, 0, 0, 255, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 511, 513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1023, 1025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2047
Offset: 0

Views

Author

Philippe Deléham, Jan 07 2009

Keywords

Comments

Column sums give A003945.

Examples

			Triangle begins:
1;
0, 2;
0, 1, 3;
0, 0, 3, 5;
0, 0, 0, 7, 9;
0, 0, 0, 0, 15, 17; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n}T(n,k)*x^(n-k)= A040000(n), A094373(n), A000079(n), A083329(n), A095121(n), A154117(n), A131128(n), A154118(n), A131130(n), A154251(n), A154252(n) for x = -1,0,1,2,3,4,5,6,7,8,9 respectively.
G.f.: (1-x*y+x^2*y-x^2*y^2)/(1-3*x*y+2*x^2*y^2). - Philippe Deléham, Nov 02 2013
T(n,k) = 3*T(n-1,k-1) - 2*T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 2, T(2,0) = 0, T(2,1) = 1, T(2,2) = 3, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 02 2013
Showing 1-10 of 10 results.