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 60 results. Next

A135231 Row sums of triangle A135230.

Original entry on oeis.org

1, 2, 4, 6, 12, 22, 44, 86, 172, 342, 684, 1366, 2732, 5462, 10924, 21846, 43692, 87382, 174764, 349526, 699052, 1398102, 2796204, 5592406, 11184812, 22369622, 44739244, 89478486, 178956972, 357913942, 715827884, 1431655766, 2863311532, 5726623062, 11453246124, 22906492246, 45812984492
Offset: 0

Views

Author

Gary W. Adamson, Nov 23 2007

Keywords

Examples

			a(3) = 6 = sum of row 4 terms of triangle A135230; (1 + 2 + 2 + 1).
a(5) = 22 = A005578(6).
a(6) = 44 = A005578(7) + 1.
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq n then return 1;
      elif k eq 0 then return (3+(-1)^n)/2;
      else return (&+[Binomial(n-2*j-1, k-1): j in [0..Floor((n-1)/2)]]);
      end if; return T; end function;
    [(&+[T(n,j): j in [0..n]]): n in [0..40]]; // G. C. Greubel, Nov 20 2019
    
  • Maple
    T:= proc(n, k) option remember;
          if k=n then 1
        elif k=0 then (3+(-1)^n)/2
        else add(binomial(n-2*j-1, k-1), j=0..floor((n-1)/2))
          fi; end:
    seq( add(T(n, j), j=0..n), n=0..40); # G. C. Greubel, Nov 20 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, (3+(-1)^n)/2, Sum[Binomial[n-1 - 2*j, k-1], {j, 0, Floor[(n-1)/2]}]]]; Table[Sum[T[n, j], {j, 0, n}], {n, 0, 40}] (* G. C. Greubel, Nov 20 2019 *)
  • PARI
    T(n,k) = if(k==n, 1, if(k==0, (3+(-1)^n)/2, sum(j=0, (n-1)\2, binomial( n-2*j-1, k-1)) )); \\ G. C. Greubel, Nov 20 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==n): return 1
        elif (k==0): return (3+(-1)^n)/2
        else: return sum(binomial(n-2*j-1, k-1) for j in (0..floor((n-1)/2)))
    [sum(T(n, j) for j in (0..n)) for n in (0..40)] # G. C. Greubel, Nov 20 2019

Formula

a(2*n+1) = A005578(n+1) if n is odd.
Conjectures from Chai Wah Wu, Aug 31 2023: (Start)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 3.
G.f.: (-2*x^3 - x^2 + 1)/((x - 1)*(x + 1)*(2*x - 1)). (End)

Extensions

Terms a(16) onward added and offset changed by G. C. Greubel, Nov 20 2019

A241893 The total number of rectangles appearing in the Thue-Morse sequence logical matrices (1, 0 version) after n stages.

Original entry on oeis.org

0, 0, 0, 8, 28, 120, 460, 1848, 7308, 29240, 116620, 466488, 1864588, 7458360, 29827980, 119311928, 477225868, 1908903480, 7635526540, 30542106168, 122168075148, 488672300600, 1954687804300
Offset: 0

Views

Author

Kival Ngaokrajang, May 01 2014

Keywords

Comments

a(n) is the total number of non-isolated "1s" (consecutive 1s on 2 rows, 1 column or 1 row, 2 columns) that appear as rectangles in the Thue-Morse sequence (another version starts with 1) logical matrices after n stages. See links for more details.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[4*x^3*(-2 + x + 8*x^2)/((x - 1)*(4*x - 1)*(2*x + 1)*(2*x - 1)*(1 + x)), {x, 0, 50}], x] (* G. C. Greubel, Sep 29 2017 *)
  • PARI
    {a0=0;a=0;b=1;print1(a0,", ",a,", "); for (n=2,50, if(Mod(n,2)==0, a = 2*(a*2-(4*b-4)) + 4*b; b=b*4-2, a=a*4-8); if(Mod(n,2)==0, print1(a-4,", "),print1(a,", ")))}

Formula

a(n) = A233036(A005578(n+1)).
G.f.: 4*x^3*(-2+x+8*x^2) / ( (x-1)*(4*x-1)*(2*x+1)*(2*x-1)*(1+x) ). - R. J. Mathar, May 04 2014
a(n) = (3*2^n+2*4^n-(-1)^n*(2^n+12)-28)/18, n>0. - R. J. Mathar, May 04 2014

A322051 a(n) is the number of initial terms in the row of length 2^n of A322050 that agree with the limiting sequence A322049.

Original entry on oeis.org

1, 1, 2, 4, 6, 11, 22, 43, 86, 171, 342, 683, 1366, 2731, 5462
Offset: 0

Views

Author

Hugo Pfoertner, Dec 16 2018

Keywords

Comments

Seems to be identical to A005578 with the exception of a(3) = 4. - Omar E. Pol, Dec 17 2018

