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.

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

A015540 a(n) = 5*a(n-1) + 6*a(n-2), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 5, 31, 185, 1111, 6665, 39991, 239945, 1439671, 8638025, 51828151, 310968905, 1865813431, 11194880585, 67169283511, 403015701065, 2418094206391, 14508565238345, 87051391430071, 522308348580425, 3133850091482551, 18803100548895305, 112818603293371831
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length n between any two distinct vertices of the complete graph K_7. Example: a(2)=5 because the walks of length 2 between the vertices A and B of the complete graph ABCDEFG are ACB, ADB, AEB, AFB and AGB. - Emeric Deutsch, Apr 01 2004
Pisano period lengths: 1, 1, 2, 2, 2, 2, 14, 2, 2, 2, 10, 2, 12, 14, 2, 2, 16, 2, 18, 2, ... - R. J. Mathar, Aug 10 2012
Sum_{i=0..m} (-1)^(m+i)*6^i, for m >= 0, gives all terms after 0. - Bruno Berselli, Aug 28 2013
The ratio a(n+1)/a(n) converges to 6 as n approaches infinity. Also A053524, A080424, A051958. - Felix P. Muga II, Mar 09 2014

Examples

			G.f. = x + 5*x^2 + 31*x^3 + 185*x^4 + 1111*x^5 + 6665*x^6 + 39991*x^7 + ...
		

Crossrefs

Partial sums are in A033116. Cf. A014987.

Programs

  • Magma
    [Floor(6^n/7-(-1)^n/7): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
    
  • Maple
    seq(round(6^n/7),n=0..25); # Mircea Merca, Dec 28 2010
  • Mathematica
    k=0; lst={k}; Do[k = 6^n-k; AppendTo[lst, k], {n, 0, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    CoefficientList[Series[x / ((1 - 6 x) (1 + x)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
    LinearRecurrence[{5,6},{0,1},30] (* Harvey P. Dale, May 12 2015 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x/((1-6*x)*(1+x)))) \\ G. C. Greubel, Jan 24 2018
    
  • PARI
    a(n) = round(6^n/7); \\ Altug Alkan, Sep 05 2018
  • Sage
    [lucas_number1(n,5,-6) for n in range(21)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = 5*a(n-1) + 6*a(n-2).
From Paul Barry, Apr 20 2003: (Start)
a(n) = (6^n - (-1)^n)/7.
G.f.: x/((1-6*x)*(1+x)).
E.g.f.: (exp(6*x) - exp(-x))/7. (End)
a(n) = 6^(n-1) - a(n-1). - Emeric Deutsch, Apr 01 2004
a(n+1) = Sum_{k=0..n} binomial(n-k, k)*5^(n-2*k)*6^k. - Paul Barry, Jul 29 2004
a(n) = round(6^n/7). - Mircea Merca, Dec 28 2010
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-7)^k = (6^n - (-1)^n)/7 = (-1)^(n-1)*Sum_{k=0..n-1} (-6)^k. Equals (-1)^(n-1)*Phi(n,-6), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014

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

A178719 Partial sums of (1/5)*floor(6^n/7).

Original entry on oeis.org

0, 0, 1, 7, 44, 266, 1599, 9597, 57586, 345520, 2073125, 12438755, 74632536, 447795222, 2686771339, 16120628041, 96723768254, 580342609532, 3482055657201, 20892333943215, 125354003659300, 752124021955810, 4512744131734871, 27076464790409237, 162458788742455434, 974752732454732616
Offset: 0

Views

Author

Mircea Merca, Dec 26 2010

Keywords

Comments

Partial sums of A033116.

Examples

			a(3) = (1/5)*(floor(6^1/7) + floor(6^2/7) + floor(6^3/7)) = (1/5)*(0+5+30) = (1/5)*35 = 7.
		

Crossrefs

Column k=6 of A368296.
Cf. A033116.

Programs

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

Formula

a(n) = (1/5)*round((24*6^n - 70*n - 49)/140).
a(n) = (1/5)*floor((12*6^n - 35*n - 12)/70).
a(n) = (1/5)*ceiling((12*6^n - 35*n - 37)/70).
a(n) = (1/5)*round((12*6^n - 35*n - 12)/70).
a(n) = a(n-2) + (6^(n-1) - 1)/5, n > 1.
a(n) = 7*a(n-1) - 5*a(n-2) - 7*a(n-3) + 6*a(n-4), n > 3.
G.f.: x^2 / ( (1+x)*(1-6*x)*(1-x)^2 ).
a(n) = (24*6^n - 70*n + 25*(-1)^n - 49)/700. - Bruno Berselli, Feb 18 2011
a(n) = (floor(6^(n+1)/35) - floor((n+1)/2))/5. - Seiichi Manyama, Dec 22 2023
Showing 1-5 of 5 results.