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-10 of 304 results. Next

A002478 Bisection of A000930.

Original entry on oeis.org

1, 1, 3, 6, 13, 28, 60, 129, 277, 595, 1278, 2745, 5896, 12664, 27201, 58425, 125491, 269542, 578949, 1243524, 2670964, 5736961, 12322413, 26467299, 56849086, 122106097, 262271568, 563332848, 1209982081, 2598919345, 5582216355, 11990037126, 25753389181
Offset: 0

Views

Author

Keywords

Comments

Number of ways to tile a 3 X n region with 1 X 1, 2 X 2 and 3 X 3 tiles.
Number of ternary words with subwords (0,0), (0,1) and (1,1) not allowed. - Olivier Gérard, Aug 28 2012
Diagonal sums of A063967. - Paul Barry, Nov 09 2005
Row sums of number triangle A116088. - Paul Barry, Feb 04 2006
Sequence is identical to its second differences negated, minus the first 3 terms. - Paul Curtz, Feb 10 2008
a(n) = term (3,3) in the 3 X 3 matrix [0,1,0; 0,0,1; 1,2,1]^n. - Gary W. Adamson, May 30 2008
a(n)/a(n-1) tends to 2.147899035..., an eigenvalue of the matrix and a root to x^3 - x^2 - 2x - 1 = 0. - Gary W. Adamson, May 30 2008
INVERT transform of (1, 2, 1, 0, 0, 0, ...) = (1, 3, 6, 13, 28, ...); such that (1, 2, 1, 0, 0, 0, ...) convolved with (1, 1, 3, 6, 13, 28, 0, 0, 0, ...) shifts to the left. - Gary W. Adamson, Apr 18 2010
a(n) is the top left entry in the n-th power of the 3 X 3 matrix [1, 1, 1; 1, 0, 1; 1, 0, 0] or of the 3 X 3 matrix [1, 1, 1; 1, 0, 0; 1, 1, 0]. - R. J. Mathar, Feb 03 2014

Examples

			a(3)=6 as there is one tiling of a 3 X 3 region with only 1 X 1 tiles, 4 tilings with exactly one 2 X 2 tile and 1 tiling consisting of the 3 X 3 tile.
		

References

  • Kenneth Edwards, Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • L. Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 322.
  • S. Heubach, Tiling an m X n Area with Squares of Size up to k X k (m<=5), Congressus Numerantium 140 (1999), pp. 43-64.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000930, A054856, A054857, A025234, A078007, A078039, A226546, A077936 (INVERT transform), A008346 (inverse INVERT transform).

Programs

  • Magma
    I:=[1,1,3]; [n le 3 select I[n] else Self(n-1) +2*Self(n-2) +Self(n-3): n in [1..41]]; // G. C. Greubel, Apr 14 2023
    
  • Mathematica
    f[A_]:= Module[{til = A}, AppendTo[til, A[[-1]] + 2A[[-2]] + A[[-3]]]]; NumOfTilings[ n_ ]:= Nest[ f, {1,1,3}, n-2]; NumOfTilings[30]
    LinearRecurrence[{1,2,1},{1,1,3},40] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
    CoefficientList[Series[1/(1-x-2x^2-x^3),{x,0,40}],x] (* Harvey P. Dale, Oct 17 2024 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 1,2,1]^n*[1;1;3])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • SageMath
    @CachedFunction
    def a(n): # A002478
        if (n<3): return (1,1,3)[n]
        else: return sum(binomial(2,j)*a(n-j) for j in range(1,4))
    [a(n) for n in (0..40)] # G. C. Greubel, Apr 14 2023

Formula

G.f.: 1 / (1-x-2*x^2-x^3). [Simon Plouffe in his 1992 dissertation.]
a(n) = a(n-1) + 2*a(n-2) + a(n-3).
a(n) = Sum_{k=0..n} binomial(2*n-2*k, k). - Paul Barry, Nov 13 2004
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} C(j, n-k-j)*C(j, k). - Paul Barry, Nov 09 2005
a(n) = Sum_{k=0..n} C(2*k,n-k) = Sum_{k=0..n} C(n,k)*C(3*k,n)/C(3*k,k). - Paul Barry, Feb 04 2006
a(n) = A000930(n) + 2*Sum_{i=0..n-2} a(i)*A000930(n-2-i). - Michael Tulskikh, Jun 07 2020

Extensions

Additional comments from Silvia Heubach (silvi(AT)cine.net), Apr 21 2000

