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 101-110 of 142 results. Next

A133087 A133080 * A007318.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 2, 5, 4, 1, 1, 4, 6, 4, 1, 2, 9, 16, 14, 6, 1, 1, 6, 15, 20, 15, 6, 1, 2, 13, 36, 55, 50, 27, 8, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 2, 17, 64, 140, 196, 182, 112, 44, 10, 1
Offset: 0

Views

Author

Gary W. Adamson, Sep 08 2007

Keywords

Comments

Row sums = A084221: (1, 3, 4, 12, 16, 48, 64, 192, ...).
Subtriangle of (0, 2, -3/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 03 2012

Examples

			First few rows of the triangle:
  1;
  2,  1;
  1,  2,  1;
  2,  5,  4,  1;
  1,  4,  6,  4,  1;
  2,  9, 16, 14,  6,  1;
  1,  6, 15, 20, 15,  6,  1;
  2, 13, 36, 55, 50, 27,  8,  1;
  1,  8, 28, 56, 70, 56, 28,  8,  1;
  ...
Triangle (0, 2, -3/2, -1/2, 0, 0, 0, ...) DELTA (1, 0, -1, 0, 0, 0, ...) begins:
  1;
  0,  1;
  0,  2,  1;
  0,  1,  2,  1;
  0,  2,  5,  4,  1;
  0,  1,  4,  6,  4,  1;
  0,  2,  9, 16, 14,  6,  1;
  0,  1,  6, 15, 20, 15,  6,  1;
  0,  2, 13, 36, 55, 50, 27,  8,  1;
  0,  1,  8, 28, 56, 70, 56, 28,  8,  1;
  ...
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[CoefficientList[Series[(1 + 2*x + y*x)/(1 - (1 + y)^2*x^2), {x, 0, 10}, {y, 0, 10}], x], y] // Flatten (* G. C. Greubel, Oct 21 2017 *)

Formula

A133080 * A007318 as infinite lower triangular matrices.
G.f.: (1+2*x+y*x)/(1-(1+y)^2*x^2). - Philippe Deléham, Mar 03 2012
T(n,k) = T(n-2,k) + 2*T(n-2,k-1) + T(n-2,k-1), T(0,0) = 1, T(1,0) = 2, T(1,1) = 1. - Philippe Deléham, Mar 03 2012
Sum_{k=0..n} T(n,k)*x^k = A059841(n), A019590(n+1), A000034(n), A084221(n), A133125(n) for x = -2, -1, 0, 1, 2 respectively. - Philippe Deléham, Mar 03 2012

A178452 Partial sums of floor(2^n/5).

Original entry on oeis.org

0, 0, 1, 4, 10, 22, 47, 98, 200, 404, 813, 1632, 3270, 6546, 13099, 26206, 52420, 104848, 209705, 419420, 838850, 1677710, 3355431, 6710874, 13421760, 26843532, 53687077, 107374168, 214748350, 429496714, 858993443, 1717986902
Offset: 1

Views

Author

Mircea Merca, Dec 22 2010

Keywords

Comments

Partial sums of A077854(n-3).

Examples

			a(5) = 0 + 0 + 1 + 3 + 6 = 10.
		

Crossrefs

Cf. A077854.

Programs

  • Magma
    [Floor((4*2^n-5*n-3)/10): n in [1..40]]; // Vincenzo Librandi, Jun 23 2011
  • Maple
    seq(round((4*2^n-5*n-4)/10), n=1..50)
  • Mathematica
    CoefficientList[Series[x^2 / ((1 - 2 x) (1 + x^2) (1 - x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
    Accumulate[Floor[2^Range[40]/5]] (* or *) LinearRecurrence[{4,-6,6,-5,2},{0,0,1,4,10},40] (* Harvey P. Dale, Oct 09 2018 *)

Formula

a(n) = round((4*2^n - 5*n - 5)/10).
a(n) = floor((4*2^n - 5*n - 3)/10).
a(n) = ceiling((4*2^n - 5*n - 7)/10).
a(n) = round((4*2^n - 5*n - 4)/10).
a(n) = a(n-4) + 3*2^(n-3) - 2, n > 4.
From Bruno Berselli, Jan 18 2011: (Start)
G.f.: x^3/((1-2*x)*(1+x^2)*(1-x)^2).
a(n) = (4*2^n - 5*n - 5 + A057077(n)*A000034(n))/10.
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-4) - 3*a(n-5) + 2*a(n-6) for n > 6. (End)

A182001 Riordan array ((2*x+1)/(1-x-x^2), x/(1-x-x^2)).

Original entry on oeis.org

1, 3, 1, 4, 4, 1, 7, 9, 5, 1, 11, 20, 15, 6, 1, 18, 40, 40, 22, 7, 1, 29, 78, 95, 68, 30, 8, 1, 47, 147, 213, 185, 105, 39, 9, 1, 76, 272, 455, 466, 320, 152, 49, 10, 1, 123, 495, 940, 1106, 891, 511, 210, 60, 11, 1, 199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1
Offset: 0

Views

Author

Philippe Deléham, Apr 05 2012

Keywords

Comments

Subtriangle of the triangle given by (0, 3, -5/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -2/3, 2/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Antidiagonal sums are A001045(n+2).

Examples

			Triangle begins :
    1;
    3,   1;
    4,   4,    1;
    7,   9,    5,    1;
   11,  20,   15,    6,    1;
   18,  40,   40,   22,    7,    1;
   29,  78,   95,   68,   30,    8,   1;
   47, 147,  213,  185,  105,   39,   9,   1;
   76, 272,  455,  466,  320,  152,  49,  10, 1;
  123, 495,  940, 1106,  891,  511, 210,  60, 11,  1;
  199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1;
(0, 3, -5/3, -1/3, 0, 0, ...) DELTA (1, 0, -2/3, 2/3, 0, 0, ...) begins:
  1;
  0,  1;
  0,  3,  1;
  0,  4,  4,  1;
  0,  7,  9,  5,  1;
  0, 11, 20, 15,  6, 1;
  0, 18, 40, 40, 22, 7, 1;
		

Crossrefs

Cf. Columns : A000032, A023607, A152881

Programs

  • Magma
    function T(n,k)
      if k lt 0 or k gt n then return 0;
      elif k eq n then return 1;
      elif k eq 0 then return Lucas(n+1);
      else return T(n-1,k) + T(n-1,k-1) + T(n-2,k);
      end if; return T; end function;
    [T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
  • Maple
    with(combinat);
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0
        elif k=n then 1
        elif k=0 then fibonacci(n+2) + fibonacci(n)
        else T(n-1,k) + T(n-1,k-1) + T(n-2,k)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 18 2020
  • Mathematica
    With[{m = 10}, CoefficientList[CoefficientList[Series[(1+2*x)/(1-x-y*x-x^2), {x, 0, m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 18 2020 *)
    T[n_, k_]:= T[n, k]= If[k<0||k>n, 0, If[k==n, 1, If[k==0, LucasL[n+1], T[n-1, k] + T[n-1, k-1] + T[n-2, k] ]]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2020 *)

Formula

G.f.: (1+2*x)/(1-x-y*x-x^2).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k), T(0,0) = T(1,1) = 1, T(1,0) = 3, T(n,k) = 0 if k<0 or if k>n.
Sum_{k=0..nn} T(n,k)*x^k = A000034(n), A000032(n+1), A048654(n), A108300(n), A048875(n) for x = -1, 0, 1, 2, 3 respectively.

Extensions

a(29) corrected by and a(55)-a(65) from Georg Fischer, Feb 18 2020

A201208 One 1, two 2's, three 1's, four 2's, five 1's, ...

Original entry on oeis.org

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

Views

Author

Paul Curtz, Nov 28 2011

Keywords

Examples

			May be written as a triangle:
  1
  2 2
  1 1 1
  2 2 2 2
  1 1 1 1 1
  2 2 2 2 2 2
  1 1 1 1 1 1 1
Row sums are A022998(n+1).
		

Crossrefs

Programs

  • Haskell
    a201208 n = a201208_list !! (n-1)
    a201208_list = concat $ zipWith ($) (map replicate [1..]) a000034_list
    -- Reinhard Zumkeller, Dec 02 2011
  • Mathematica
    ReplaceAll[ColumnForm[Table[Mod[k, 2], {k, 12}, {n, k}], Center], 0 -> 2] (* Alonso del Arte, Nov 28 2011 *)

Formula

a(n) = A057212(n) + 1. - T. D. Noe, Nov 28 2011

Extensions

Edited by N. J. A. Sloane, Dec 02 2011

A207974 Triangle related to A152198.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 2, 2, 1, 1, 5, 2, 4, 1, 1, 1, 6, 3, 6, 3, 2, 1, 1, 7, 3, 9, 3, 5, 1, 1, 1, 8, 4, 12, 6, 8, 4, 2, 1, 1, 9, 4, 16, 6, 14, 4, 6, 1, 1, 1, 10, 5, 20, 10, 20, 10, 10, 5, 2, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 22 2012

Keywords

Comments

Row sums are A027383(n).
Diagonal sums are alternately A014739(n) and A001911(n+1).
The matrix inverse starts
1;
-1,1;
1,-2,1;
1,-1,-1,1;
-1,2,0,-2,1;
-1,1,2,-2,-1,1;
1,-2,-1,4,-1,-2,1;
1,-1,-3,3,3,-3,-1,1;
-1,2,2,-6,0,6,-2,-2,1;
-1,1,4,-4,-6,6,4,-4,-1,1;
1,-2,-3,8,2,-12,2,8,-3,-2,1;
apparently related to A158854. - R. J. Mathar, Apr 08 2013
From Gheorghe Coserea, Jun 11 2016: (Start)
T(n,k) is the number of terms of the sequence A057890 in the interval [2^n,2^(n+1)-1] having binary weight k+1.
T(n,k) = A007318(n,k) (mod 2) and the number of odd terms in row n of the triangle is 2^A000120(n).
(End)

Examples

			Triangle begins :
n\k  [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
[0]  1;
[1]  1,  1;
[2]  1,  2,  1;
[3]  1,  3,  1,  1;
[4]  1,  4,  2,  2,  1;
[5]  1,  5,  2,  4,  1,  1;
[6]  1,  6,  3,  6,  3,  2,  1;
[7]  1,  7,  3,  9,  3,  5,  1,  1;
[8]  1,  8,  4,  12, 6,  8,  4,  2,  1;
[9]  1,  9,  4,  16, 6,  14, 4,  6,  1,  1;
[10] ...
		

Crossrefs

Cf. Diagonals : A000012, A000034, A052938, A097362
Related to thickness: A000120, A027383, A057890, A274036.

Programs

  • Maple
    A207974 := proc(n,k)
        if k = 0 then
            1;
        elif k < 0 or k > n then
            0 ;
        else
            procname(n-1,k-1)-(-1)^k*procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Apr 08 2013
  • PARI
    seq(N) = {
      my(t = vector(N+1, n, vector(n, k, k==1 || k == n)));
      for(n = 2, N+1, for (k = 2, n-1,
          t[n][k] = t[n-1][k-1] + (-1)^(k%2)*t[n-1][k]));
      return(t);
    };
    concat(seq(10))  \\ Gheorghe Coserea, Jun 09 2016
    
  • PARI
    P(n) = ((2+x+(n%2)*x^2) * (1+x^2)^(n\2) - 2)/x;
    concat(vector(11, n, Vecrev(P(n-1)))) \\ Gheorghe Coserea, Mar 14 2017

Formula

T(n,k) = T(n-1,k-1) - (-1)^k*T(n-1,k), k>0 ; T(n,0) = 1.
T(2n,2k) = T(2n+1,2k) = binomial(n,k) = A007318(n,k).
T(2n+1,2k+1) = A110813(n,k).
T(2n+2,2k+1) = 2*A135278(n,k).
T(n,2k) + T(n,2k+1) = A152201(n,k).
T(n,2k) = A152198(n,k).
T(n+1,2k+1) = A152201(n,k).
T(n,k) = T(n-2,k-2) + T(n-2,k).
T(2n,n) = A128014(n+1).
T(n,k) = card {p, 2^n <= A057890(p) <= 2^(n+1)-1 and A000120(A057890(p)) = k+1}. - Gheorghe Coserea, Jun 09 2016
P_n(x) = Sum_{k=0..n} T(n,k)*x^k = ((2+x+(n mod 2)*x^2)*(1+x^2)^(n\2) - 2)/x. - Gheorghe Coserea, Mar 14 2017

A215580 Partial sums of A215602.

Original entry on oeis.org

2, 5, 17, 45, 122, 320, 842, 2205, 5777, 15125, 39602, 103680, 271442, 710645, 1860497, 4870845, 12752042, 33385280, 87403802, 228826125, 599074577, 1568397605, 4106118242, 10749957120, 28143753122, 73681302245, 192900153617, 505019158605, 1322157322202, 3461452808000, 9062201101802, 23725150497405, 62113250390417, 162614600673845
Offset: 0

Views

Author

J. M. Bergot, Aug 16 2012

Keywords

Comments

Dividing the terms of this sequence by Fibonacci or Lucas numbers yields symmetric sets of remainders of determinable lengths. For F(n) beginning at n=3: (a) F(2n) will have a set of remainders of length 2n in which the sum of the remainders is 3*(F(2n)-n). Example for F(2*6)=144: the set of remainders is {2,5,17,45,122,32,122,45,17,5,2,0} with 2*6=12 terms and a sum of 3*(144-6)=414. (b) For F(2n+1) there will be 2*(2n+1) terms having a sum equal to (2n+1)*(F(2n+1)-3). Example for F(2*4+1)=34: the remainders are {2,5,7,11,20,14,26,29,31,29,26,14,20,11,17,5,2,0} with 2*9 terms and a sum of 9*(34-1)=279.
Using Lucas numbers starting at n=2: (a) L(2n) has 4n remainders with sum (2n+1)*(L(2n)-6*n). Example for n=4 giving L(2*4)=47, has remainders {2,5,17,45,28,38,43,43,43,38,28,45,17,5,2,0} with a sum of (8+1)*(47)-6*4=399. (B) For L(2n+1) the length of the period is 2*(2n+1) and the sum of the remainders is 4*L(2n+1)-3*(2n+1). Example for n=3 for L(2*3+1)=29 has remainders {2,5,17,16,6,1,11,6,16,17,5,2,0} with length 2*7 and sum of terms 4*29-3*7=95.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, 0, -3, 1}, {2, 5, 17, 45}, 35] (* Paolo Xausa, Feb 22 2024 *)

Formula

a(2n) = L(4*n)-2, a(2*n+1) = L(4*n+2)-1, where L() are the Lucas numbers A000032.
G.f. ( -2+x-2*x^2 ) / ( (x-1)*(1+x)*(x^2-3*x+1) ). - R. J. Mathar, Aug 21 2012
a(n) = A005248(n+1)-A000034(n). - R. J. Mathar, Aug 21 2012

Extensions

Edited by N. J. A. Sloane, Aug 17 2012

A269266 a(n) = 2^n mod 31.

Original entry on oeis.org

1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1
Offset: 0

Views

Author

Vincenzo Librandi, Mar 31 2016

Keywords

References

  • Continued fraction expansion of (1651+sqrt(3236405))/2386. - Bruno Berselli, Mar 31 2016

Crossrefs

Cf. A201912 (11th row of the triangle).
Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), this sequence (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67).

Programs

  • GAP
    List([0..70],n->PowerMod(2,n,31)); # Muniru A Asiru, Jan 30 2019
  • Magma
    [Modexp(2, n, 31): n in [0..100]];
    
  • Magma
    &cat [[1,2,4,8,16]^^20] // Bruno Berselli, Mar 31 2016
    
  • Mathematica
    PowerMod[2, Range[0, 100], 31]
  • PARI
    a(n)=2^(n%5) \\ Charles R Greathouse IV, Mar 31 2016
    
  • PARI
    x='x+O('x^99); Vec((1+2*x+4*x^2+8*x^3+16*x^4)/(1-x^5)) \\ Altug Alkan, Mar 31 2016
    
  • Python
    for n in range(0,100):print(2**n%31) # Soumil Mandal, Apr 03 2016
    
  • Python
    def A269266(n): return pow(2,n,31) # Chai Wah Wu, Jan 03 2022
    
  • Sage
    [2^mod(n,5) for n in (0..100)] # Bruno Berselli, Mar 31 2016
    

Formula

G.f.: (1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4)/(1 - x^5).
a(n) = a(n-5).
a(n) = 2^(n mod 5). - Bruno Berselli, Mar 31 2016

A269837 Irregular triangle read by rows: even terms of A094728(n+1) divided by 4.

Original entry on oeis.org

1, 2, 4, 3, 6, 4, 9, 8, 5, 12, 10, 6, 16, 15, 12, 7, 20, 18, 14, 8, 25, 24, 21, 16, 9, 30, 28, 24, 18, 10, 36, 35, 32, 27, 20, 11, 42, 40, 36, 30, 22, 12, 49, 48, 45, 40, 33, 24, 13, 56, 54, 50, 44, 36, 26, 14, 64, 63, 60, 55, 48, 39, 28, 15
Offset: 0

Views

Author

Paul Curtz, Mar 06 2016

Keywords

Comments

See A264798 and A261046 for the Hydrogen atom and the Janet periodic table.
a(n) odd terms are again A264798.
Decomposition by multiplication i.e. a(n) = b(n)*c(n) by irregular triangle:
1, 1 1,
2, 1 2,
4, 3, 2, 1, 2, 3,
6, 4, = 2, 1, * 3, 4,
9, 8, 5, 3, 2, 1, 3, 4, 5,
12, 10, 6, 3, 2, 1, 4, 5, 6,
16, 15, 12, 7, 4, 3, 2, 1, 4, 5, 6, 7,
etc. etc. etc.
b(n) is duplicated A004736(n) or mirror of A122197(n+1). c(n) = A138099(n+1).
Decomposition by subtraction, a(n) = d(n) - e(n):
1, 1 0,
2, 2, 0,
4, 3, 4, 3, 0, 0,
6, 4, = 6, 5, - 0, 1,
9, 8, 5, 9, 8, 7, 0, 0, 2,
12, 10, 6, 12, 11, 10, 0, 1, 4,
16, 15, 12, 7, 16, 15, 14, 13, 0, 0, 2, 6,
20, 18, 14, 8, 20, 19, 18, 17, 0, 1, 4, 9,
etc. etc. etc.
d(n) is the natural numbers A000027 inverted by lines. e(n) will be studied (see A239873).
Sum of a(n) by diagonals: 1, 5, 13, 27, 48, ... . The third differences have the period 2: repeat 2, 1. See A002717.

Crossrefs

Programs

A281661 The least common multiple of 1 + n^2 and 1 + n^3.

Original entry on oeis.org

1, 2, 45, 140, 1105, 1638, 8029, 8600, 33345, 29930, 101101, 81252, 250705, 186830, 540765, 381488, 1052929, 712530, 1895725, 1241660, 3208401, 2046902, 5164765, 3224520, 7977025, 4890938, 11899629, 7184660, 17233105, 10268190, 24327901, 14329952, 33588225, 19586210
Offset: 0

Views

Author

R. J. Mathar, Jan 26 2017

Keywords

Comments

If d|(1 + n^2) and d|(1 + n^3), then d|((1 + n^2) - (n*(1 + n^2) - (1 + n^3))^2) = 2*n. If k|n and k|(1 + n^2), then k = 1 is only option since k|n^2 and k|(1 + n^2). So d must be 1 or 2, exactly. Obviously if n is odd, then the greatest d must be 2 since 1 + n^2 and 1 + n^3 are even. If n is even, then d must be 1 since 1 + n^2 and 1 + n^3 are odd.

Crossrefs

Programs

  • Maple
    A281661 := proc(n)
            ilcm(1+n^2,1+n^3);
    end proc:
  • Mathematica
    Table[LCM[n^2+1,n^3+1],{n,0,50}] (* Harvey P. Dale, Jun 10 2023 *)
  • PARI
    a(n) = lcm(n^2+1, n^3+1); \\ Michel Marcus, Jan 29 2017
    
  • PARI
    a(n) = (n^2 + 1)*(n^3 + 1)/(1 + n%2); \\ Altug Alkan, Jan 29 2017

Formula

a(n) = lcm(1+n^2, 1+n^3) = (1+n^2)*(1+n^3)/gcd(1+n^2, 1+n^3).
a(n) = (1+n^2)*(1+n^3)/ A000034(n) with g.f. ( 1 +2*x +39*x^2 +128*x^3 +850*x^4 +828*x^5 +2054*x^6 +832*x^7 +861*x^8 +130*x^9 +35*x^10 ) / ( (x-1)^6 *(1+x)^6 ).
A006530(a(n)) = max( A081256(n), A014442(n)). - R. J. Mathar, Jan 28 2017
a(n) = (3 + (-1)^n)*(1 + n^2 + n^3 + n^5)/4. - Colin Barker, Feb 07 2017

A289203 Number of maximum independent vertex sets in the n X n knight graph.

Original entry on oeis.org

1, 1, 2, 6, 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, 2, 1, 2, 1, 2
Offset: 1

Views

Author

Eric W. Weisstein, Jun 28 2017

Keywords

Crossrefs

Cf. A000034.

Programs

  • Mathematica
    Table[Length[With[{g = KnightTourGraph[n, n]}, FindIndependentVertexSet[g, Length /@ FindIndependentVertexSet[g], All]]], {n, 8}]
    Table[Piecewise[{{1, n == 2}, {2, n == 3}, {6, n == 4}, {2, Mod[n, 2] == 0}, {1, Mod[n, 2] == 1}}], {n, 100}]
    Table[Piecewise[{{1, n == 2}, {2, n == 3}, {6, n == 4}}, ((-1)^n + 3)/2], {n, 100}]
    CoefficientList[Series[(-1 - x - x^2 - 5 x^3 + x^4 + 4 x^5)/(-1 + x^2), {x, 0, 20}],x]
  • Python
    def A289203(n): return (1,1,2,6)[n-1] if n<5 else 2-(n&1) # Chai Wah Wu, Feb 12 2024

Formula

For n > 4, a(n) = ((-1)^n + 3)/2.
G.f.: (x*(-1 - x - x^2 - 5*x^3 + x^4 + 4*x^5))/(-1 + x^2).
Previous Showing 101-110 of 142 results. Next