Examples

			   n     i*    a(n)  first non-matching pair    (i* = Index of start in A319018)
   0      3     1      5      1
   1      5     1      7      5
   2      9     2      6      3
   3     17     4      8      5
   4     33     6     17     15
   5     65    11    145    141
   6    129    22     73     69
   7    257    43    734    726
   8    513    86    349    341
   9   1025   171   3579   3563
  10   2049   342   1696   1680
  11   4097   683  17810  17778
  12   8193  1366   8394   8362
  13  16385  2731  88553  88489
  14  32769  5462  41665  41601
  ...
		

Crossrefs

Formula

Conjecture: For n >= 5, a(n) = 2*a(n-1)-1 if n is odd, 2*a(n-1) if n is even.
Conjectures from Colin Barker, Dec 29 2018: (Start)
G.f.: (1 - x - x^2 + x^3 - 2*x^4 - x^5 + 2*x^6) / ((1 - x)*(1 + x)*(1 - 2*x)).
a(n) = (2^n + 2) / 3 for n even and n>3.
a(n) = (2^n + 1) / 3 for n odd and n>3.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>6.
(End)

Extensions

Edited by M. F. Hasler, Dec 18 2018

A328284 An extension of the Jacobsthal numbers: 0, 0, 1, followed by A001045.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485
Offset: 0

Views

Author

Paul Curtz, Oct 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n>3, (2^(n-3) + (-1)^n)/3, If[n == 2, 1, 0]]; (* Jean-François Alcover, Oct 16 2019 *)

Formula

a(n) is the fourth row of the following array:
0, 0, 0, 0, 0, 1, 3, 7, 14, 27, 51, 97, ...
0, 0, 0, 0, 1, 2, 4, 7, 13, 24, 46, 89, ... = A086445
0, 0, 0, 1, 1, 2, 3, 6, 11, 22, 43, 86, ... = 0, 0, 0, A005578(n)
0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, ... = a(n)
0, 1, -1, 1, 0, 2, 2, 6, 10, 22, 42, 86, ...
1, -2, 2, -1, 2, 0, 4, 4, 12, 20, 44, 84, ...
From the main diagonal onward, every row is an autosequence of the first kind.
From Stefano Spezia, Oct 16 2019: (Start)
O.g.f.: x^2*(-1 + x + x^2)/(-1 + x + 2*x^2).
E.g.f.: (1/24)*exp(-x)*(8 - 9*exp(x) + exp(3*x) + 6*exp(x)*x + 6*exp(x)*x^2).
a(n) = a(n-1) + 2*a(n-2) for n > 4. (End)
a(n) = Sum_{k=0..n-1} A183190(n-k-2, n-2*k-2). - Jean-François Alcover, Nov 10 2019

Extensions

Partially edited by Peter Luschny, Nov 12 2019

A085424 Number of ones in the symmetric signed digit expansion of n with q=2 (i.e., the representation of n in the (-1,0,1)_2 number system).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 4, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Ralf Stephan, Jun 30 2003

Keywords

Crossrefs

Cf. A005578, A085423, A007302 (nonzeros), A057526 (0's), A085425 (-1's).

Programs

  • PARI
    ep(r, n)=local(t=n/2^(r+2)); floor(t+5/6)-floor(t+4/6)-floor(t+2/6)+floor(t+1/6);
    a(n)=sum(r=0, log(3*n)\log(2)-1, (ep(r, n) == 1)) ;

A085425 Number of minus ones in the symmetric signed digit expansion of n with q=2 (i.e., the representation of n in the (-1,0,1)_2 number system).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 3, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 3, 3, 2, 2, 2, 3, 2, 2, 2, 2, 1
Offset: 1

Views

Author

Ralf Stephan, Jun 30 2003

Keywords

Crossrefs

Cf. A005578, A085423, A007302 (nonzeros), A057526 (0's), A085424 (1's).

Programs

  • PARI
    ep(r, n)=local(t=n/2^(r+2)); floor(t+5/6)-floor(t+4/6)-floor(t+2/6)+floor(t+1/6);
    a(n)=sum(r=0, log(3*n)\log(2)-1, (ep(r, n) == 1)) ;

