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.

A083329 a(0) = 1; for n > 0, a(n) = 3*2^(n-1) - 1.

Original entry on oeis.org

1, 2, 5, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 12287, 24575, 49151, 98303, 196607, 393215, 786431, 1572863, 3145727, 6291455, 12582911, 25165823, 50331647, 100663295, 201326591, 402653183, 805306367, 1610612735, 3221225471, 6442450943
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Apart from leading term (which should really be 3/2), same as A055010.
Binomial transform of A040001. Inverse binomial transform of A053156.
a(n) = A105728(n+1,2). - Reinhard Zumkeller, Apr 18 2005
Row sums of triangle A133567. - Gary W. Adamson, Sep 16 2007
Row sums of triangle A135226. - Gary W. Adamson, Nov 23 2007
a(n) = number of partitions Pi of [n+1] (in standard increasing form) such that the permutation Flatten[Pi] avoids the patterns 2-1-3 and 3-1-2. Example: a(3)=11 counts all 15 partitions of [4] except 13/24, 13/2/4 which contain a 2-1-3 and 14/23, 14/2/3 which contain a 3-1-2. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. - David Callan, Jul 22 2008
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 42, 138, 162, 168, lead to this sequence. For the central square these vectors lead to the companion sequence A003945. - Johannes W. Meijer, Aug 15 2010
The binary representation of a(n) has n+1 digits, where all digits are 1's except digit n-1. For example: a(4) = 23 = 10111 (2). - Omar E. Pol, Dec 02 2012
Row sums of triangle A209561. - Reinhard Zumkeller, Dec 26 2012
If a Stern's sequence based enumeration system of positive irreducible fractions is considered (for example, A007305/A047679, A162909/A162910, A071766/A229742, A245325/A245326, ...), and if it is organized by blocks or levels (n) with 2^n terms (n >= 0), and the fractions, term by term, are summed at each level n, then the resulting sequence of integers is a(n) + 1/2, apart from leading term (which should be 1/2). - Yosu Yurramendi, May 23 2015
For n >= 2, A083329(n) in binary representation is a string [101..1], also 10 followed with (n-1) 1's. For n >= 3, A036563(n) in binary representation is a string [1..101], also (n-2) 1's followed with 01. Thus A083329(n) is a reflection of the binary representation of A036563(n+1). Example: A083329(5) = 101111 in binary, A036563(6) = 111101 in binary. - Ctibor O. Zizka, Nov 06 2018
For n > 0, a(n) is the minimum number of turns in (n+1)-dimensional Euclidean space needed to visit all 2^(n+1) vertices of the (n+1)-cube (e.g., {0,1}^(n+1)) and return to the starting point, moving along straight-line segments between turns (turns may occur elsewhere in R^(n+1)). - Marco Ripà, Aug 14 2025

Examples

			a(0) = (3*2^0 - 2 + 0^0)/2 = 2/2 = 1 (use 0^0=1).
		

Crossrefs

Essentially the same as A055010 and A052940.
Cf. A007505 (primes).
Cf. A266550 (independence number of the n-Mycielski graph).

Programs

  • Haskell
    a083329 n = a083329_list !! n
    a083329_list = 1 : iterate ((+ 1) . (* 2)) 2
    -- Reinhard Zumkeller, Dec 26 2012, Feb 22 2012
    
  • Magma
    [1] cat [3*2^(n-1)-1: n in [1..40]]; // Vincenzo Librandi, Jan 01 2016
  • Maple
    seq(ceil((2^i+2^(i+1)-2)/2), i=0..31); # Zerinvary Lajos, Oct 02 2007
  • Mathematica
    a[1] = 2; a[n_] := 2a[n - 1] + 1; Table[ a[n], {n, 31}] (* Robert G. Wilson v, May 04 2004 *)
    Join[{1}, LinearRecurrence[{3, -2}, {2, 5}, 40]] (* Vincenzo Librandi, Jan 01 2016 *)
  • PARI
    a(n)=(3*2^n-2+0^n)/2 \\ Charles R Greathouse IV, Sep 24 2015
    

Formula

a(n) = (3*2^n - 2 + 0^n)/2.
G.f.: (1-x+x^2)/((1-x)*(1-2*x)). [corrected by Martin Griffiths, Dec 01 2009]
E.g.f.: (3*exp(2*x) - 2*exp(x) + exp(0))/2.
a(0) = 1, a(n) = sum of all previous terms + n. - Amarnath Murthy, Jun 20 2004
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2, a(0)=1, a(1)=2, a(2)=5. - Philippe Deléham, Nov 29 2013
From Bob Selcoe, Apr 25 2014: (Start)
a(n) = (...((((((1)+1)*2+1)*2+1)*2+1)*2+1)...), with n+1 1's, n >= 0.
a(n) = 2*a(n-1) + 1, n >= 2.
a(n) = 2^n + 2^(n-1) - 1, n >= 2. (End)
a(n) = A086893(n) + A061547(n+1), n > 0. - Yosu Yurramendi, Jan 16 2017

