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 41-50 of 123 results. Next

A278317 Number of neighbors of each new term in a right triangle read by rows.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 18 2016

Keywords

Comments

To evaluate T(n,k) consider only the neighbors of T(n,k) that are present in the triangle when T(n,k) should be a new term in the triangle.
Apart from the first column and the first two diagonals the rest of the elements are 4's.
For the same idea but for an isosceles triangle see A275015; for a square array see A278290, for a square spiral see A278354; and for a hexagonal spiral see A047931.

Examples

			Triangle begins:
0;
1, 2;
2, 3, 2;
2, 4, 3, 2;
2, 4, 4, 3, 2;
2, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 4, 4, 3, 2;
...
		

Crossrefs

Apart from the initial zero, row sums give A004767.
Column 1 is A130130.
Columns > 1 give the terms greater than 1 of A158411.
Right border gives 0 together with A007395, also twice A057427.
Second right border gives A122553.

A341741 Square array T(n,k), n >= 1, k >= 1, read by antidiagonals downwards: number of perfect matchings in the graph C_{2n} x C_k.

Original entry on oeis.org

2, 8, 2, 14, 36, 2, 36, 50, 200, 2, 82, 272, 224, 1156, 2, 200, 722, 3108, 1058, 6728, 2, 478, 3108, 9922, 39952, 5054, 39204, 2, 1156, 10082, 90176, 155682, 537636, 24200, 228488, 2, 2786, 39952, 401998, 3113860, 2540032, 7379216, 115934, 1331716, 2
Offset: 1

Views

Author

Seiichi Manyama, Feb 18 2021

Keywords

Comments

Dimer tilings of 2n x k toroidal grid.

Examples

			Square array begins:
  2,     8,    14,      36,       82,        200, ...
  2,    36,    50,     272,      722,       3108, ...
  2,   200,   224,    3108,     9922,      90176, ...
  2,  1156,  1058,   39952,   155682,    3113860, ...
  2,  6728,  5054,  537636,  2540032,  114557000, ...
  2, 39204, 24200, 7379216, 41934482, 4357599552, ...
		

Crossrefs

Columns 1..12 give A007395, A162484(2*n), A231087, A220864(2*n), A231485, A232804(2*n), A230033, A253678(2*n), A281583, A281679(2*n), A308761, A309018(2*n).
T(n,2*n) gives A335586.

Formula

T(n,k) = A341533(n,k)/2 + A341738(n,k) + 2 * ((k+1) mod 2) * A341739(n,ceiling(k/2)).
T(n, 2k) = T(k, 2n).
If k is odd, T(n,k) = A341533(n,k) = 2*A341738(n,k).

Extensions

New name from Andrey Zabolotskiy, Dec 26 2021

A168361 Period 2: repeat 2, -1.

Original entry on oeis.org

2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1
Offset: 1

Views

Author

Klaus Brockhaus, Nov 23 2009

Keywords

Comments

Interleaving of A007395 and -A000012.
Binomial transform of 2 followed by a signed version of A007283; also binomial transform of a signed version of A042950.
Second binomial transform of a signed version of A007051 without initial term 1.
Inverse binomial transform of 2 followed by A000079.
A028242 without first two terms gives partial sums.

Crossrefs

Cf. A168330 (repeat 3, -2), A007395 (all 2's sequence), A000012 (all 1's sequence), (A007283 3*2^n), A042950, A007051 ((3^n+1)/2), A000079 (powers of 2), A028242 (follow n+1 by n).

