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

A128174 Transform, (1,0,1,...) in every column.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Inverse of the triangle = a tridiagonal matrix with (1,1,1,...) in the superdiagonal, (0,0,0,...) in the main diagonal and (-1,-1,-1,...) in the subdiagonal.
Riordan array (1/(1-x^2), x) with inverse (1-x^2,x). - Paul Barry, Sep 10 2008
The position of 1's in this sequence is equivalent to A246705, and the position of 0's is equivalent to A246706. - Bernard Schott, Jun 05 2019

Examples

			First few rows of the triangle are:
  1;
  0, 1;
  1, 0, 1;
  0, 1, 0, 1;
  1, 0, 1, 0, 1; ...
		

Crossrefs

Cf. A004526 (row sums).

Programs

  • Haskell
    a128174 n k = a128174_tabl !! (n-1) !! (k-1)
    a128174_row n = a128174_tabl !! (n-1)
    a128174_tabl = iterate (\xs@(x:_) -> (1 - x) : xs) [1]
    -- Reinhard Zumkeller, Aug 01 2014
    
  • Magma
    [[(1+(-1)^(n-k))/2: k in [1..n]]: n in [1..12]]; // G. C. Greubel, Jun 05 2019
    
  • Maple
    A128174 := proc(n,k)
        if k > n or k < 1 then
            0;
        else
            modp(k+n+1,2) ;
        end if;
    end proc: # R. J. Mathar, Aug 06 2016
  • Mathematica
    a128174[r_] := Table[If[EvenQ[n+k], 1, 0], {n, 1, r}, {k, 1, n}]
    TableForm[a128174[5]] (* triangle *)
    Flatten[a128174[10]] (* data *) (* Hartmut F. W. Hoft, Mar 15 2017 *)
    Table[(1+(-1)^(n-k))/2, {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, Sep 26 2017 *)
  • PARI
    for(n=1,12, for(k=1,n, print1((1+(-1)^(n-k))/2, ", "))) \\ G. C. Greubel, Sep 26 2017
    
  • Sage
    [[(1+(-1)^(n-k))/2 for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jun 05 2019

Formula

A lower triangular matrix transform, (1, 0, 1, ...) in every column; n terms of (1, 0, 1, ...) in odd rows; n terms of (0, 1, 0, ...) in even rows.
T(n,k) = [k<=n]*(1+(-1)^(n-k))/2. - Paul Barry, Sep 10 2008
With offset n=1, k=0: Sum_{k=0..n} {T(n,k)*x^k} = A000035(n), A004526(n+1), A000975(n), A033113(n), A033114(n), A033115(n), A033116(n), A033117(n), A033118(n), A033119(n), A056830(n+1) for x=0,1,2,3,4,5,6,7,8,9,10 respectively. - Philippe Deléham, Oct 17 2011
T(n+1,1) = 1 - T(n,1); T(n+1,k) = T(n,k-1), 1 < k <= n+1. - Reinhard Zumkeller, Aug 01 2014

A056830 Alternate digits 1 and 0.

Original entry on oeis.org

0, 1, 10, 101, 1010, 10101, 101010, 1010101, 10101010, 101010101, 1010101010, 10101010101, 101010101010, 1010101010101, 10101010101010, 101010101010101, 1010101010101010, 10101010101010101, 101010101010101010
Offset: 0

Views

Author

Henry Bottomley, Aug 30 2000

Keywords

Comments

Fibonacci bit-representations of numbers for which there is only one possible representation and for which the maximal and minimal bit-representations (A104326 and A014417) are equal. The numbers represented are equal to the numbers in A000071 (subtract the first term of that sequence). For example, 10101 = 12 because 8+5+1. - Casey Mongoven, Mar 19 2006
Sequence A000975 written in base 2. - Jaroslav Krizek, Aug 05 2009
The absolute value of alternating sum of the first n repunits: a(n) = abs(Sum_{k=0..n} (-1)^k*A002275(n)). - Ilya Gutkovskiy, Dec 02 2015
Binary representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 131", based on the 5-celled von Neumann neighborhood. See A279053 for references and links. - Robert Price, Dec 05 2016

Examples

			n  a(n)             A000975(n)   (If a(n) is interpreted in base 2.)
------------------------------
0  0 ....................... 0
1  1 ....................... 1
2  10 ...................... 2 = 2^1
3  101 ..................... 5
4  1010 ................... 10 = 2^1 + 2^3
5  10101 .................. 21
6  101010 ................. 42 = 2^1 + 2^3 + 2^5
7  1010101 ................ 85
8  10101010 .............. 170 = 2^1 + 2^3 + 2^5 + 2^7
9  101010101 ............. 341
10 1010101010 ............ 682 = 2^1 + 2^3 + 2^5 + 2^7 + 2^9
11 10101010101 .......... 1365
12 101010101010 ......... 2730 = 2^1 + 2^3 + 2^5 + 2^7 + 2^9 + 2^11, etc.
- _Bruno Berselli_, Dec 02 2015
		

Crossrefs

Programs

  • GAP
    List([0..30], n-> Int(10^(n+1)/99) ); # G. C. Greubel, Jul 14 2019
  • Magma
    [Round((20*10^n-11)/198) : n in [0..30]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    A056830 := proc(n) floor(10^(n+1)/99) ; end proc:
  • Mathematica
    CoefficientList[Series[x/((1-x^2)*(1-10*x)), {x,0,30}], x] (* G. C. Greubel, Sep 26 2017 *)
  • PARI
    Vec(x/((1-x)*(1+x)*(1-10*x))+O(x^30)) \\ Charles R Greathouse IV, Feb 13 2017
    
  • Sage
    [floor(10^(n+1)/99) for n in (0..30)] # G. C. Greubel, Jul 14 2019
    

Formula

a(n) = +10*a(n-1) + a(n-2) - 10*a(n-3).
a(n) = floor(10^(n+1)/(10^2-1)) = a(n-2)+10^(n-1) = 10*a(n-1) + (1 - (-1)^n)/2.
From Paul Barry, Nov 12 2003: (Start)
a(n+1) = Sum_{k=0..floor(n/2)} 10^(n-2*k).
a(n+1) = Sum_{k=0..n} Sum_{j=0..k} (-1)^(j+k)*10^j.
G.f.: x/((1-x)*(1+x)*(1-10*x)).
a(n) = 9*a(n-1) + 10*a(n-2) + 1.
a(n) = 10^(n+1)/99 - (-1)^n/22 - 1/18. (End)
a(n) = A007088(A107909(A104161(n))) = A007088(A000975(n)). - Reinhard Zumkeller, May 28 2005
a(n) = round((20*10^n-11)/198) = floor((10*10^n-1)/99) = ceiling((10*10^n-10)/99) = round((10*10^n-10)/99). - Mircea Merca, Dec 27 2010
From Daniel Forgues, Sep 20 2018: (Start)
If a(n) is interpreted in base 2:
a(2n) = Sum_{k=1..n} 2^(2n-1), n >= 0; a(2n-1) = a(2n)/2, n >= 1.
a(2n) = A020988(n), n >= 0.
a(0) = 0; a(2n) = 4*a(2n-2) + 2, n >= 1. (End)

Extensions

More terms from Casey Mongoven, Mar 19 2006

A059848 As a square table by antidiagonals, the n-digit number which in base k starts 1010101...

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 2, 2, 0, 0, 1, 3, 5, 2, 1, 0, 1, 4, 10, 10, 3, 0, 0, 1, 5, 17, 30, 21, 3, 1, 0, 1, 6, 26, 68, 91, 42, 4, 0, 0, 1, 7, 37, 130, 273, 273, 85, 4, 1, 0, 1, 8, 50, 222, 651, 1092, 820, 170, 5, 0, 0, 1, 9, 65, 350, 1333, 3255, 4369, 2460, 341, 5, 1, 0, 1, 10
Offset: 0

Views

Author

Henry Bottomley, Feb 26 2001

Keywords

Examples

			T(5,3)=10101 base 3=81+9+1=91; T(4,6)=1010 base 6=216+6=222. Table starts {0,0,0,0,...}, {1,1,1,1,...}, {0,1,2,3,...}, {1,2,5,10,...}, ...
		

Crossrefs

Formula

T(n, k)=floor[k^(n+1)/(k^2-1)] =T(n-2, k)+k^(n-1) =k*T(n-1, k)-((-1)^n-1)/2

A178730 Partial sums of floor(7^n/8)/6.

Original entry on oeis.org

0, 1, 8, 58, 408, 2859, 20016, 140116, 980816, 6865717, 48060024, 336420174, 2354941224, 16484588575, 115392120032, 807744840232, 5654213881632, 39579497171433, 277056480200040, 1939395361400290, 13575767529802040, 95030372708614291, 665212608960300048, 4656488262722100348, 32595417839054702448
Offset: 1

Views

Author

Mircea Merca, Dec 26 2010

Keywords

Comments

Partial sums of A033117.

Examples

			a(3) = (1/6)*(floor(7/8) + floor(7^2/8) + floor(7^3/8)) = (1/6)*(0+6+42) = 8.
		

Crossrefs

Column k=7 of A368296.
Cf. A033117.

Programs

  • Magma
    [Floor((7*7^n-24*n-7)/48)/6: n in [1..30]]; // Vincenzo Librandi, Jun 21 2011
    
  • Maple
    A178730 := proc(n) add( floor(7^i/8)/6,i=0..n) ; end proc:
  • Mathematica
    CoefficientList[Series[x/((1+x)(1-7x)(1-x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
  • PARI
    vector(30, n, (((7^(n+1)-24*n-7)/48)\1)/6) \\ G. C. Greubel, Jan 24 2019
    
  • Sage
    [floor((7^(n+1)-24*n-7)/48)/6 for n in (1..30)] # G. C. Greubel, Jan 24 2019

Formula

6*a(n) = round((7*7^n - 24*n - 16)/48).
6*a(n) = floor((7*7^n - 24*n - 7)/48).
6*a(n) = ceiling((7*7^n - 24*n - 25)/48).
6*a(n) = round((7*7^n - 24*n - 7)/48).
a(n) = a(n-2) + (7^(n-1) - 1)/6, n > 2.
a(n) = 8*a(n-1) - 6*a(n-2) - 8*a(n-3) + 7*a(n-4), n > 4.
G.f.: x^2/((1+x)*(1-7*x)*(1-x)^2).
a(n) = (7^(n+1) - 24*n + 9*(-1)^n - 16)/288. - Bruno Berselli, Jan 11 2011
a(n) = (floor(7^(n+1)/48) - floor((n+1)/2))/6. - Seiichi Manyama, Dec 22 2023
Showing 1-4 of 4 results.