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

A060747 a(n) = 2*n - 1.

Original entry on oeis.org

-1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151
Offset: 0

Views

Author

Henry Bottomley, Apr 26 2001

Keywords

Comments

If you put n red balls and n blue balls in a bag and draw them one by one without replacement, the probability of never having drawn equal numbers of the two colors before the final ball is drawn is 1/a(n) unsigned.
abs(a(n)) = 2n - 1 + 2*0^n. It has A048495 as binomial transform. - Paul Barry, Jun 09 2003
For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is an integer. A040001(a(n)) = 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
From Jaroslav Krizek, May 28 2010: (Start)
For n >= 1, a(n) = corresponding values of antiharmonic means to numbers from A016777 (numbers k such that antiharmonic mean of the first k positive integers is an integer).
a(n) = A000330(A016777(n)) / A000217(A016777(n)) = A146535(A016777(n)+1). (End)

Crossrefs

Programs

Formula

a(n) = A005408(n)-2 = A005843(n)-1 = -A000984(n)/A002420(n) = A001477(n)+A023443(n).
G.f.: (3*x - 1)/(1 - x)^2.
Abs(a(n)) = Sum_{k=0..n} (A078008(k) mod 4). - Paul Barry, Mar 12 2004
E.g.f.: exp(x)*(2*x-1). - Paul Barry, Mar 31 2007
a(n) = 2*a(n-1) - a(n-2); a(0)=-1, a(1)=1. - Philippe Deléham, Nov 03 2008
a(n) = 4*n - a(n-1) - 4 for n>0, with a(0)=-1. - Vincenzo Librandi, Aug 07 2010
a(n) = A161680(A005843(n))/n for n > 0. - Stefano Spezia, Feb 14 2025

A193649 Q-residue of the (n+1)st Fibonacci polynomial, where Q is the triangular array (t(i,j)) given by t(i,j)=1. (See Comments.)

Original entry on oeis.org

1, 1, 3, 5, 15, 33, 91, 221, 583, 1465, 3795, 9653, 24831, 63441, 162763, 416525, 1067575, 2733673, 7003971, 17938661, 45954543, 117709185, 301527355, 772364093, 1978473511
Offset: 0

Views

Author

Clark Kimberling, Aug 02 2011

Keywords

Comments

Suppose that p=p(0)*x^n+p(1)*x^(n-1)+...+p(n-1)*x+p(n) is a polynomial of positive degree and that Q is a sequence of polynomials: q(k,x)=t(k,0)*x^k+t(k,1)*x^(k-1)+...+t(k,k-1)*x+t(k,k), for k=0,1,2,... The Q-downstep of p is the polynomial given by D(p)=p(0)*q(n-1,x)+p(1)*q(n-2,x)+...+p(n-1)*q(0,x)+p(n).
Since degree(D(p))
Example: let p(x)=2*x^3+3*x^2+4*x+5 and q(k,x)=(x+1)^k.
D(p)=2(x+1)^2+3(x+1)+4(1)+5=2x^2+7x+14
D(D(p))=2(x+1)+7(1)+14=2x+23
D(D(D(p)))=2(1)+23=25;
the Q-residue of p is 25.
We may regard the sequence Q of polynomials as the triangular array formed by coefficients:
t(0,0)
t(1,0)....t(1,1)
t(2,0)....t(2,1)....t(2,2)
t(3,0)....t(3,1)....t(3,2)....t(3,3)
and regard p as the vector (p(0),p(1),...,p(n)). If P is a sequence of polynomials [or triangular array having (row n)=(p(0),p(1),...,p(n))], then the Q-residues of the polynomials form a numerical sequence.
Following are examples in which Q is the triangle given by t(i,j)=1 for 0<=i<=j:
Q.....P...................Q-residue of P
1.....1...................A000079, 2^n
1....(x+1)^n..............A007051, (1+3^n)/2
1....(x+2)^n..............A034478, (1+5^n)/2
1....(x+3)^n..............A034494, (1+7^n)/2
1....(2x+1)^n.............A007582
1....(3x+1)^n.............A081186
1....(2x+3)^n.............A081342
1....(3x+2)^n.............A081336
1.....A040310.............A193649
1....(x+1)^n+(x-1)^n)/2...A122983
1....(x+2)(x+1)^(n-1).....A057198
1....(1,2,3,4,...,n)......A002064
1....(1,1,2,3,4,...,n)....A048495
1....(n,n+1,...,2n).......A087323
1....(n+1,n+2,...,2n+1)...A099035
1....p(n,k)=(2^(n-k))*3^k.A085350
1....p(n,k)=(3^(n-k))*2^k.A090040
1....A008288 (Delannoy)...A193653
1....A054142..............A101265
1....cyclotomic...........A193650
1....(x+1)(x+2)...(x+n)...A193651
1....A114525..............A193662
More examples:
Q...........P.............Q-residue of P
(x+1)^n...(x+1)^n.........A000110, Bell numbers
(x+1)^n...(x+2)^n.........A126390
(x+2)^n...(x+1)^n.........A028361
(x+2)^n...(x+2)^n.........A126443
(x+1)^n.....1.............A005001
(x+2)^n.....1.............A193660
A094727.....1.............A193657
(k+1).....(k+1)...........A001906 (even-ind. Fib. nos.)
(k+1).....(x+1)^n.........A112091
(x+1)^n...(k+1)...........A029761
(k+1)......A049310........A193663
(In these last four, (k+1) represents the triangle t(n,k)=k+1, 0<=k<=n.)
A051162...(x+1)^n.........A193658
A094727...(x+1)^n.........A193659
A049310...(x+1)^n.........A193664
Changing the notation slightly leads to the Mathematica program below and the following formulation for the Q-downstep of p: first, write t(n,k) as q(n,k). Define r(k)=Sum{q(k-1,i)*r(k-1-i) : i=0,1,...,k-1} Then row n of D(p) is given by v(n)=Sum{p(n,k)*r(n-k) : k=0,1,...,n}.

