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.

Previous Showing 41-50 of 70 results. Next

A209359 a(n) = 2^n * (n^4 - 4*n^3 + 18*n^2 - 52*n + 75) - 75.

Original entry on oeis.org

0, 1, 33, 357, 2405, 12405, 53877, 207541, 731829, 2411445, 7531445, 22523829, 64991157, 181977013, 496680885, 1326120885, 3473604533, 8947236789, 22706651061, 56869519285, 140755599285, 344683708341, 835954147253, 2009692372917, 4792831180725, 11346431180725
Offset: 0

Views

Author

Bruno Berselli, Mar 07 2012

Keywords

Comments

This sequence is related to A036828 by the transform a(n) = n*A036828(n) - sum(A036828(i), i=0..n-1).

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1+2*x)*(1+20*x+4*x^2)/((1-x)*(1-2*x)^5)));
    
  • Mathematica
    LinearRecurrence[{11, -50, 120, -160, 112, -32}, {0, 1, 33, 357, 2405, 12405}, 26]
    Table[2^n(n^4-4n^3+18n^2-52n+75)-75,{n,0,30}] (* Harvey P. Dale, Mar 08 2023 *)
  • PARI
    for(n=0, 25, print1(2^n*(n^4-4*n^3+18*n^2-52*n+75)-75", "));

Formula

G.f.: x*(1+2*x)*(1+20*x+4*x^2)/((1-x)*(1-2*x)^5).
a(n) = (1/2) * Sum_{k=0..n} Sum_{i=0..n} k^4 * C(k,i). - Wesley Ivan Hurt, Sep 21 2017

A298011 If n = Sum_{i=1..h} 2^b_i with 0 <= b_1 < ... < b_h, then a(n) = Sum_{i=1..h} i * 2^b_i.

Original entry on oeis.org

0, 1, 2, 5, 4, 9, 10, 17, 8, 17, 18, 29, 20, 33, 34, 49, 16, 33, 34, 53, 36, 57, 58, 81, 40, 65, 66, 93, 68, 97, 98, 129, 32, 65, 66, 101, 68, 105, 106, 145, 72, 113, 114, 157, 116, 161, 162, 209, 80, 129, 130, 181, 132, 185, 186, 241, 136, 193, 194, 253, 196
Offset: 0

Views

Author

Rémy Sigrist, Jan 10 2018

Keywords

Comments

This sequence is similar to A298043.

Examples

			For n = 42:
- 42 = 2 + 8 + 32,
- hence a(42) = 1*2 + 2*8 + 3*32 = 114.
		

Crossrefs