A227835 3^a(n) is the highest power of 3 dividing A000930(n).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 04 2013

Keywords

Comments

This is the 3-adic valuation of A000930.

Crossrefs

Programs

A350311 Replace 2^k in the binary expansion of n with A000930(k+2), Narayana's cows sequence.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 6, 7, 8, 9, 9, 10, 11, 12, 10, 11, 12, 13, 13, 14, 15, 16, 9, 10, 11, 12, 12, 13, 14, 15, 13, 14, 15, 16, 16, 17, 18, 19, 15, 16, 17, 18, 18, 19, 20, 21, 19, 20, 21, 22, 22, 23, 24, 25, 13, 14, 15, 16, 16, 17
Offset: 0

Author

A.H.M. Smeets, Dec 24 2021

Keywords

Comments

A048715(n) = m, if and only if a(n) = m and for all k > n a(k) > m.

Crossrefs

Cf. A022290 (analog for Fibonacci numbers).

Programs

  • Maple
    b:= (n, i, j, k)->`if`(n=0, 0, k*irem(n, 2, 'q')+b(q, j, k, i+k)):
    a:= n-> b(n, 1$3):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 26 2022
  • PARI
    my(p=Mod('x,'x^3-'x^2-1)); a(n) = vecsum(Vec(lift(subst(Pol(binary(n))*'x^2,'x,p)))); \\ Kevin Ryde, Dec 26 2021
  • Python
    def Interpretation(n):
        f0, f1, f2, r = 1, 1, 1, 0
        while n > 0:
            if n%2 == 1:
                r = r+f0
            n, f0, f1, f2 = n//2, f0+f2, f0, f1
        return r
    n = 0
    while n <= 69:
        print(Interpretation(n), end = ", ")
        n += 1
    

A108104 Sequence A000930 with terms repeated.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 9, 9, 13, 13, 19, 19, 28, 28, 41, 41, 60, 60, 88, 88, 129, 129, 189, 189, 277, 277, 406, 406, 595, 595, 872, 872, 1278, 1278, 1873, 1873, 2745, 2745, 4023, 4023, 5896, 5896, 8641, 8641, 12664, 12664, 18560, 18560
Offset: 0

Author

Roger L. Bagula, Jun 03 2005

Keywords

Comments

The usual policy in the OEIS is not to include such "doubled" sequences. This is an exception. - N. J. A. Sloane
Based on the morphism 1->{5}, 2->{6}, 3->{4}, 4->{2}, 5->{3}, 6->{1, 6}.

Crossrefs

Cf. A000930.

Programs

  • Magma
    I:=[1,1,1,1,1,1]; [n le 6 select I[n] else Self(n-2)+Self(n-6): n in [1..60]]; // Vincenzo Librandi, Jan 19 2016
  • Mathematica
    s[1] = {5}; s[2] = {6}; s[3] = {4}; s[4] = {2}; s[5] = {3}; s[6] = {1, 2}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]] a0 = Table[Length[p[i]], {i, 0, 50}]
    m = 6; For[n = 0, n < m, n++, a[n] = 1]; For[n = m, n < 51, n++, a[n] = a[n - m] + a[n - 2]]; Table[a[n], {n, 0, 50}] (* Sergio Falcon, Nov 12 2015 *)
    CoefficientList[Series[(1 + x) / (1 - x^2 - x^6), {x, 0, 50}], x] (* or *) LinearRecurrence[{0, 1, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 1}, 60] (* Vincenzo Librandi, Jan 19 2016 *)
  • PARI
    x='x+O('x^55); Vec((1+x)/(1-x^2-x^6)) \\ Altug Alkan, Nov 10 2015
    

Formula

a(n) = a(n-2) + a(n-6), starting 1,1,1,1,1,1.
G.f.: (1+x)/(1-x^2-x^6).

Extensions

Edited by N. J. A. Sloane, Dec 01 2006

A231620 a(n) = A000930(n^2), where A000930 is Narayana's cows sequence.

Original entry on oeis.org

1, 1, 3, 19, 277, 8641, 578949, 83316385, 25753389181, 17098272199297, 24382819596721629, 74684329652984094451, 491347682599497451569523, 6943240361573523613067995729, 210741152533202801182666172606913, 13738849457010997118546333815068560833, 1923823572225984354415961546862346889944243
Offset: 0

Author