Programs

  • Magma
    &cat[ [2, -1]: n in [1..42] ];
    [ n eq 1 select 2 else -Self(n-1)+1: n in [1..84] ];
    
  • Magma
    &cat[[2,-1]^^40]; // Vincenzo Librandi, Jul 20 2016
  • Mathematica
    PadRight[{},120,{2,-1}] (* Harvey P. Dale, Jan 04 2015 *)
    Table[(1 - 3 (-1)^n)/2, {n, 120}] (* or *)
    Rest@ CoefficientList[Series[x (2 - x)/((1 - x) (1 + x)), {x, 0, 120}], x] (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    a(n)=2-n%2*3 \\ Charles R Greathouse IV, Jul 13 2016
    

Formula

a(n) = (1 - 3*(-1)^n)/2.
a(n) = -a(n-1) + 1 for n > 1; a(1) = 2.
a(n) = a(n-2) for n > 2; a(1) = 2, a(2) = -1.
a(n+1) - a(n) = 3*(-1)^n.
G.f.: x*(2 - x)/((1-x)*(1+x)).
E.g.f.: (1/2)*(-1 + exp(x))*(3 + exp(x))*exp(-x). - G. C. Greubel, Jul 19 2016

Extensions

G.f. adapted to the offset by Bruno Berselli, Apr 01 2011

A300480 Rectangular array read by antidiagonals: a(m,n) = 2 * Integral_{t>=0} T_n((t+m)/2)*exp(-t)*dt, m>=0, n>=0, where T_n(x) is n-th Chebyshev polynomial of first kind.

Original entry on oeis.org

2, 2, 1, 2, 2, 0, 2, 3, 3, 3, 2, 4, 8, 10, 18, 2, 5, 15, 29, 47, 95, 2, 6, 24, 66, 130, 256, 592, 2, 7, 35, 127, 327, 697, 1610, 4277, 2, 8, 48, 218, 722, 1838, 4376, 11628, 35010, 2, 9, 63, 345, 1423, 4459, 11770, 31607, 95167, 320589, 2, 10, 80, 514, 2562, 9820, 30248, 85634, 258690
Offset: 0

Views

Author

Max Alekseyev, Mar 06 2018

Keywords

Comments

a(m,n) is a polynomial in m of degree n.
For any integers m>=0, n>=0, 2 * Integral_{t=-m..m} T_n(t/2)*exp(-t)*dt = 4 * Integral_{z=-m/2..m/2} T_n(z)*exp(-2*z)*dz = A300481(m,n)*exp(m) - a(m,n)*exp(-m).

Examples

			Array starts with:
m=0: 2,  1,   0,    3,    18,     95,     592, ...
m=1: 2,  2,   3,   10,    47,    256,    1610, ...
m=2: 2,  3,   8,   29,   130,    697,    4376, ...
m=3: 2,  4,  15,   66,   327,   1838,   11770, ...
m=4: 2,  5,  24,  127,   722,   4459,   30248, ...
...
		

Crossrefs

Values for m<=0 are given in A300481.
Rows: A300482 (m=0), A300483 (m=1), A300484 (m=2), A300485 (m=-1), A102761 (m=-2).
Columns: A007395 (n=0), A000027 (n=1), A005563 (n=2), A084380 (n=3).
Cf. A000179 (almost row m=-2), A127672, A156995.

Programs

  • PARI
    { A300480(m,n) = if(n==0,return(2)); subst( serlaplace( 2*polchebyshev(n,1,(x+m)/2)), x, 1); }

Formula

a(m,n) = Sum_{i=0..n} A127672(n,i) * i! * Sum_{j=0..i} m^j/j!.
a(m,n) = Sum_{i=0..n} A127672(n,i) * A080955(m,i) = Sum_{i=0..n} A127672(n,i) * A089258(i,m).

A300481 Rectangular array read by antidiagonals: a(m,n) = 2 * Integral_{t>=0} T_n((t-m)/2)*exp(-t)*dt, m>=0, n>=0, where T_n(x) is n-th Chebyshev polynomial of first kind.

Original entry on oeis.org

2, 2, 1, 2, 0, 0, 2, -1, -1, 3, 2, -2, 0, 2, 18, 2, -3, 3, 1, 7, 95, 2, -4, 8, -6, 2, 34, 592, 2, -5, 15, -25, 15, 13, 218, 4277, 2, -6, 24, -62, 82, -28, 80, 1574, 35010, 2, -7, 35, -123, 263, -269, 106, 579, 12879, 320589
Offset: 0

Views

Author

Max Alekseyev, Mar 06 2018

Keywords

Comments

Although negative values of m are not present here or in A300480, the two arrays are connected with the formula: a(m,n) = A300480(-m,n). Thus, they essentially represent two "halves" of the same array indexed by integers m.
a(m,n) is a polynomial in m of degree n.
For any integers m>=0, n>=0, 2 * Integral_{t=-m..m} T_n(t/2)*exp(-t)*dt = 4 * Integral_{z=-m/2..m/2} T_n(z)*exp(-2*z)*dz = a(m,n)*exp(m) - A300480(m,n)*exp(-m).

Examples

			Array starts with:
m=0: 2,  1,  0,    3,   18,     95,    592, ...
m=1: 2,  0, -1,    2,    7,     34,    218, ...
m=2: 2, -1,  0,    1,    2,     13,     80, ...
m=3: 2, -2,  3,   -6,   15,    -28,    106, ...
m=4: 2, -3,  8,  -25,   82,   -269,    920, ...
...
		

Crossrefs

Values for m<=0 are given in A300480.
Rows: A300482 (m=0), A300485 (m=1), A102761 (m=2), A300483 (m=-1), A300484 (m=-2).
Columns (up to signs and offset): A007395 (n=0), A000027 (n=1), A005563 (n=2).
Cf. A000179 (almost row m=2), A127672, A156995.

Programs

Formula

a(m,n) = A300480(-m,n) = Sum_{i=0..n} A127672(n,i) * i! * Sum_{j=0..i} (-m)^j/j!.
a(m,n) = Sum_{i=0..n} A127672(n,i) * A292977(i,m).

A334622 A(n,k) is the sum of the k-th powers of the descent set statistics for permutations of [n]; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 6, 8, 1, 1, 2, 10, 24, 16, 1, 1, 2, 18, 88, 120, 32, 1, 1, 2, 34, 360, 1216, 720, 64, 1, 1, 2, 66, 1576, 14460, 24176, 5040, 128, 1, 1, 2, 130, 7224, 190216, 994680, 654424, 40320, 256, 1, 1, 2, 258, 34168, 2675100, 46479536, 109021500, 23136128, 362880, 512
Offset: 0

Views

Author

Alois P. Heinz, Sep 09 2020

Keywords

Examples

			Square array A(n,k) begins:
   1,   1,     1,      1,        1,          1,            1, ...
   1,   1,     1,      1,        1,          1,            1, ...
   2,   2,     2,      2,        2,          2,            2, ...
   4,   6,    10,     18,       34,         66,          130, ...
   8,  24,    88,    360,     1576,       7224,        34168, ...
  16, 120,  1216,  14460,   190216,    2675100,     39333016, ...
  32, 720, 24176, 994680, 46479536, 2368873800, 128235838496, ...
  ...
		

Crossrefs

Columns k=0-4 give: A011782, A000142, A060350, A291902, A291903.
Rows n=0+1, 2-3 give: A000012, A007395(k+1), A052548(k+1).
Main diagonal gives A334623.

Programs

  • Maple
    b:= proc(u, o, t) option remember; expand(`if`(u+o=0, 1,
          add(b(u-j, o+j-1, t+1)*x^floor(2^(t-1)), j=1..u)+
          add(b(u+j-1, o-j, t+1), j=1..o)))
        end:
    A:= (n, k)-> (p-> add(coeff(p, x, i)^k, i=0..degree(p)))(b(n, 0$2)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = Expand[If[u + o == 0, 1,
        Sum[b[u - j, o + j - 1, t + 1] x^Floor[2^(t - 1)], {j, 1, u}] +
        Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}]]];
    A[n_, k_] := Function[p, Sum[Coefficient[p, x, i]^k, {i, 0, Exponent[p, x]}]][b[n, 0, 0]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..ceiling(2^(n-1))-1} A060351(n,j)^k.

