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 61-70 of 84 results. Next

A135293 Differences between successive numbers whose sum of digits in base 3 is 2.

Original entry on oeis.org

2, 2, 2, 4, 2, 6, 10, 2, 6, 18, 28, 2, 6, 18, 54, 82, 2, 6, 18, 54, 162, 244, 2, 6, 18, 54, 162, 486, 730, 2, 6, 18, 54, 162, 486, 1458, 2188, 2, 6, 18, 54, 162, 486, 1458, 4374, 6562, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122
Offset: 0

Views

Author

Adam Shelly (adam.shelly(AT)gmail.com), Dec 04 2007, Dec 05 2007

Keywords

Comments

First differences of A052216 when the entries in that sequence are interpreted as base 3 numbers.
Can be regarded as a triangle, where T(0,0)=2, T(n+1,0) = T(n,0)+T(n,n), T(n+1,m) = T(n,m) for 0 < m <= n and T(n+1,n+1) = sum of T(n+1,0..n)

Examples

			triangle begins:
2
2 2
4 2 6
10 2 6 18
28 2 6 18 54
82 2 6 18 54 162
244 2 6 18 54 162 486.
		

Crossrefs

Cf. A052216.

Programs

  • Mathematica
    T[0, 0] := 2; T[n_, 0] := 3^(n - 1) + 1; T[n_, m_] := 2*3^(m - 1); Table[T[n, m], {n, 0, 5}, {m, 0, n}] (* G. C. Greubel, Oct 09 2016 *)
    Join[{2},Differences[Select[Range[50000],Total[IntegerDigits[#,3]]==2&]]] (* Harvey P. Dale, Jul 04 2019 *)

Formula

T(n,m) = 2*3^(m-1) = A025192(m) for m>0. T(n,0) = 2*A124302(n). - Franklin T. Adams-Watters, Sep 29 2011

Extensions

Edited by Franklin T. Adams-Watters, Sep 29 2011

A160760 Triangle read by rows, binomial transform of an infinite lower triangular Toeplitz matrix with A078008 in every column.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 9, 5, 3, 1, 27, 14, 8, 4, 1, 81, 41, 22, 12, 5, 1, 243, 122, 63, 34, 17, 6, 1, 729, 365, 185, 97, 51, 23, 7, 1, 2187, 1094, 550, 282, 148, 74, 30, 8, 1, 6561, 3281, 1644, 832, 430, 222, 104, 38, 9, 1
Offset: 0

Views

Author

Gary W. Adamson, May 25 2009

Keywords

Comments

Row sums = A025192: (1, 2, 6, 18, 54, 162, 486, 1458,...).
A triangle formed like Pascal's triangle, but with 3^n for n>=0 on the left border instead of 1. - Boris Putievskiy, Aug 19 2013

Examples

			First few rows of the triangle =
     1;
     1,    1;
     3,    2,    1;
     9,    5,    3,   1;
    27,   14,    8,   4,   1;
    81,   41,   22,  12,   5,   1;
   243,  122,   63,  34,  17,   6,   1;
   729,  365,  185,  97,  51,  23,   7,  1;
  2187, 1094,  550, 282, 148,  74,  30,  8, 1;
  6561, 3281, 1644, 832, 430, 222, 104, 38, 9, 1;
...
		

Crossrefs

Formula

A007318 * an infinite lower triangular Toeplitz matrix with A078008 in every column: (1, 0, 2, 2, 6, 10, 22, 42, 86,...).
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013

Extensions

T(7,4) corrected by Georg Fischer, Oct 08 2021

A168570 Exponent of 3 in 2^n - 1.

Original entry on oeis.org

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

Views

Author

Martins Opmanis, Nov 30 2009

Keywords

Comments

Records: a(A025192(n)) = n and a(k) < n for k < A025192(n). [Joerg Arndt, Apr 07 2014]

Examples

			For n=6, 2^6 - 1 = 63. Greatest divisor of 63 which is a power of 3 is 9 (3^2).
		

Crossrefs

Cf. A051064 (without the zeros).

Programs

  • Maple
    a:= n-> padic[ordp](2^n-1, 3):
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 27 2017
  • Mathematica
    Table[IntegerExponent[2^n - 1, 3], {n, 100}] (* T. D. Noe, Apr 13 2014 *)
  • PARI
    vector(100,n,valuation(2^n-1,3)) /* Joerg Arndt, Jun 13 2011 */

A196731 Expansion of g.f. (1-x)/(1-12*x).

Original entry on oeis.org

1, 11, 132, 1584, 19008, 228096, 2737152, 32845824, 394149888, 4729798656, 56757583872, 681091006464, 8173092077568, 98077104930816, 1176925259169792, 14123103110037504, 169477237320450048, 2033726847845400576, 24404722174144806912, 292856666089737682944, 3514279993076852195328
Offset: 0

Views

Author

Philippe Deléham, Oct 05 2011

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..n} A193722(n,k)*9^(n-k).
a(n+1) = 12*a(n) for n > 0. - M. F. Hasler, Oct 05 2011
From Elmo R. Oliveira, Mar 18 2025: (Start)
a(n) = 11*12^(n-1) with a(0)=1.
E.g.f.: (11*exp(12*x) + 1)/12. (End)

Extensions

More terms from Elmo R. Oliveira, Mar 25 2025

A199570 Table, each row contains the previous sequence in odd columns and the row number in even columns.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			The table starts:
  1
  1 2
  1 3 1 3 2 3
  1 4 1 4 2 4 1 4 3 4 1 4 3 4 2 4 3 4
  ...
		

Crossrefs

Cf. A025192 (row lengths), A070940.

Programs

  • PARI
    n=4;v=vector(3^n);v[1]=1;for(k=1,n,for(i=(s=3^(k-1))+1,3^k,v[i]=if((i-s)%2,v[(i-s+1)\2],k+1)));v
    
  • Python
    def A199570_list(row):
        A = [1]
        for i in range(2,row+1):
            z = 2*(3**(i-2))
            for j in range(1,z+1):
                if j%2 != 0: A.append(A[int((j-1)/2)])
                else: A.append(i)
        return(A) # John Tyler Rascoe, Feb 19 2023

A208736 Number of nonisomorphic graded posets with 0 and 1 and non-uniform Hasse graph of rank n, with exactly 2 elements of each rank level between 0 and 1.

Original entry on oeis.org

0, 0, 0, 1, 5, 22, 91, 361, 1392, 5265, 19653, 72694, 267179, 977593, 3565600, 12975457, 47142021, 171075606, 620303547, 2247803785, 8141857808, 29481675889, 106728951109, 386314552438, 1398132674955, 5059626441177, 18308871648576, 66249898660801
Offset: 0

Views

Author

David Nacin, Mar 01 2012

Keywords

Comments

Uniform used in the sense of Retakh, Serconek and Wilson. We use Stanley's definition of graded poset: all maximal chains have the same length n (which also implies all maximal elements have maximal rank.)

References

  • R. Stanley, Enumerative combinatorics. Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

Programs

  • Mathematica
    Join[{0, 0}, LinearRecurrence[{8, -21, 20, -5}, {0, 1, 5, 22}, 40]]
  • Python
    def a(n, d={0:0,1:0,2:0,3:1,4:5,5:22}):
        if n in d:
            return d[n]
        d[n]=8*a(n-1) - 21*a(n-2) + 20*a(n-3) - 5*a(n-4)
        return d[n]

Formula

a(n) = 8*a(n-1) - 21*a(n-2) + 20*a(n-3) - 5*a(n-4), a(2) = 0, a(3) = 1, a(4) = 5, a(5) = 22.
G.f.: (x^3 - 3*x^4 + 3*x^5)/(1 - 8*x + 21*x^2 - 20*x^3 + 5*x^4); (x^3 * (1 - 3*x + 3*x^2))/((1 - 3*x + x^2)*(1 - 5*x + 5*x^2)) .
a(n) = A081567(n-2) - A001519(n-1).

A208737 Number of nonisomorphic graded posets with 0 and 1 and non-uniform Hasse graph of rank n, with no 3-element antichain.

Original entry on oeis.org

0, 0, 0, 1, 7, 37, 175, 778, 3325, 13837, 56524, 227866, 909832, 3607294, 14227447, 55894252, 218937532, 855650749, 3338323915, 13007422705, 50631143323, 196928737582, 765495534433, 2974251390529, 11552064922624, 44856304154086
Offset: 0

Views

Author

David Nacin, Mar 01 2012

Keywords

Comments

Uniform used in the sense of Retakh, Serconek and Wilson. We use Stanley's definition of graded poset: all maximal chains have the same length n (which also implies all maximal elements have maximal rank.)

References

  • R. Stanley, Enumerative combinatorics. Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

Programs

  • Mathematica
    Join[{0}, LinearRecurrence[{10, -36, 57, -39, 9}, {0, 0, 1, 7, 37}, 40]]
  • Python
    def a(n, d={0:0,1:0,2:0,3:1,4:7,5:37}):
        if n in d:
            return d[n]
        d[n]=10*a(n-1) - 36*a(n-2) + 57*a(n-3) - 39*a(n-4) + 9*a(n-5)
        return d[n]

Formula

a(n) = 10*a(n-1) - 36*a(n-2) + 57*a(n-3) - 39*a(n-4) + 9*a(n-5), a(1) = 0, a(2) = 0, a(3) = 1, a(4) = 7, a(5) = 37.
G.f: (x^3 - 3*x^4 + 3*x^5)/(1 - 10*x + 36*x^2 - 57*x^3 + 39*x^4 - 9*x^5); (x^3*(1 - 3*x + 3*x^2)) / ((1 - x) (1 - 3*x) (1 - 6*x + 9*x^2 - 3*x^3)).
a(n) = A124292(n) - A124302(n).

A355387 Number of ways to choose a distinct subsequence of an integer composition of n.

Original entry on oeis.org

1, 2, 5, 14, 37, 98, 259, 682, 1791, 4697, 12303, 32196, 84199, 220087, 575067, 1502176, 3923117, 10244069, 26746171, 69825070, 182276806, 475804961, 1241965456, 3241732629, 8461261457, 22084402087, 57640875725, 150442742575, 392652788250, 1024810764496
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2022

Keywords

Comments

By "distinct" we mean equal subsequences are counted only once. For example, the pair (1,1)(1) is counted only once even though (1) is a subsequence of (1,1) in two ways. The version with multiplicity is A025192.

Examples

			The a(3) = 14 pairings of a composition with a chosen subsequence:
  (3)()     (3)(3)
  (21)()    (21)(1)   (21)(2)    (21)(21)
  (12)()    (12)(1)   (12)(2)    (12)(12)
  (111)()   (111)(1)  (111)(11)  (111)(111)
		

Crossrefs

For partitions we have A000712, composable A339006.
The homogeneous version is A011782, without containment A000302.
With multiplicity we have A025192, for partitions A070933.
The strict case is A032005.
The case of strict subsequences is A236002.
The composable case is A355384, homogeneous without containment A355388.
A075900 counts compositions of each part of a partition.
A304961 counts compositions of each part of a strict partition.
A307068 counts strict compositions of each part of a composition.
A336127 counts compositions of each part of a strict composition.

Programs

  • Mathematica
    Table[Sum[Length[Union[Subsets[y]]],{y,Join@@Permutations/@IntegerPartitions[n]}],{n,0,6}]
  • PARI
    lista(n)=my(f=sum(k=1,n,(x^k+x*O(x^n))/(1-x/(1-x)+x^k)));Vec((1-x)/((1-2*x)*(1-f))) \\ Christian Sievers, May 06 2025

Formula

G.f.: (1-x)/((1-2*x)*(1-f)) where f = Sum_{k>=1} x^k/(1-x/(1-x)+x^k) is the generating function for A331330. - Christian Sievers, May 06 2025

Extensions

a(16) and beyond from Christian Sievers, May 06 2025

A049299 a(n) = Product_{k = 0..n-1} (a(k) + a(n-1-k)), with a(0) = 1.

Original entry on oeis.org

1, 2, 9, 400, 19456921, 1101216948902114953248, 76796373204229717290826972582321984854855228022915711475735049
Offset: 0

Views

Author

Keywords

Examples

			a(3)=400 because 400=(1+9)*(2+2)*(9+1).
		

Crossrefs

Cf. A000108 (Catalan numbers) where a(0) = 1, a(n) = Sum_{k=0..n-1} a(k)*a(n-k), A000012 (constant 1) where a(0) = 1, a(n) = Product_{k=0..n-1} a(k)*a(n-k) and A025192 (2*3^(n-1)) where a(0) = 1, a(n) = Sum_{k=0..n-1} a(k)+a(n-k). - Henry Bottomley, May 16 2000

Programs

  • PARI
    a(n)={my(v=vector(n+1)); for(n=1, #v, v[n]=prod(k=1, n-1, v[k]+v[n-k])); v[#v]} \\ Andrew Howroyd, Jan 02 2020

Formula

lim_{m -> oo} log(a(m+1))/log(a(m)) exists and equals 3. - Roland Bacher, Sep 06 2004.

Extensions

Offset corrected and terms a(6) and beyond from Andrew Howroyd, Jan 02 2020

A136523 Triangle T(n,k) = A053120(n,k) + A053120(n-1,k), read by rows.

Original entry on oeis.org

1, 1, 1, -1, 1, 2, -1, -3, 2, 4, 1, -3, -8, 4, 8, 1, 5, -8, -20, 8, 16, -1, 5, 18, -20, -48, 16, 32, -1, -7, 18, 56, -48, -112, 32, 64, 1, -7, -32, 56, 160, -112, -256, 64, 128, 1, 9, -32, -120, 160, 432, -256, -576, 128, 256, -1, 9, 50, -120, -400, 432, 1120, -576, -1280, 256, 512
Offset: 0

Views

Author

Roger L. Bagula, Mar 23 2008

Keywords

Examples

			Triangle begins as:
   1;
   1,  1;
  -1,  1,   2;
  -1, -3,   2,    4;
   1, -3,  -8,    4,    8;
   1,  5,  -8,  -20,    8,   16;
  -1,  5,  18,  -20,  -48,   16,   32;
  -1, -7,  18,   56,  -48, -112,   32,   64;
   1, -7, -32,   56,  160, -112, -256,   64,   128;
   1,  9, -32, -120,  160,  432, -256, -576,   128, 256;
  -1,  9,  50, -120, -400,  432, 1120, -576, -1280, 256, 512;
		

Crossrefs

Programs

  • Magma
    function A053120(n,k)
      if ((n+k) mod 2) eq 1 then return 0;
      elif n eq 0 then return 1;
      else return (-1)^Floor((n-k)/2)*(n/(n+k))*Binomial(Floor((n+k)/2), k)*2^k;
      end if;
    end function;
    A136523:= func< n,k | A053120(n,k) + A053120(n-1,k) >;
    [A136523(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 26 2023
    
  • Mathematica
    A053120[n_, k_]:= Coefficient[ChebyshevT[n,x], x, k];
    T[n_, k_]:= T[n, k]= A053120[n,k] + A053120[n-1,k];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A053120(n,k):
        if (n+k)%2==1: return 0
        elif n==0: return 1
        else: return floor((-1)^((n-k)//2)*(n/(n+k))*binomial((n+k)//2, k)*2^k)
    def A136523(n,k): return A053120(n,k) + A053120(n-1,k)
    flatten([[A136523(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 26 2023

Formula

T(n, k) = A053120(n,k) + A053120(n-1,k).
Sum_{k=0..n} T(n, k) = A040000(n).
From G. C. Greubel, Jul 26 2023: (Start)
T(n, 0) = A057077(n).
T(n, 1) = (-1)^floor((n-1)/2) * A109613(n-1).
T(n, 2) = (-1)^floor((n-2)/2) * A008794(n-1).
T(n, 3) = (-1)^floor((n+1)/2) * A000330(n-1).
T(n, n) = A011782(n).
T(n, n-1) = A011782(n-1).
T(n, n-2) = -A001792(n-2).
T(n, n-4) = A001793(n-3).
T(n, n-6) = -A001794(n-6).
Sum_{k=0..n} (-1)^k*T(n,k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A000007(n) + [n=1].
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^floor(n/2)*A025192(floor(n/2)). (End)

Extensions

Edited by G. C. Greubel, Jul 26 2023
Previous Showing 61-70 of 84 results. Next