Paul D. Hanna, Nov 13 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 - x - x^3), {x, 0, n^2}], {n,0,25}] (* G. C. Greubel, Apr 26 2017 *)
  • PARI
    {a(n) = polcoeff(1/(1-x-x^3 + x*O(x^(n^2))), n^2)}
    for(n=0, 20, print1(a(n), ", "))

Formula

a(n) = [x^(n^2)] 1 / (1 - x - x^3) for n>=0.

A271901 Length of period of Narayana sequence A000930 modulo n-th prime.

Original entry on oeis.org

7, 8, 31, 57, 60, 168, 288, 381, 528, 840, 930, 342, 1723, 1848, 46, 468, 3541, 1240, 33, 5113, 2664, 6240, 3444, 7920, 3169, 10303, 10713, 11557, 11991, 991, 2016, 130, 6256, 1610, 148, 22800, 24807, 26733, 4648, 172, 10680, 32760, 36673, 37443, 2156, 3960, 481, 12432, 226, 26220, 54523, 8160, 9680, 63000
Offset: 1

Author

N. J. A. Sloane, Apr 17 2016

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], a = 1, b = 1, c = 2, k = 1}, While[a != 1 || b != 1 || c != 1, {a, b, c} = {b, c, Mod[a + c, p]}; k++]; k];
    Array[a, 100] (* Jean-François Alcover, Jul 22 2018, after Charles R Greathouse IV *)
  • PARI
    a(n,p=prime(n))=my(a=1,b=1,c=2,k=1); while(a!=1 || b!=1 || c!=1, [a,b,c]=[b,c,(a+c)%p]; k++); k \\ Charles R Greathouse IV, Feb 26 2017
  • Python
    from sympy import prime
    def A271901(n):
        p = prime(n)
        i, a, b, c =  1, 1, 1, 2 % p
        while a != 1 or b != 1 or c != 1:
            i += 1
            a, b, c = b, c, (a+c) % p
        return i # Chai Wah Wu, Feb 26 2017
    

Formula

a(n) = A271953(prime(n)). - Joerg Arndt, Apr 17 2016

Extensions

a(1) corrected by Altug Alkan, Apr 17 2016
Terms a(24) and beyond from Joerg Arndt, Apr 17 2016

A271953 a(n) is the period of A000930 modulo n.

Original entry on oeis.org

1, 7, 8, 14, 31, 56, 57, 28, 24, 217, 60, 56, 168, 399, 248, 56, 288, 168, 381, 434, 456, 420, 528, 56, 155, 168, 72, 798, 840, 1736, 930, 112, 120, 2016, 1767, 168, 342, 2667, 168, 868, 1723, 3192, 1848, 420, 744, 3696, 46, 56, 399, 1085, 288, 168, 468, 504, 1860, 1596, 3048, 840, 3541, 1736, 1240, 6510
Offset: 1

Author

Joerg Arndt, Apr 17 2016

Keywords

Crossrefs

Cf. A000930, A271901 (periods mod primes), A001175 (periods of A000045 modulo n).