Programs

  • Maple
    F[0]:= x -> x:
    for i from 1 to 8 do
      F[i]:= unapply(convert(series(2*(x+1)*F[i-1](x^2)+H, x, 2^(i+1)),
        polynom), x)
    od:
    seq(coeff(F[8](x),x,j),j=0..2^9-1); # Robert Israel, Jan 16 2018
  • Mathematica
    a[0] = 0; a[n_] := a[n] = If[OddQ[n], a[n - 1] + n, 2*a[n/2]]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)
  • PARI
    a(n) = my (b=binary(n), z=0); forstep (i=#b, 1, -1, if (b[i], b[i] = z++)); return (fromdigits(b, 2))
    
  • PARI
    first(n) = n += (n-1)%2; my(res = vector(n)); res[1]= 1; for(i = 1, n\2, res[2 * i] = 2 * res[i]; res[2 * i + 1] = res[2 * i] + 2*i + 1); concat([0], res) \\ David A. Corneth, Jan 14 2018

Formula

a(n) = Sum_{k = 0..A000120(n)-1} A129760^k(n) for any n > 0 (where A129760^k denotes the k-th iterate of A129760).
a(n) >= n with equality iff n = 0 or n = 2^k for some k >= 0.
a(2 * n) = 2 * a(n).
a(2^n - 1) = A000337(n).
a(2 * n + 1) = a(2 * n) + 2 * n + 1. David A. Corneth, Jan 14 2018
G.f. g(x) satisfies g(x) = 2*(x+1)*g(x^2) + x*(1+x^2)/(1-x^2)^2. - Robert Israel, Jan 16 2018

A058394 A square array based on natural numbers (A000027) with each term being the sum of 2 consecutive terms in the previous row.

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 0, 2, 2, 1, 3, 2, 3, 3, 1, 0, 3, 4, 5, 4, 1, 4, 3, 5, 7, 8, 5, 1, 0, 4, 6, 9, 12, 12, 6, 1, 5, 4, 7, 11, 16, 20, 17, 7, 1, 0, 5, 8, 13, 20, 28, 32, 23, 8, 1, 6, 5, 9, 15, 24, 36, 48, 49, 30, 9, 1, 0, 6, 10, 17, 28, 44, 64, 80, 72, 38, 10, 1, 7, 6, 11, 19, 32, 52, 80, 112, 129
Offset: 0

Views

Author

Henry Bottomley, Nov 24 2000

Keywords

Comments

Changing the formula by replacing T(2n,0)=T(n,2) by T(2n,0)=T(n,m) for some other value of m, would make the generating function change to coefficient of x^n in expansion of (1+x)^k/(1-x^2)^m. This would produce A058393, A058395, A057884 (and effectively A007318).

Examples

			Rows are (1,0,2,0,3,0,4,...), (1,1,2,2,3,3,...), (1,2,3,4,5,6,...), (1,3,5,7,9,11,...), etc.
		

Crossrefs

Rows are A027656 (A000027 with zeros), A008619, A000027, A005408, A008574 etc. Columns are A000012, A001477, A022856 etc. Diagonals include A034007, A045891, A045623, A001792, A001787, A000337, A045618, A045889, A034009, A055250, A055251 etc. The triangle A055249 also appears in half of the array.

Formula

T(n, k)=T(n-1, k-1)+T(n, k-1) with T(0, k)=1, T(2n, 0)=T(n, 2) and T(2n+1, 0)=0. Coefficient of x^n in expansion of (1+x)^k/(1-x^2)^2.

A102029 Smallest semiprime with Hamming weight n (i.e., smallest semiprime with exactly n ones when written in binary), or -1 if no such number exists.

Original entry on oeis.org

4, 6, 14, 15, 55, 95, 247, 447, 511, 1535, 2047, 7167, 12287, 32255, 49151, 98303, 196607, 393215, 983039, 1572863, 3145727, 6291455, 8388607, 33423359, 50331647, 117440511, 201326591, 528482303, 805306367, 1879048191, 3221225471
Offset: 1

Views

Author

Jonathan Vos Post, Jun 23 2007

Keywords

Comments

Semiprime analog of A061712. Extended by Stefan Steinerberger. Includes the subset Mersenne semiprimes A092561.

Examples

			a(1) = 4 because the first semiprime A001358(1) is 4 (base 10) which is written 100 in binary, the latter representation having exactly 1 one.
a(2) = 6 since A001358(2) = 6 = 110 (base 2) has exactly 2 ones.
a(4) = 15 since A001358(6) = 15 = 1111 (base 2) has exactly 4 ones and, as it also has no zeros, is the smallest of the Mersenne semiprimes.
		

Crossrefs

Programs

  • Mathematica
    Join[{4},Table[SelectFirst[Sort[FromDigits[#,2]&/@Permutations[ Join[ PadRight[{}, n,1],{0}]]],PrimeOmega[#]==2&],{n,2,40}]] (* Harvey P. Dale, Feb 06 2015 *)

A108283 Triangle read by rows, generated from (..., 3, 2, 1).

Original entry on oeis.org

1, 1, 3, 1, 5, 6, 1, 7, 17, 10, 1, 9, 34, 49, 15, 1, 11, 57, 142, 129, 21, 1, 13, 86, 313, 547, 321, 28, 1, 15, 121, 586, 1593, 2005, 769, 36, 1, 17, 162, 985, 3711, 7737, 7108, 1793, 45, 1, 19, 209, 1534, 7465, 22461, 36409, 24604, 4097, 55, 1, 21, 262, 2257, 13539, 54121, 131836, 167481, 83653, 9217, 66
Offset: 1

Views

Author

Gary W. Adamson, May 30 2005

Keywords

Comments

Inverse binomial transforms of each column form the rows of A108284. Rightmost diagonal = triangular numbers, (A000217); while diagonals going to the left from (1, 3, 6, ...) are A000337 starting with 1: (1, 5, 17, 49, ...); A014915: (1, 7, 34, 142, ...); A014916: (1, 9, 57, ...); A014917: (1, 11, 86, ...).

Examples

			4th column = 10, 49, 142, 313, ... = f(x), x = 1, 2, 3; 4x^3 + 3x^2 + 2x + 1. f(3) = 142.
First few rows of the triangle:
  1;
  1,  3;
  1,  5,  6;
  1,  7, 17,  10;
  1,  9, 34,  49,  15;
  1, 11, 57, 142, 129, 21;
  ...
		

Crossrefs

Programs

  • Maple
    A108283 := proc(n,k)
        local x ;
        x := n-k+1 ;
        add( i*x^(i-1),i=1..k) ;
    end proc:
    seq(seq( A108283(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Sep 14 2016
  • Mathematica
    T[, 1] := 1; T[n, n_] := n (n + 1)/2; T[n_, k_] := (1 - (n - k + 1)^k*(k^2 - k*n + 1))/(n - k)^2; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 13 2016 *)

Formula

n-th column = f(x), x = 1, 2, 3; n*x^(n-1) + (n-1)*x^(n-2) + (n-3)*x^(n-3) + ... + 1.
T(n,k) = (1+ (n-k+1)^k*(n*k-k^2-1))/ (n-k)^2, n>k. - Jean-François Alcover, Sep 13 2016

Extensions

More terms from Jean-François Alcover, Sep 13 2016

A127529 Triangle read by rows: T(n,k) is the number of ordered trees with n edges and jump-length equal to k (n >= 0, 0 <= k <= n-2).

Original entry on oeis.org

1, 1, 2, 4, 1, 8, 5, 1, 16, 17, 8, 1, 32, 49, 38, 12, 1, 64, 129, 141, 77, 17, 1, 128, 321, 453, 361, 143, 23, 1, 256, 769, 1326, 1399, 834, 247, 30, 1, 512, 1793, 3640, 4776, 3869, 1765, 402, 38, 1, 1024, 4097, 9539, 14911, 15353, 9722, 3469, 623, 47, 1, 2048, 9217
Offset: 0

Views

Author

Emeric Deutsch, Jan 18 2007

Keywords

Comments

In the preorder traversal of an ordered tree, any transition from a node at a deeper level to a node on a strictly higher level is called a jump; the positive difference of the levels is called the jump distance; the sum of the jump distances in a given ordered tree is called the jump-length.
Rows 0 and 1 have one term each; row n (n >= 2) has n-1 terms.
Row sums are the Catalan numbers (A000108).
T(n,0) = A011782(n).
T(n,1) = A000337(n-2).
Sum_{k>=0} k*T(n,k) = binomial(2n-1, n-3) = A003516(n-1) for n >= 3.
The distribution of the statistic "number of jumps" is given in A091894. The average jump distance in all ordered trees with n edges is 2 - 5/(n+2) (i.e., about 2 levels for n large). The Krandick reference considers jump-length for full binary trees.
Also the number of Dyck n-paths with k valleys at height >= 1. - David Scambler, Sep 01 2011
Triangle T(n,k), with zeros omitted, given by (1,1,0,1,0,1,0,1,0,1,0,1,...) DELTA (0,0,1,0,1,0,1,0,1,0,1,0,1,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 06 2012

Examples

			Triangle starts:
   1;
   1;
   2;
   4,  1;
   8,  5,  1;
  16, 17,  8,  1;
  32, 49, 38, 12, 1;
Triangle (1,1,0,1,0,1,0,1,0,1, ...) DELTA (0,0,1,0,1,0,1,0,1,0,1,0,...) begins:
   1;
   1,   0;
   2,   0,   0;
   4,   1,   0,  0;
   8,   5,   1,  0,  0;
  16,  17,   8,  1,  0, 0;
  32,  49,  38, 12,  1, 0, 0;
  64, 129, 141, 77, 17, 1, 0, 0; ... - _Philippe Deléham_, Feb 06 2012
		

Crossrefs

Programs

  • Maple
    G:=1/2/(1-2*z-t+t*z)*(-2*t+1+t*z-z+sqrt(-2*t*z+1-2*z+t^2*z^2-2*t*z^2+z^2)): Gser:=simplify(series(G,z=0,13)): for n from 0 to 12 do P[n]:=sort(coeff(Gser,z,n)) od: 1;1;for n from 2 to 12 do seq(coeff(P[n],t,j),j=0..n-2) od; # yields sequence in triangular form
  • Mathematica
    n = 12; g[t_, z_] := 1/2/(1 - 2z - t + t*z)*(-2t + 1 + t*z - z + Sqrt[-2t*z + 1 - 2z + t^2*z^2 - 2t*z^2 + z^2]); Flatten[ CoefficientList[#, t]&  /@ CoefficientList[ Simplify[Series[g[t, z], {z, 0, n}]], z]] (* Jean-François Alcover, Jul 22 2011, after g.f. *)
  • Maxima
    T(n,m):=if n=0 and m=0 then 1 else if n=0 then 0 else sum(k*binomial(n,m+k)*binomial(n-k-1,m),k,0,n-m)/(n); /* Vladimir Kruchinin, Oct 29 2020 */

Formula

G.f.: G=G(t,z) satisfies (1 - t - 2*z + t*z)*G^2 - (1 - 2*t - z + t*z)*G - t = 0.
T(n,m) = Sum_{k=0..n-m} k*C(n,m+k)*C(n-k-1,m)/n, n>0, T(0,0)=1. - Vladimir Kruchinin, Oct 29 2020

A127983 a(n) = (n - 2/3)*2^n - n/2 + 3/4 - (-1)^n/12.

Original entry on oeis.org

1, 5, 18, 52, 137, 339, 808, 1874, 4263, 9553, 21158, 46416, 101029, 218447, 469668, 1004878, 2140835, 4543821, 9611938, 20272460, 42642081, 89478475, 187345568, 391468362, 816491167, 1700091209, 3534400158, 7337235784, 15211342493
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Magma
    [(n-2/3)*2^n -n/2 +3/4 -(-1)^n/12: n in [1..50]]; // G. C. Greubel, May 08 2018
  • Mathematica
    Table[(n-2/3)*2^n -n/2 +3/4 -(-1)^n/12, {n, 1, 50}]
    LinearRecurrence[{5,-7,-1,8,-4}, {1,5,18,52,137}, 50] (* G. C. Greubel, May 08 2018 *)
  • PARI
    a(n) = (n-2/3)*2^n -n/2 +3/4 -(-1)^n/12 \\ G. C. Greubel, May 08 2018
    

Formula

a(n) = (n - 2/3)*2^n - n/2 + 3/4 - (-1)^n/12.
G.f.: x*(1-2*x^3)/(1+x)/((2*x-1)^2*(x-1)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 14 2009 [checked and corrected by R. J. Mathar, Sep 16 2009]

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

Original entry on oeis.org

1, 1, 4, 15, 46, 125, 316, 763, 1786, 4089, 9208, 20471, 45046, 98293, 212980, 458739, 983026, 2097137, 4456432, 9437167, 19922926, 41943021, 88080364, 184549355, 385875946, 805306345, 1677721576, 3489660903, 7247757286, 15032385509, 31138512868, 64424509411, 133143986146, 274877906913, 566935683040, 1168231104479
Offset: 0

Views

Author

Adeniji, Adenike and Samuel Makanjuola (somakanjuola(AT)unilorin.edu.ng) Apr 14 2011

Keywords

Comments

Number of elements in the semigroup IDT_n.

Crossrefs

Programs

  • Magma
    [n + (n-1)*(2^n-2): n in [0..50]]; // Vincenzo Librandi, May 01 2011
    
  • Mathematica
    Table[n+(n-1)(2^n-2),{n,0,40}] (* or *) LinearRecurrence[{6,-13,12,-4},{1,1,4,15},40] (* Harvey P. Dale, Aug 03 2024 *)
  • PARI
    a(n)=(n-1)<Charles R Greathouse IV, Apr 06 2012

Formula

From Colin Barker, Apr 06 2012: (Start)
a(n) = 6*a(n-1)-13*a(n-2)+12*a(n-3)-4*a(n-4).
G.f.: (1-5*x+11*x^2-8*x^3)/((1-x)^2*(1-2*x)^2). (End)
a(n) = A000337(n) - (n-1). - Andrew Penland , Mar 24 2016
E.g.f.: exp(x)*(2 - x + exp(x)*(2*x - 1)). - Stefano Spezia, Apr 10 2022

Extensions

Edited by N. J. A. Sloane, Apr 23 2011
Offset changed from 1 to 0 by Vincenzo Librandi, May 01 2011

A193605 Triangle: (row n) = partial sums of partial sums of row n of Pascal's triangle.

Original entry on oeis.org

1, 1, 3, 1, 4, 8, 1, 5, 12, 20, 1, 6, 17, 32, 48, 1, 7, 23, 49, 80, 112, 1, 8, 30, 72, 129, 192, 256, 1, 9, 38, 102, 201, 321, 448, 576, 1, 10, 47, 140, 303, 522, 769, 1024, 1280, 1, 11, 57, 187, 443, 825, 1291, 1793, 2304, 2816, 1, 12, 68, 244, 630, 1268, 2116, 3084, 4097, 5120, 6144
Offset: 0

Views

Author

Clark Kimberling, Jul 31 2011

Keywords

Comments

The n-th row is contains the partial sums of the n-th row of the array interpretation of A052509. - R. J. Mathar, Apr 22 2013

Examples

			First 5 rows of A193605:
1
1....3
1....4....8
1....5....12....20
1....6....17....32....48
		

Crossrefs

Cf. A193606.

Programs

  • Maple
    A052509 := proc(n,k)
        if k = 0 then
            1;
        else
            procname(n,k-1)+binomial(n,k) ;
        end if;
    end proc:
    A193605 := proc(n,k)
        if k = 0 then
            1;
        else
            procname(n,k-1)+A052509(n,k) ;
        end if;
    end proc: # R. J. Mathar, Apr 22 2013
    # Alternative after Vladimir Kruchinin:
    gf := ((x*y-1)/(1-2*x*y))^2/(1-x*y-x): ser := series(gf, x, 12):
    p := n -> coeff(ser,x,n): row := n -> seq(coeff(p(n),y,k), k=0..n):
    seq(row(n), n=0..10); # Peter Luschny, Aug 19 2019
  • Mathematica
    u[n_, k_] := Sum[Binomial[n, h], {h, 0, k}]
    p[n_, k_] := Sum[u[n, h], {h, 0, k}]
    Table[p[n, k], {n, 0, 12}, {k, 0, n}]
    Flatten[%]   (* A193605 as a sequence *)
    TableForm[Table[p[n, k], {n, 0, 12}, {k, 0, n}]]  (* A193605 as a triangle *)
  • Maxima
    T(n,k):=sum(((i+3)*2^(i-2))*binomial(n-i,k-i),i,1,min(n,k))+binomial(n,k);
    /* Vladimir Kruchinin, Aug 20 2019 */

Formula

Writing the general term as T(n,k), for 0<=k<=n:
T(n,n)=A001792, T(n,n-1)=A001787, T(n,n-2)=A000337, T(n,n-3)=A045618.
T(n-1,k-1) + T(n-1,k) = T(n,k). - David A. Corneth, Oct 18 2016
G.f.: -(1-x*y)^2/(4*x^3*y^3+(4*x^3-8*x^2)*y^2+(5*x-4*x^2)*y+x-1). - Vladimir Kruchinin, Aug 19 2019
T(n,k) = C(n,k)+Sum_{i=1..n} (i+3)*2^(i-2)*C(n-i,k-i), - Vladimir Kruchinin, Aug 20 2019

Extensions

More terms from David A. Corneth, Oct 18 2016

A241519 Denominators of b(n) = b(n-1)/2 + 1/(2*n), b(0)=0.

Original entry on oeis.org

1, 2, 2, 12, 3, 15, 60, 840, 105, 630, 630, 13860, 6930, 180180, 360360, 144144, 9009, 306306, 306306, 11639628, 14549535, 14549535, 58198140, 2677114440, 334639305, 3346393050
Offset: 0

Views

Author

Paul Curtz, Apr 24 2014

Keywords

Comments

Generally, 2*b(n) = b(n-1) + f(n). See, for f(n)=n, A000337(n)/2^n.
a(0)=1. b(n) is mentioned in A241269.
Difference table of b(n):
0, 1/2, 1/2, 5/12, 1/3, 4/15, ...
1/2, 0, -1/12, -1/12, -1/15, -1/20, ...
-1/2, -1/12, 0, 1/60, 1/60, 11/840, ...
5/12, 1/12, 1/60, 0, -1/280, -1/280, ...
etc.
b(n) is mentioned in A241269 as an autosequence of the first kind.
The denominators of the first two upper diagonals are the positive Apéry numbers, A005430(n+1). Compare to the array in A003506.
Numerators: 0, 1, 1, 5, 1, 4, 13, 151, 16, 83, 73, 1433, 647, 15341, ... .

Examples

			0, 1/2, 1/2, 5/12, 1/3, 4/15, 13/60, 151/840, 16/105, 83/630, 73/630, ...
b(1) = (0+1)/2, hence a(1)=2.
b(2) = (1/2+1/2)/2 = 1/2, hence a(2)=2.
b(3) = (1/2+1/3)/2 = 5/12, hence a(3)=12.
		

Crossrefs

Cf. A086466.
Cf. A242376 (numerators).

Programs

  • Mathematica
    b[0] = 0; b[n_] := b[n] = 1/2*(b[n-1] + 1/n); Table[b[n] // Denominator, {n, 0, 25}] (* Jean-François Alcover, Apr 25 2014 *)
    Table[-Re[LerchPhi[2, 1, n + 1]], {n, 0, 20}] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)
    -Re[LerchPhi[2, 1, Range[20]]] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)
    RecurrenceTable[{b[n] == b[n - 1]/2 + 1/(2 n), b[0] == 0}, b[n], {n, 20}] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)

Formula

b(n) = -Re(Phi(2, 1, n + 1)) where Phi denotes the Lerch transcendent. - Eric W. Weisstein, Dec 11 2017

Extensions

Extension, after a(13), from Jean-François Alcover, Apr 24 2014
Previous Showing 41-50 of 70 results. Next