A288638 Number A(n,k) of n-digit biquanimous strings using digits {0,1,...,k}; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 10, 8, 1, 1, 1, 5, 19, 33, 16, 1, 1, 1, 6, 31, 92, 106, 32, 1, 1, 1, 7, 46, 201, 421, 333, 64, 1, 1, 1, 8, 64, 376, 1206, 1830, 1030, 128, 1, 1, 1, 9, 85, 633, 2841, 6751, 7687, 3153, 256, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 12 2017

Keywords

Comments

A biquanimous string is a string whose digits can be split into two groups with equal sums.

Examples

			A(2,2) = 3: 00, 11, 22.
A(3,2) = 10: 000, 011, 022, 101, 110, 112, 121, 202, 211, 220.
A(3,3) = 19: 000, 011, 022, 033, 101, 110, 112, 121, 123, 132, 202, 211, 213, 220, 231, 303, 312, 321, 330.
A(4,1) = 8: 0000, 0011, 0101, 0110, 1001, 1010, 1100, 1111.
Square array A(n,k) begins:
  1,  1,    1,    1,     1,      1,      1,      1, ...
  1,  1,    1,    1,     1,      1,      1,      1, ...
  1,  2,    3,    4,     5,      6,      7,      8, ...
  1,  4,   10,   19,    31,     46,     64,     85, ...
  1,  8,   33,   92,   201,    376,    633,    988, ...
  1, 16,  106,  421,  1206,   2841,   5801,  10696, ...
  1, 32,  333, 1830,  6751,  19718,  48245, 104676, ...
  1, 64, 1030, 7687, 36051, 128535, 372345, 939863, ...
		

Crossrefs

Rows n=0+1,2-3 give: A000012, A000027(k+1), A005448(k+1).
Main diagonal gives A288693.