A091186 Triangle read by rows, in which n-th row gives expansion of x^n/((1-x)(1-x-x^2)^n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 7, 8, 4, 1, 1, 12, 18, 13, 5, 1, 1, 20, 38, 35, 19, 6, 1, 1, 33, 76, 86, 59, 26, 7, 1, 1, 54, 147, 197, 164, 91, 34, 8, 1, 1, 88, 277, 430, 420, 281, 132, 43, 9, 1, 1, 143, 512, 904, 1014, 792, 447, 183, 53, 10, 1, 1, 232, 932, 1846, 2338, 2087, 1371
Offset: 0

Views

Author

Paul Barry, Dec 25 2003

Keywords

Comments

Riordan array (1/(1-x),x/(1-x-x^2)). - Paul Barry, Sep 13 2006

Examples

			Rows begin {1},{1,1},{1,2,1},{1,4,3,1}...
		

Crossrefs

Row sums are A024537. Diagonal sums are A005578. Second column is A000071. Third column is A006478.
Essentially the vertical partial sums of triangle A037027.

Formula

G.f.: (1-y-y^2) / [(1-y(1+y+z))(1-y)].
Number triangle T(n,k)=sum{j=0..n-k, sum{i=0..n-k-j, C(k+j-1,j)C(j,n-k-i-j)}}; - Paul Barry, Sep 13 2006
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k-1) - T(n-3,k), T(0,0) = T(1,0) = T(1,1) = T(2,0) = T(2,2) = 1, T(2,1) = 2, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 20 2014

A107359 a(n) = A003754(n+1) - A003754(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 6, 1, 1, 3, 1, 2, 1, 1, 11, 1, 2, 1, 1, 6, 1, 1, 3, 1, 2, 1, 1, 22, 1, 1, 3, 1, 2, 1, 1, 11, 1, 2, 1, 1, 6, 1, 1, 3, 1, 2, 1, 1, 43, 1, 2, 1, 1, 6, 1, 1, 3, 1, 2, 1, 1, 22, 1, 1, 3, 1, 2, 1, 1, 11, 1, 2, 1, 1, 6, 1, 1, 3, 1, 2, 1, 1, 86, 1, 1, 3, 1, 2, 1, 1, 11, 1, 2, 1, 1, 6, 1
Offset: 0

Views

Author

Reinhard Zumkeller, May 25 2005

Keywords

Formula

a(A001911(n)) = A005578(n).
a(A000071(n)) = 1.

A112971 Row sums of the matrix ((1,xc(x))^2 mod 2), where c(x) is the g.f. of A000108.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 2, 2, 1, 6, 3, 4, 2, 4, 2, 2, 1, 8, 4, 4, 2, 4, 2, 2, 1, 11, 6, 6, 3, 8, 4, 4, 2, 8, 4, 4, 2, 4, 2, 2, 1, 16, 8, 8, 4, 8, 4, 4, 2, 8, 4, 4, 2, 4, 2, 2, 1, 22, 11, 12, 6, 12, 6, 6, 3, 16, 8, 8, 4, 8, 4, 4, 2, 16, 8, 8, 4, 8, 4, 4, 2, 8, 4, 4, 2, 4, 2, 2, 1, 32, 16, 16, 8
Offset: 0

Views

Author

Paul Barry, Oct 07 2005

Keywords

Comments

(1,xc(x)) is the Riordan array T(n,k)=[x^n](xc(x))^k. Conjectures: a(2^n)=a(2^(n+1)+1)=A005578(n);a(2^n-1)=a(3*2^n-1)=1.

Crossrefs

Cf. A112970.

Formula

a(n)=sum{k=0..n, mod(sum{i=0..n, sum{j=0..n, ((2j+1)/(n+j+1))(-1)^(j-i)C(2n, n+j)C(j, i)}* sum{l=0..i, ((2l+1)/(i+l+1))(-1)^(l-k)C(2i, i+l)C(l, k)}}, 2)}

A241894 The total number of squares and rectangles appearing in the Thue-Morse sequence (1, 0 version) logical matrices after n stages.

Original entry on oeis.org

1, 2, 5, 18, 61, 242, 925, 3698, 14621, 58482, 233245, 932978, 3729181, 14916722, 59655965, 238623858, 954451741, 3817806962, 15271053085, 61084212338, 244336150301, 977344601202, 3909375608605
Offset: 0

Views

Author

Kival Ngaokrajang, May 01 2014

Keywords

Comments

a(n) is the total number of unit squares (A241891), 2 X 2
squares (A241892), 2 X 1 and 1 X 2 rectangles (A241893) that appear in the Thue-Morse sequence (another version starts with 1) logical matrices after n stages. See links for more details.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,5,-20,-4,16},{1,2,5,18,61},30] (* Harvey P. Dale, Aug 02 2016 *)
  • PARI
    {a0=1; print1(a0,", "); for (n=2,50, b=(2^(n+1)+3+(-1)^n)/6; a=floor(b^2/2);if(Mod(n,2)==1, a=a+1); print1(a,", "))}

Formula

a(n) = A000982(A005578(n+1)).
G.f.: ( -1+2*x+8*x^2-8*x^3-8*x^4 ) / ( (x-1)*(4*x-1)*(1+2*x)*(2*x-1)*(1+x) ). - R. J. Mathar, May 04 2014
18*a(n) = 7+6*2^n +4^(n+1) +(-1)^n*( 3-2^(n+1) ). - R. J. Mathar, May 04 2014
Previous Showing 41-50 of 60 results. Next