Examples

			First five rows of Q, coefficients of Fibonacci polynomials (A049310):
1
1...0
1...0...1
1...0...2...0
1...0...3...0...1
To obtain a(4)=15, downstep four times:
D(x^4+3*x^2+1)=(x^3+x^2+x+1)+3(x+1)+1: (1,1,4,5) [coefficients]
DD(x^4+3*x^2+1)=D(1,1,4,5)=(1,2,11)
DDD(x^4+3*x^2+1)=D(1,2,11)=(1,14)
DDDD(x^4+3*x^2+1)=D(1,14)=15.
		

Crossrefs

Cf. A192872 (polynomial reduction), A193091 (polynomial augmentation), A193722 (the upstep operation and fusion of polynomial sequences or triangular arrays).

Programs

  • Mathematica
    q[n_, k_] := 1;
    r[0] = 1; r[k_] := Sum[q[k - 1, i] r[k - 1 - i], {i, 0, k - 1}];
    f[n_, x_] := Fibonacci[n + 1, x];
    p[n_, k_] := Coefficient[f[n, x], x, k]; (* A049310 *)
    v[n_] := Sum[p[n, k] r[n - k], {k, 0, n}]
    Table[v[n], {n, 0, 24}]    (* A193649 *)
    TableForm[Table[q[i, k], {i, 0, 4}, {k, 0, i}]]
    Table[r[k], {k, 0, 8}]  (* 2^k *)
    TableForm[Table[p[n, k], {n, 0, 6}, {k, 0, n}]]

Formula

Conjecture: G.f.: -(1+x)*(2*x-1) / ( (x-1)*(4*x^2+x-1) ). - R. J. Mathar, Feb 19 2015

A097067 Expansion of g.f. (1-4*x+5*x^2)/(1-2*x)^2.

Original entry on oeis.org

1, 0, 1, 4, 12, 32, 80, 192, 448, 1024, 2304, 5120, 11264, 24576, 53248, 114688, 245760, 524288, 1114112, 2359296, 4980736, 10485760, 22020096, 46137344, 96468992, 201326592, 419430400, 872415232, 1811939328, 3758096384, 7784628224, 16106127360, 33285996544, 68719476736
Offset: 0

Author

Paul Barry, Jul 22 2004

Keywords

Comments

Binomial transform of A097065. Binomial transform is (n-2)*2^(n-1)+2, or A048495 with an extra leading 1.

Crossrefs

Essentially the same as A001787.

Programs

  • Magma
    [(n-1)*2^(n-2)+5*0^n/4 : n in [0..30]]; // Vincenzo Librandi, Sep 25 2011
    
  • Maple
    a:=n->abs(floor(sum (2^(n-1),j=1..n))): seq(a(n),n=-1..28); # Zerinvary Lajos, Jun 27 2007
  • PARI
    Vec((1-4*x+5*x^2)/(1-2*x)^2 + O(x^50)) \\ Altug Alkan, Nov 13 2015

Formula

a(n) = (n-1)*2^(n-2) + 5*0^n/4.
a(n) = 4*a(n-1) - 4*a(n-2), n > 1.
a(n+1) = A001787(n).
E.g.f.: (5 - exp(2*x)*(1 - 2*x))/4. - Stefano Spezia, Jul 01 2023