Programs

  • Maple
    b:= proc(n, k, s) option remember;
          `if`(n=0, `if`(s={}, 0, 1), add(b(n-1, k, select(y->
           y<=(n-1)*k, map(x-> [abs(x-i), x+i][], s))), i=0..k))
        end:
    A:= (n, k)-> b(n, k, {0}):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, k_, s_] := b[n, k, s] = If[n == 0, If[s == {}, 0, 1], Sum[b[n-1, k, Select[Flatten[{Abs[#-i], #+i}& /@ s], # <= (n-1)*k&]], {i, 0, k}]];
    A[n_, k_] := b[n, k, {0}];
    Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 08 2018, from Maple *)

A294201 Irregular triangle read by rows: T(n,k) is the number of k-partitions of {1..3n} that are invariant under a permutation consisting of n 3-cycles (1 <= k <= 3n).

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 0, 1, 1, 3, 10, 12, 3, 9, 3, 0, 1, 1, 7, 33, 59, 30, 67, 42, 6, 18, 4, 0, 1, 1, 15, 106, 270, 216, 465, 420, 120, 235, 100, 10, 30, 5, 0, 1, 1, 31, 333, 1187, 1365, 3112, 3675, 1596, 2700, 1655, 330, 605, 195, 15, 45, 6, 0, 1
Offset: 1

Views

Author

Andrew Howroyd, Oct 24 2017

Keywords

Comments

T(n,k) = coefficient of x^k for A(3,n)(x) in Gilbert and Riordan's article. - Robert A. Russell, Jun 13 2018

Examples

			Triangle begins:
  1,  0,   1;
  1,  1,   3,   2,   0,   1;
  1,  3,  10,  12,   3,   9,   3,   0,   1;
  1,  7,  33,  59,  30,  67,  42,   6,  18,   4,  0,  1;
  1, 15, 106, 270, 216, 465, 420, 120, 235, 100, 10, 30, 5, 0, 1;
  ...
Case n=2: Without loss of generality the permutation of two 3-cycles can be taken as (123)(456). The second row is [1, 1, 3, 2, 0, 1] because the set partitions that are invariant under this permutation in increasing order of number of parts are {{1, 2, 3, 4, 5, 6}}; {{1, 2, 3}, {4, 5, 6}}; {{1, 4}, {2, 5}, {3, 6}}, {{1, 5}, {2, 6}, {3, 4}}, {{1, 6}, {2, 4}, {3, 5}}; {{1, 2, 3}, {4}, {5}, {6}}, {{1}, {2}, {3}, {4, 5, 6}}, {{1}, {2}, {3}, {4}, {5}, {6}}.
		

Crossrefs

Row sums are A002874.
Column k=3 gives A053156.
Maximum row values are A294202.
Unrelated to A002875.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`([n, k]=[0, 0], 1, 0)+
         `if`(n>0 and k>0, k*T(n-1, k)+T(n-1, k-1)+T(n-1, k-3), 0)
        end:
    seq(seq(T(n, k), k=1..3*n), n=1..8);  # Alois P. Heinz, Sep 20 2019
  • Mathematica
    T[n_, k_] := T[n,k] = If[n>0 && k>0, k T[n-1,k] + T[n-1,k-1] + T[n-1,k-3], Boole[n==0 && k==0]] (* modification of Gilbert & Riordan recursion *)
    Table[T[n, k], {n,1,10}, {k,1,3n}] // Flatten (* Robert A. Russell, Jun 13 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k)={my(ci=PermCycleIndex(CylinderPerms(3,n)[2])); StructsByCycleIndex(ci,k) - if(k>1,StructsByCycleIndex(ci,k-1))}
    for (n=1, 6, for(k=1, 3*n, print1(T(n,k), ", ")); print);
    
  • PARI
    G(n)={Vec(-1+serlaplace(exp(sumdiv(3, d, y^d*(exp(d*x + O(x*x^n))-1)/d))))}
    { my(A=G(6)); for(n=1, #A, print(Vecrev(A[n]/y))) } \\ Andrew Howroyd, Sep 20 2019

Formula

T(n,k) = [n==0 & k==0] + [n>0 & k>0] * (k*T(n-1,k) + T(n-1,k-1) + T(n-1,k-3)). - Robert A. Russell, Jun 13 2018
T(n,k) = n!*[x^n*y^k] exp(Sum_{d|3} y^d*(exp(d*x) - 1)/d). - Andrew Howroyd, Sep 20 2019

A052390 Number of 4-element intersecting families (with not necessarily distinct sets) whose union is an n-element set.

Original entry on oeis.org

1, 7, 71, 956, 15116, 254397, 4318511, 72331966, 1188180386, 19152566087, 303768582701, 4755204310776, 73675434833456, 1132450098258577, 17301032324486891, 263098797953058386, 3987051131522775326
Offset: 1

Views

Author

Vladeta Jovovic, Goran Kilibarda, Mar 11 2000

Keywords

Crossrefs

Programs

  • Magma
    [(15^n - 6*11^n + 12*9^n - 8^n - 10*7^n + 15*6^n - 24*5^n + 19*4^n + 5*3^n - 11*2^n + 6)/24: n in [1..50]]; // G. C. Greubel, Oct 08 2017
  • Mathematica
    Table[(15^n - 6*11^n + 12*9^n - 8^n - 10*7^n + 15*6^n - 24*5^n + 19*4^n + 5*3^n - 11*2^n + 6)/4!, {n, 1, 50}] (* G. C. Greubel, Oct 08 2017 *)
  • PARI
    for(n=1,50, print1((15^n - 6*11^n + 12*9^n - 8^n - 10*7^n + 15*6^n - 24*5^n + 19*4^n + 5*3^n - 11*2^n + 6)/4!, ", ")) \\ G. C. Greubel, Oct 08 2017
    

Formula

a(n) = (15^n - 6*11^n + 12*9^n - 8^n - 10*7^n + 15*6^n - 24*5^n + 19*4^n + 5*3^n - 11*2^n + 6)/4!.
G.f.: -x * (14968800*x^10 - 34931250*x^9 + 36757686*x^8 - 21625925*x^7 + 7809481*x^6 - 1821016*x^5 + 279853*x^4 - 28145*x^3 + 1779*x^2 - 64*x + 1) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(6*x-1)*(7*x-1)*(8*x-1)*(9*x-1)*(11*x-1)*(15*x-1)). - Colin Barker, Jul 30 2012

A083330 a(n) = (3*4^n - 2*3^n + 2^n)/2.

Original entry on oeis.org

1, 4, 17, 73, 311, 1309, 5447, 22453, 91871, 373789, 1514327, 6115333, 24636431, 99073069, 397878407, 1596280213, 6399436991, 25640729149, 102691925687, 411154861093, 1645781181551, 6586610462029, 26356900104167
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Binomial transform of A053156.

Crossrefs

Cf. A083331.

Programs

  • Mathematica
    Table[(3 4^n-2 3^n+2^n)/2,{n,0,30}]  (* Harvey P. Dale, Mar 14 2011 *)

Formula

a(n) = (3*4^n - 2*3^n + 2^n)/2.
G.f.: (1-5x+7x^2)/(2(1-2x)(1-3x)(1-4x)).
E.g.f.: (3*exp(4x) - 2*exp(3x) + exp(2x))/2.
Showing 1-5 of 5 results.