A357824 Total number A(n,k) of k-tuples of semi-Dyck paths from (0,0) to (n,n-2*j) for j=0..floor(n/2); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 3, 1, 1, 2, 5, 6, 3, 1, 1, 2, 9, 14, 10, 4, 1, 1, 2, 17, 36, 42, 20, 4, 1, 1, 2, 33, 98, 190, 132, 35, 5, 1, 1, 2, 65, 276, 882, 980, 429, 70, 5, 1, 1, 2, 129, 794, 4150, 7812, 5705, 1430, 126, 6, 1, 1, 2, 257, 2316, 19722, 65300, 78129, 33040, 4862, 252, 6
Offset: 0

Views

Author

Alois P. Heinz, Oct 14 2022

Keywords

Examples

			Square array A(n,k) begins:
  1,  1,   1,    1,     1,       1,        1,         1, ...
  1,  1,   1,    1,     1,       1,        1,         1, ...
  2,  2,   2,    2,     2,       2,        2,         2, ...
  2,  3,   5,    9,    17,      33,       65,       129, ...
  3,  6,  14,   36,    98,     276,      794,      2316, ...
  3, 10,  42,  190,   882,    4150,    19722,     94510, ...
  4, 20, 132,  980,  7812,   65300,   562692,   4939220, ...
  4, 35, 429, 5705, 78129, 1083425, 15105729, 211106945, ...
		

Crossrefs

Rows n=1-5 give: A000012, A007395, A000051, A001550, A074511.
Main diagonal gives A357825.

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, add(b(x-1, y+j), j=[-1, 1])))
        end:
    A:= (n, k)-> add(b(n, n-2*j)^k, j=0..n/2):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[x_, y_] := b[x, y] = If[y < 0 || y > x, 0, If[x == 0, 1, Sum[b[x - 1, y + j], {j, {-1, 1}}]]];
    A[n_, k_] := Sum[b[n, n - 2*j]^k, { j, 0, n/2}];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Oct 18 2022, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..floor(n/2)} A008315(n,j)^k.
A(n,k) = Sum_{j=0..n} A120730(n,j)^k for k>=1, A(n,0) = A008619(n).

A153643 Jacobsthal numbers A001045 incremented by 2.