Programs

  • Mathematica
    minlen = 100; maxlen = 2*10^4;
    per[lst_] := FindTransientRepeat[lst, 2] // Last // Length;
    a[n_] := Module[{p0=0, len=minlen}, While[p0 = Mod[LinearRecurrence[{1, 0, 1}, {1, 1, 1}, len], n] // per; p0<=1 && len<=maxlen, len = 2 len]; p0];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Jul 21 2018 *)
  • PARI
    per(n, S, R) = {  \\ S[]: leading terms, R[]: recurrence
        if ( n==1, return( 1 ) );
        my ( r = #R );
        if ( r != #S , error("Mismatch in length of S[] and R[]") );
        S = vector(#S, j, Mod(S[j], n) );
        R = vector(#S, j, Mod(R[j], n) );
        my( T = S );
        my( j = 0 );
        until ( 0,  \\ forever
            j += 1;
            my( t = sum(i=1, r, R[i] * T[r+1-i] ) );  \\ next term
            for (k=1, r-1, T[k] = T[k+1] );
            T[r] = t;
            if ( T == S , return(j) );
        );
    }
    \\vector(66, n, per(n, [0,1], [1,1]) )  \\ A001175
    \\vector(66, n, per(prime(n), [0,1], [1,1]) )  \\ A060305
    vector(66, n, per(n, [0,0,1], [1,0,1]) )  \\ A271953
    \\vector(66, n, per(prime(n), [0,0,1], [1,0,1]) )  \\ A271901
    \\vector(66, n, per(n, [0,0,1], [0,1,1]) )  \\ A104217
    /* Joerg Arndt, Apr 17 2016 */

Formula

Let the prime factorization of n be p1^e1*...*pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)) [Engstrom]. - N. J. A. Sloane, Feb 18 2017

A139040 Triangle read by rows: each row is an initial segment of the terms of A000930 followed by its reflection.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 2, 3, 3, 2, 1, 1, 1, 1, 2, 3, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 6, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 6, 6, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 6, 9, 6, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 6, 9, 9, 6, 4, 3, 2, 1, 1
Offset: 1

Author

Roger L. Bagula and Gary W. Adamson, May 31 2008

Keywords

Examples

			Triangle begins:
{1},
{1, 1},
{1, 1, 1},
{1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 2, 2, 1, 1},
{1, 1, 2, 3, 2, 1, 1},
{1, 1, 2, 3, 3, 2, 1, 1},
{1, 1, 2, 3, 4, 3, 2, 1, 1},
{1, 1, 2, 3, 4, 4, 3, 2, 1, 1},
{1, 1, 2, 3, 4, 6, 4, 3, 2, 1, 1}
		

Crossrefs

Cf. A139147, A000930. Row sums are in A238383.

Programs

  • Maple
    A000930 := proc(n) coeftayl( 1/(1-x-x^3),x=0,n) ; end: A139040 := proc(n,m) A000930(min(m,n+1-m)) ; end: for n from 1 to 16 do for m from 1 to n do printf("%d,",A139040(n,m)) ; od: od: # R. J. Mathar, Jun 08 2008
  • Mathematica
    a[-2]=0;a[-1]=1;a[0]=1;a[n_]:=a[n]=a[n-1]+a[n-3];(*A000930*)
    g[n_,m_]:=If[m <= Floor[n/2],a[m],a[n-m]];w=Table[Table[g[n,m],{m,0,n}],{n,0,10}]; Flatten[w]

Extensions

Edited and corrected by N. J. A. Sloane, Jun 30 2008
Corrected by Philippe Deléham, Feb 25 2014

A145580 Eigentriangle, row sums = A000930.

Original entry on oeis.org

1, 1, 1, 0, 1, 2, -1, 0, 2, 3, 0, -1, 0, 3, 4, 1, 0, -2, 0, 4, 6, 0, 1, 0, -3, 0, 6, 9, -1, 0, 2, 0, -4, 0, 9, 13, 0, -1, 0, 3, 0, -6, 0, 13, 19, 1, 0, -2, 0, 4, 0, -9, 0, 19, 28
Offset: 1

Author

Gary W. Adamson, Oct 13 2008

Keywords

Comments

Row sums = A000930 starting with offset 1: (1, 1, 2, 3, 4, 6, 9, 13, 19,...).
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
1, 1;
0, 1, 2;
-1, 0, 2, 3;
0, -1, 0, 3, 4;
1, 0, -2, 0, 4, 6;
0, 1, 0, -3, 0, 6, 9;
-1, 0, 2, 0, -4, 0, 9, 13;
0, -1, 0, 3, 0, -6, 0, 13, 19;
1, 0, -2, 0, 4, 0, -9, 0, 19, 28;
...
Row 6 = (1, 0, -2, 0, 4, 6) = termwise products of (1, 0, -1, 0, 1, 1) and (1, 1, 2, 3, 4, 6).
		

Crossrefs

Formula

Let M = an infinite lower triangular matrix with (1, 1, 0, -1, 0, 1, 0, -1, 0, 1,...) in every column; and X = an infinite lower triangular matrix with A000930 as the main diagonal (offset 1): (1, 1, 2, 3, 4, 6, 9, 13, 19,...) and the rest zeros. Triangle A145580 = M * X.

A170954 Indices k such that A000930(k) is prime.

Original entry on oeis.org

3, 4, 8, 9, 11, 16, 21, 25, 81, 6241, 25747
Offset: 1

Author

N. J. A. Sloane, Feb 25 2010, following a question from Kyle Ledbetter

Keywords

Comments

a(12) > 200000. - Donovan Johnson, Mar 14 2010
a(12) > 500000. - Michael S. Branicky, Nov 23 2024

Extensions

Two more terms from R. J. Mathar, Mar 01 2010
a(11) from Donovan Johnson, Mar 14 2010
Showing 1-10 of 304 results. Next