A048481 a(n) = T(0,n) + T(1,n-1) + ... + T(n,0), array T given by A048472.

Original entry on oeis.org

1, 3, 9, 27, 77, 207, 529, 1299, 3093, 7191, 16409, 36891, 81949, 180255, 393249, 852003, 1835045, 3932199, 8388649, 17825835, 37748781, 79691823, 167772209, 352321587, 738197557, 1543503927, 3221225529, 6710886459, 13958643773, 28991029311, 60129542209
Offset: 0

Keywords

Crossrefs

Partial sums of A048495.

Programs

  • Mathematica
    LinearRecurrence[{6,-13,12,-4},{1,3,9,27},40] (* Harvey P. Dale, Aug 13 2015 *)
  • PARI
    Vec((4*x^2-3*x+1)/((x-1)^2*(2*x-1)^2) + O(x^100)) \\ Colin Barker, Dec 04 2014

Formula

Row sums of triangle A134397. Also, binomial transform of A048166. - Gary W. Adamson, Oct 23 2007
a(n) = 6*a(n-1)-13*a(n-2)+12*a(n-3)-4*a(n-4). - Colin Barker, Dec 04 2014
G.f.: (4*x^2-3*x+1) / ((x-1)^2*(2*x-1)^2). - Colin Barker, Dec 04 2014
a(n) = 2^(n+1)*(n-2) + 2*n + 5. - Christian Krause, Oct 31 2023

Extensions

Corrected by T. D. Noe, Nov 08 2006

A084643 a(n) = 3^(n-1)*(2*n-3) + 2^(n+1).

Original entry on oeis.org

1, 3, 11, 43, 167, 631, 2315, 8275, 28943, 99439, 336659, 1126027, 3728279, 12239527, 39890843, 129205699, 416249375, 1334710495, 4262149667, 13560765691, 43005771431, 135988785943, 428882869931, 1349402340403
Offset: 0

Author

Paul Barry, Jun 09 2003

Keywords

Comments

Binomial transform of A048495. Second binomial transform of 1, 1, 3, 5, 7, ...

Crossrefs

Programs

  • Magma
    [3^(n-1)*(2*n-3)+2^(n+1) : n in [0..30]]; // Vincenzo Librandi, Sep 25 2011
    
  • Mathematica
    LinearRecurrence[{8,-21,18},{1,3,11},30] (* Harvey P. Dale, Dec 12 2015 *)
  • PARI
    Vec((1-5*x+8*x^2)/(1-2*x)/(1-3*x)^2+O(x^99)) \\ Charles R Greathouse IV, Mar 22 2012
    
  • SageMath
    [2^(n+1) +3^(n-1)*(2*n-3) for n in range(41)] # G. C. Greubel, Mar 22 2023

Formula

G.f.: (1 - 5*x + 8*x^2)/((1-2*x)*(1-3*x)^2). - Colin Barker, Mar 22 2012
E.g.f.: 2*exp(2*x) + (2*x-1)*exp(3*x). - G. C. Greubel, Mar 22 2023

A343291 a(n) = (n-2)*2^(n-1) + n + 2.

Original entry on oeis.org

1, 2, 4, 9, 22, 55, 136, 329, 778, 1803, 4108, 9229, 20494, 45071, 98320, 213009, 458770, 983059, 2097172, 4456469, 9437206, 19922967, 41943064, 88080409, 184549402, 385875995, 805306396, 1677721629, 3489660958, 7247757343, 15032385568, 31138512929, 64424509474
Offset: 0

Author

Alois P. Heinz, Apr 10 2021

Keywords

Comments

a(n) is the cardinality of set s(n), where s(0) = {0} and s(n+1) = s(n) union {(i+j+1)/2 : i,j in s(n)}. s(4) = {0, 1/2, 3/4, 7/8, 15/16, 1, 17/16, 9/8, 19/16, 5/4, 21/16, 11/8, 23/16, 3/2, 25/16, 13/8, 27/16, 7/4, 29/16, 15/8, 31/16, 2} has cardinality a(4) = 22.
Total number of 0-bits in all numbers <= 2^n and for n >= 1 the total number of bits in all numbers <= 2^(n-1); similar to A048495. - Ruud H.G. van Tol, Apr 28 2025

Crossrefs

Partial differences give A005183 (shifted).

Programs

  • Maple
    a:= n-> (n-2)*2^(n-1)+n+2:
    seq(a(n), n=0..35);

Formula

G.f.: -(x^3-5*x^2+4*x-1)/((2*x-1)^2*(x-1)^2).
Showing 1-6 of 6 results.