Original entry on oeis.org

2, 3, 3, 5, 7, 13, 23, 45, 87, 173, 343, 685, 1367, 2733, 5463, 10925, 21847, 43693, 87383, 174765, 349527, 699053, 1398103, 2796205, 5592407, 11184813, 22369623, 44739245, 89478487, 178956973, 357913943, 715827885, 1431655767, 2863311533, 5726623063
Offset: 0

Views

Author

Paul Curtz, Dec 30 2008

Keywords

Crossrefs

Programs

  • GAP
    a:=[2,3,3];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Apr 02 2019
    
  • Magma
    I:=[2,3,3]; [n le 3 select I[n] else 2*Self(n-1) +Self(n-2) -2*Self(n-3): n in [1..40]]; // G. C. Greubel, Apr 02 2019
    
  • Mathematica
    LinearRecurrence[{1,2},{0,1}, 40] + 2 (* Harvey P. Dale, May 26 2014 *)
    LinearRecurrence[{2,1,-2},{2,3,3}, 40] (* Georg Fischer, Apr 02 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec( (2-x-5*x^2)/((1-x^2)*(1-2*x)) ) \\ G. C. Greubel, Apr 02 2019
    
  • Python
    def A153643(n): return ((1<Chai Wah Wu, Apr 18 2025
  • Sage
    ((2-x-5*x^2)/((1-x^2)*(1-2*x))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 02 2019
    

Formula

a(n) = 2 + A001045(n) = A001045(n) + A007395(n) = 1 + A128209(n).
a(n) - A010684(n) = A078008(n), first differences of A001045. - Paul Curtz, Jan 17 2009
G.f.: (2 - x - 5*x^2)/((1+x)*(1-x)*(1-2*x)). - R. J. Mathar, Jan 23 2009
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n >= 3. - Andrew Howroyd, Feb 26 2018

Extensions

Edited and extended by R. J. Mathar, Jan 23 2009

A227196 a(n) = first i >= 1 for which the Kronecker symbol K(i,n) is not +1 (i.e., is either 0 or -1), 0 if no such i exists.

Original entry on oeis.org

0, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 5, 2, 5, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 5, 2, 7, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 7, 2, 5, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Jul 06 2013

Keywords

Comments

a(1) = 0, because K(i,1) is 1 for all i. After that, A112046 interleaved with A007395.
All terms beyond a(1) = 0 are prime numbers. Heuristically a(n) is 2 3/4 of the time, 3 1/6 of the time, 5 1/20 of the time, 7 2/105 of the time, etc. The average value is 2.5738775742512.... - Charles R Greathouse IV, Jan 30 2018

Crossrefs

Bisections: A112046 (for odd terms from 3 onward), A007395 (all even terms).

Programs

  • PARI
    a(n) = for(k=1,n,if(kronecker(k,n)<1, return(k)))
    for(n=1,120, print1(a(n),", "))

Formula

A227195(n) = a(n)-1 for all n>=2.
a(2n+1) = A112046(n) for all n>0. - A.H.M. Smeets Jan 29 2018

A073211 Sum of two powers of 11.

Original entry on oeis.org

2, 12, 22, 122, 132, 242, 1332, 1342, 1452, 2662, 14642, 14652, 14762, 15972, 29282, 161052, 161062, 161172, 162382, 175692, 322102, 1771562, 1771572, 1771682, 1772892, 1786202, 1932612, 3543122, 19487172, 19487182, 19487292, 19488502, 19501812, 19648222, 21258732, 38974342
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2002

Keywords

Examples

			T(2,0) = 11^2 + 11^0 = 122.
Table T(n,m) begins:
      2;
     12,    22;
    122,   132,   242;
   1332,  1342,  1452,  2662;
  14642, 14652, 14762, 15972, 29282;
  ...
		

Crossrefs

Cf. A001020 (powers of 11).
Equals twice A073219.
Sums of two powers of n: A073423 (0), A007395 (1), A173786 (2), A055235 (3), A055236 (4), A055237 (5), A055257 (6), A055258 (7), A055259 (8), A055260 (9), A052216 (10), A194887 (12), A072390 (13), A055261 (16), A073213 (17), A073214 (19), A073215 (23).

Programs

  • Mathematica
    t = 11^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
  • Python
    from math import isqrt
    def A073211(n): return 11**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+11**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

T(n,m) = 11^n + 11^m, n = 0, 1, 2, 3, ..., m = 0, 1, 2, 3, ... n.
Bivariate g.f.: (2 - 12*x)/((1 - x)*(1 - 11*x)*(1 - 11*x*y)). - J. Douglas Morrison, Jul 26 2021
Previous Showing 41-50 of 123 results. Next