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

A005803 Second-order Eulerian numbers: a(n) = 2^n - 2*n.

Original entry on oeis.org

1, 0, 0, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 0

Views

Author

Keywords

Comments

Starting with n=2, a(n) is the second-order Eulerian number <> (see A008517).
Also, number of 3 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (01;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1Sergey Kitaev, Nov 11 2004
This is the number of target DNA sequences of the correct length present after each successive cycle of the Polymerase Chain Reaction (PCR). The first two cycles produce 0 target sequences, there are 2 target sequences present after the third cycle, then 8 after the fourth cycle, and so forth. - A. Timothy Royappa, Jun 16 2012
a(n+2) = the row sums of A222403. - J. M. Bergot, Apr 04 2018

Examples

			G.f. = 1 + 2*x^3 + 8*x^4 + 22*x^5 + 52*x^6 + 114*x^7 + 240*x^8 + 494*x^9 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent to second column of A008517.
a(n) = A070313 + 1 = A052515 + 2. Bisection of A077866.
Equals for n =>3 the third right hand column of A163936.
Cf. A000918 (first differences).

Programs

  • Haskell
    a005803 n = 2 ^ n - 2 * n
    a005803_list = 1 : f 1 [0, 2 ..] where
       f x (z:zs@(z':_)) = y : f y zs  where y = (x + z) * 2 - z'
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Magma
    [2^n-2*n: n in [0..30]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A005803:=-2*z/(2*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for three leading terms
  • Mathematica
    Table[2^n-2n,{n,0,50}] (* or *) LinearRecurrence[{4,-5,2},{1,0,0},51] (* Harvey P. Dale, May 21 2011 *)
  • PARI
    {a(n) = if( n<0, 0, 2^n - 2*n)}; /* Michael Somos, Oct 13 2002 */
    

Formula

G.f.: 1 + 2*x^3/((1-x)^2*(1-2*x)). a(n) = A008517(n-1, 2). - Michael Somos, Oct 13 2002
Equals binomial transform of [1, -1, 1, 1, 1, ...]. - Gary W. Adamson, Jul 14 2008
a(0) = 1 and a(n) = Sum_{k=0..n-3} ((-1)^(n+k+1)*binomial(2*n-1,k)*stirling1(2*n-k-3,n-k-2)), n=>1. - Johannes W. Meijer, Oct 16 2009
a(0)=1, a(1)=0, a(2)=0, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Harvey P. Dale, May 21 2011
a(n) = A000225(n+1) - A081494(n+1), n > 1. In other words, a(n) equals the sum of the elements in a Pascal triangle of depth n+1 minus the sum of the elements on its perimeter. - Ivan N. Ianakiev, Jun 01 2014
a(n) = A165900(n-1) + Sum_{i=0..n-1} a(i), for n > 0. - Ivan N. Ianakiev, Nov 24 2014
a(n) = A000225(n) - A005408(n-1). - Miquel Cerda, Nov 25 2016
E.g.f.: exp(x)*(exp(x) - 2*x). - Ilya Gutkovskiy, Nov 25 2016

A276677 Number of squares added at the n-th generation of a symmetric (with 45-degree angles), non-overlapping Pythagoras tree.

Original entry on oeis.org

1, 2, 4, 8, 16, 28, 48, 76, 120, 180, 272, 396, 584, 836, 1216, 1724, 2488, 3508, 5040, 7084, 10152, 14244, 20384, 28572, 40856, 57236, 81808, 114572, 163720, 229252, 327552, 458620, 655224, 917364, 1310576, 1834860, 2621288, 3669860, 5242720, 7339868
Offset: 0

Views

Author

Ernst van de Kerkhof, Sep 13 2016

Keywords

Comments

The auxiliary sequence C(n), which appears in the recurrence relation for a(n), is defined as the number of collisions (squares touching each other, halting tree growth at that point) in generation n.

Crossrefs

With an offset of 4, auxiliary sequence C(n) is equal to A077866: C(n+4) = A077866(n).
Partial sums give A276647.

Programs

  • Mathematica
    TableForm[Table[{n, 6*2^Floor[n/2] + 8*2^Floor[(n-1)/2] - (4n + 8)}, {n, 1, 100, 1}], TableSpacing -> {1, 5}]
    LinearRecurrence[{2,1,-4,2},{1,2,4,8,16},70] (* Harvey P. Dale, Jan 21 2019 *)
  • PARI
    Vec((1+x)^2*(1-2*x+2*x^2)/((1-x)^2*(1-2*x^2)) + O(x^50)) \\ Colin Barker, Sep 20 2016

Formula

a(0) = 1, a(n) = 2*a(n-1) - 4*C(n-1), where:
C(0) = 0; for n >= 1, C(n) = C(n-1) + 2^(floor(n/2)-1) - 1. Also:
C(0) = 0; for n >= 1, C(n) = 2^floor(n/2) + 2^floor((n-1)/2) - (n+1).
a(0) = 1; for n >= 1, a(n) = 6*2^floor(n/2) + 8*2^floor((n-1)/2) - (4*n+8).
All formulas are proved.
From Colin Barker, Sep 20 2016: (Start)
G.f.: (1 + x)^2*(1 - 2*x + 2*x^2) / ((1 - x)^2*(1 - 2*x^2)).
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + 2*a(n-4) for n>4.
a(n) = -4+2^((n-1)/2)*(7-7*(-1)^n+5*sqrt(2)+5*(-1)^n*sqrt(2))-4*(1+n) for n>0. Therefore:
a(n) = 5*2^(n/2+1)-8-4*n for n>0 and even;
a(n) = 7*2^((n+1)/2)-8-4*n for n>0 and odd. (End)

A069023 Define a subset of divisors of n to be a dedicated subset if the product of any two members is also a divisor of n. 1 is not allowed as a member as it gives trivially 1*d = d a divisor. a(n) is the number of dedicated subsets of divisors of n with at least two members.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 3, 0, 1, 1, 2, 0, 3, 0, 3, 1, 1, 0, 9, 0, 1, 1, 3, 0, 7, 0, 5, 1, 1, 1, 9, 0, 1, 1, 9, 0, 7, 0, 3, 3, 1, 0, 17, 0, 3, 1, 3, 0, 9, 1, 9, 1, 1, 0, 20, 0, 1, 3, 8, 1, 7, 0, 3, 1, 7, 0, 28, 0, 1, 3, 3, 1, 7, 0, 17, 2, 1, 0, 20, 1, 1, 1, 9, 0, 20, 1, 3, 1, 1, 1, 35, 0, 3, 3, 9, 0, 7
Offset: 1

Views

Author

Amarnath Murthy, Apr 02 2002

Keywords

Comments

a(n) is determined by the prime signature of n.

Examples

			a(12) = 3. The divisors of 12 are 1,2,3,4,6,12. The divisor subsets (2,3),(2,6) and (3,4) are such that their product is also a divisor of 12. a(24) = 9 and the dedicated divisor subsets are (2,3),(2,4),(2,6),(2,12),(3,4),(3,8),(4,6),(2,3,4),(2,4,6).
		

Crossrefs

Cf. A077866.

Programs

  • PARI
    \\ The following program is very inefficient:
    A069023(n) = { if(bigomega(n)<2,return(0)); my(pds=(divisors(n)[2..numdiv(n)]), subsets = select(v -> (length(v)>=2),powerset(pds)), pair_products = apply(ss -> podp(ss), subsets), prodsmodn = apply(pps -> vector(#pps, i, n%pps[i]),pair_products)); length(select(s -> 0==vecsum(s),prodsmodn)); };
    powerset(v) = { my(siz=2^length(v),pv=vector(siz)); for(i=0,siz-1,pv[i+1] = choosebybits(v,i)); pv; };
    choosebybits(v,m) = { my(s=vector(hammingweight(m)),i=j=1); while(m>0,if(m%2,s[j] = v[i];j++); i++; m >>= 1); s; };
    podp(v) = { my(siz=binomial(length(v),2),rv=vector(siz),k=0); for(i=1,length(v)-1,for(j=i+1,length(v),k++;rv[k] = v[i]*v[j])); rv; }; \\ podp = product of distinct pairs
    \\ Antti Karttunen, Nov 24 2017
    
  • Scheme
    ;; See in the links-section.

Formula

It seems that for n >= 3, a(p^n) = A077866(n-3). - Antti Karttunen, Nov 24 2017

Extensions

Edited by David Wasserman, Mar 26 2003

A143086 Triangle read by rows: T(n,k) = 2^(k + 1) - 1 if k < = floor(n/2), otherwise 2^(n - k + 1) - 1, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 7, 3, 1, 1, 3, 7, 7, 3, 1, 1, 3, 7, 15, 7, 3, 1, 1, 3, 7, 15, 15, 7, 3, 1, 1, 3, 7, 15, 31, 15, 7, 3, 1, 1, 3, 7, 15, 31, 31, 15, 7, 3, 1, 1, 3, 7, 15, 31, 63, 31, 15, 7, 3, 1, 1, 3, 7, 15, 31, 63, 63, 31, 15, 7, 3, 1, 1, 3, 7, 15, 31, 63, 127, 63, 31, 15, 7, 3, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 16 2008

Keywords

Examples

			Triangle begins:
  {1},
  {1,  1},
  {1,  3,  1},
  {1,  3,  3,  1},
  {1,  3,  7,  3,  1},
  {1,  3,  7,  7,  3,  1},
  {1,  3,  7, 15,  7,  3,  1},
  {1,  3,  7, 15, 15,  7,  3,  1},
  {1,  3,  7, 15, 31, 15,  7,  3,  1},
  {1,  3,  7, 15, 31, 31, 15,  7,  3,  1},
  {1,  3,  7, 15, 31, 63, 31, 15,  7,  3,  1}
		

Crossrefs

Cf. A077866 (row sums).

Programs

  • Mathematica
    Table[Table[If[m <= Floor[n/2], 2^(m + 1) - 1, 2^(n - m + 1) - 1], {m, 0, n}], {n, 0, 10}] // Flatten

Extensions

Offset changed to 0 by Georg Fischer, Jun 08 2023

A235501 Riordan array (1/(1-2*x^2), x/(1-x)).

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 0, 3, 2, 1, 4, 3, 5, 3, 1, 0, 7, 8, 8, 4, 1, 8, 7, 15, 16, 12, 5, 1, 0, 15, 22, 31, 28, 17, 6, 1, 16, 15, 37, 53, 59, 45, 23, 7, 1, 0, 31, 52, 90, 112, 104, 68, 30, 8, 1, 32, 31, 83, 142, 202, 216, 172, 98, 38, 9, 1, 0, 63, 114, 225
Offset: 0

Views

Author

Philippe Deléham, Jan 11 2014

Keywords

Comments

Row sums are A007179(n+1).

Examples

			Triangle begins (0<=k<=n):
1
0, 1
2, 1, 1
0, 3, 2, 1
4, 3, 5, 3, 1
0, 7, 8, 8, 4, 1
8, 7, 15, 16, 12, 5, 1
0, 15, 22, 31, 28, 17, 6, 1
		

Crossrefs

Cf. Columns: A077957, A052551, A077866.
Diagonals: A000012, A001477, A022856.
Cf. Similar sequences: A059260, A191582.

Formula

T(n,n)=1, T(2n,0)=2^n, T(2n+1,0)=0, T(n,k)=T(n-1,k-1)+T(n-1,k) for 0
T(n,k)=T(n-1,k)+T(n-1,k-1)+2*T(n-2,k)-T(n-3,k)-2*T(n-3,k-1), T(0,0)=1, T(1,0)=0, T(1,1)=1, T(n,k)=0 if k<0 or if k>n.
T(n,n)=1, T(n+1,n)=n, T(n+2,n)=n*(n+1)/2 + 2.
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(3*x + 2*x^2/2! + x^3/3!) = 3*x + 8*x^2/2! + 16*x^3/3! + 28*x^4/4! + 45*x^5/5! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 22 2014
Showing 1-5 of 5 results.