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 21-30 of 43 results. Next

A047878 a(n) is the least number of knight's moves from corner (0,0) to n-th diagonal of unbounded chessboard.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Apart from initial terms, same as A008611. - Anton Chupin, Oct 24 2009

Crossrefs

Programs

  • Magma
    I:=[2, 1, 2, 3]; [0,3] cat [n le 4 select I[n] else Self(n-1) +Self(n-3) -Self(n-4): n in [1..81]]; // G. C. Greubel, Oct 22 2022
    
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{0,3,2,1,2,3},80] (* Harvey P. Dale, Sep 01 2018 *)
    Join[{0,3}, Table[(n+2 -2*ChebyshevU[2*n, 1/2])/3, {n,2,75}]] (* G. C. Greubel, Oct 22 2022 *)
  • PARI
    concat(0, Vec(x*(2*x^4-2*x^3-x^2-x+3)/((x-1)^2*(x^2+x+1)) + O(x^100))) \\ Colin Barker, May 04 2014
    
  • SageMath
    (Sage) [0,3]+[(n+2 - 2*chebyshev_U(2*n, 1/2))/3 for n in (2..75)] # G. C. Greubel, Oct 22 2022

Formula

a(n) = Min_{i=0..n} A049604(i,n-i).
a(3n) = n, a(3n+1) = n+1, a(3n+2) = n+2 for n >= 1.
From Colin Barker, May 04 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>5.
G.f.: x*(3-x-x^2-2*x^3+2*x^4) / ((1-x)^2*(1+x+x^2)). (End)
From Guenther Schrack, Nov 19 2020: (Start)
a(n) = a(n-3) + 1, for n > 4 with a(0) = 0, a(1) = 3, a(2) = 2, a(3) = 1, a(4) = 2;
a(n) = (3*n + 6 - 2*(w^(2*n)*(2 + w) + w^n*(1 - w)))/9, for n > 1 with a(0) = 0, a(1) = 3, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 2 - 2*A057078(n))/3 for n > 1;
a(n) = A194960(n-2) for n > 2;
a(n) = (2*n + 2 - A330396(n))/3 for n > 1. (End)

A204259 Matrix given by f(i,j) = 1 + [(2i+j) mod 3], by antidiagonals.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 14 2012

Keywords

Comments

This data is used to specify the height of hexagonally packed cylinders in a triangle with open boundaries. Three cylinders that touch each other define a "triple" and water can be retained between these cylinders. A257594, A258445 and A259052 give a classification for such spaces. The links below ignore the inter-cylinder space retention and only consider the water retention above solid cylinders. - Craig Knecht, Jul 16 2015

Examples

			Northwest corner:
1 2 3 1 2 3 1 2
3 1 2 3 1 2 3 1
2 3 1 2 3 1 2 3
1 2 3 1 2 3 1 2
3 1 2 3 1 2 3 1
2 3 1 2 3 1 2 3
		

Crossrefs

Cf. A204260.

Programs

  • Mathematica
    f[i_, j_] := 1 + Mod[2 i + j, 3];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 12}, {i, 1, n}]]   (* A204259 *)
    Permanent[m_] :=
      With[{a = Array[x, Length[m]]},
       Coefficient[Times @@ (m.a), Times @@ a]];
    Table[Permanent[m[n]], {n, 1, 20}]     (* A204258 *)

A287793 Eight steps forward, seven steps back.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11
Offset: 0

Views

Author

Wesley Ivan Hurt, May 31 2017

Keywords

Crossrefs

Cf. A008611 (one step back, two steps forward).
Cf. A058207 (three steps forward, two steps back).
Cf. A260644 (four steps forward, three steps back).
Cf. A271800 (five steps forward, four steps back).
Cf. A271859 (six steps forward, five steps back).
Cf. A287655 (seven steps forward, six steps back).

Programs

  • Maple
    A287793:=n->add((-1)^floor((2*i-2)/15), i=1..n): seq(A287793(n), n=0..200);
  • Mathematica
    Table[Sum[(-1)^Floor[(2 i - 2)/15], {i, n}], {n, 0, 100}]

Formula

a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/15).
a(n) = a(n-1) + a(n-15) - a(n-16) for n > 15.

A060550 a(n) is the number of distinct patterns (modulo geometric D_3-operations) with no other than strict 120-degree rotational symmetry which can be formed by an equilateral triangular arrangement of closely packed black and white cells satisfying the local matching rule of Pascal's triangle modulo 2, where n is the number of cells in each edge of the arrangement.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 2, 6, 2, 6, 12, 6, 12, 28, 12, 28, 56, 28, 56, 120, 56, 120, 240, 120, 240, 496, 240, 496, 992, 496, 992, 2016, 992, 2016, 4032, 2016, 4032, 8128, 4032, 8128, 16256, 8128, 16256, 32640, 16256, 32640, 65280, 32640
Offset: 1

Views

Author

André Barbé (Andre.Barbe(AT)esat.kuleuven.ac.be), Apr 03 2001

Keywords

Comments

The matching rule is such that any elementary top-down triangle of three neighboring cells in the arrangement contains either one or three white cells.

Crossrefs

Programs

  • PARI
    a(n) = { 2^(floor(n/3) + (n%3)%2 - 1) - 2^(floor((n + 3)/6) + (n%6==1) - 1) } \\ Harry J. Smith, Jul 07 2009

Formula

a(n) = 2^(floor(n/3) + (n mod 3) mod 2 - 1) - 2^(floor((n+3)/6) + d(n)-1), with d(n)=1 if n mod 6=1, otherwise d(n)=0.
a(n) = (A060547(n) - A060548(n))/2.
a(n) = 2^(A008611(n-1) - 1) + 2^(A008615(n+1) - 1), for n >= 1.
G.f.: x^4*(x^2 - x + 1)*(x^2 + x + 1) / ((2*x^3-1)*(2*x^6-1)). - Colin Barker, Aug 29 2013

A060552 a(n) is the number of distinct (modulo geometric D3-operations) nonsymmetric (no reflective nor rotational symmetry) patterns which can be formed by an equilateral triangular arrangement of closely packed black and white cells satisfying the local matching rule of Pascal's triangle modulo 2, where n is the number of cells in each edge of the arrangement. The matching rule is such that any elementary top-down triangle of three neighboring cells in the arrangement contains either one or three white cells.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 14, 35, 70, 154, 310, 650, 1300, 2666, 5332, 10788, 21588, 43428, 86856, 174244, 348488, 697992, 1396040, 2794120, 5588240, 11180680, 22361360, 44730896, 89462032, 178940432, 357880864, 715794960
Offset: 1

Views

Author

André Barbé (Andre.Barbe(AT)esat.kuleuven.ac.be), Apr 03 2001

Keywords

Crossrefs

Programs

  • PARI
    a(n) = { (2^(n-1)-2^(floor(n/3)+(n%3)%2-1))/3+2^(floor((n+3)/6)+(n%6==1)-1)-2^floor((n-1)/2) } \\ Harry J. Smith, Jul 07 2009

Formula

a(n) = (2^(n-1) - 2^(floor(n/3) + (n mod 3)mod 2 - 1))/3 + 2^(floor((n+3)/6) + d(n) - 1) - 2^floor((n-1)/2), with d(n)=1 if n mod 6=1 else d(n)=0.
a(n) = (A000079(n-1) - A060547(n)/2)/3 + A060548(n)/2 -A060546(n)/2.
a(n) = (A000079(n-1) - 2^(A008611(n-1) - 1))/3 + 2^(A008615(n+1) - 1) - 2^(A008619(n-1) - 1), n >= 1.
From R. J. Mathar, Aug 03 2009: (Start)
a(n) = 2*a(n-1) + 2*a(n-2) - 2*a(n-3) - 4*a(n-4) - 4*a(n-5) + 10*a(n-6) - 4*a(n-7) - 4*a(n-8) + 4*a(n-9) + 8*a(n-10) + 8*a(n-11) - 16*a(n-12).
G.f.: -x^4*(-1 - x^2 - x^4 + 2*x^3 + 2*x^5 + 2*x^6)/((2*x-1)*(2*x^2-1)*(2*x^3-1)*(2*x^6-1)). (End)

A155041 Diagonal sums of symmetric (1,-1)-triangle A155040.

Original entry on oeis.org

1, 1, 2, 0, 1, -1, 2, 0, 3, -1, 2, -2, 3, -1, 4, -2, 3, -3, 4, -2, 5, -3, 4, -4, 5, -3, 6, -4, 5, -5, 6, -4, 7, -5, 6, -6, 7, -5, 8, -6, 7, -7, 8, -6, 9, -7, 8, -8, 9, -7, 10, -8, 9, -9, 10, -8, 11, -9, 10, -10, 11, -9, 12, -10, 11, -11, 12, -10, 13, -11, 12, -12, 13, -11, 14, -12, 13
Offset: 0

Views

Author

Paul Barry, Jan 19 2009

Keywords

Comments

First differences of A155041 are (-1)^n*A008611.

Formula

G.f.: (1+x+x^2)/(1-x^2+x^3-x^5);
a(2n)=A008611(n+2)=[x^n](1+x-x^2)/(1-x-x^3+x^4); a(2n+1)=[x^n](1-x-x^2)/(1-x-x^3+x^4).

A173178 Numbers k such that 2*k+3 is a prime of the form 3*A024893(m) + 2.

Original entry on oeis.org

1, 4, 7, 10, 13, 19, 22, 25, 28, 34, 40, 43, 49, 52, 55, 64, 67, 73, 82, 85, 88, 94, 97, 112, 115, 118, 124, 127, 130, 133, 139, 145, 154, 157, 172, 175, 178, 190, 193, 199, 208, 214, 220, 223, 229, 232, 238, 244, 250, 253, 259, 277, 280, 283, 292, 295, 298, 307, 319
Offset: 1

Views

Author

Eric Desbiaux, Feb 11 2010

Keywords

Comments

With the Bachet-Bézout theorem implicating Gauss Lemma and the Fundamental Theorem of Arithmetic,
for k > 1, k = 2*a + 3*b (a and b integers)
first type
A001477 = (2*A080425) + (3*A008611)
A000040 = (2*A039701) + (3*A157966)
A024893 Numbers k such that 3*k + 2 is prime
A034936 Numbers k such that 3*k + 4 is prime
OR second type
A001477 = (2*A028242) + (3*A059841)
A000040 = (2*A067076) + (3*1)
A067076 Numbers k such that 2*k + 3 is prime
k a b OR a b
-- - - - -
0 0 0 0 0
1 - - - -
2 1 0 1 0
3 0 1 0 1
4 2 0 2 0
5 1 1 1 1
6 0 2 3 0
7 2 1 2 1
8 1 2 4 0
9 0 3 3 1
10 2 2 5 0
11 1 3 4 1
12 0 4 6 0
13 2 3 5 1
14 1 4 7 0
15 0 5 6 1
...
2* 1 + 3 OR 3* 1 + 2 = 5;
2* 4 + 3 OR 3* 3 + 2 = 11;
2* 7 + 3 OR 3* 5 + 2 = 17;
2*10 + 3 OR 3* 7 + 2 = 23;
2*13 + 3 OR 3* 9 + 2 = 29;
2*19 + 3 OR 3*13 + 2 = 41;
2*22 + 3 OR 3*15 + 2 = 47;
2*25 + 3 OR 3*17 + 2 = 53;
2*28 + 3 OR 3*19 + 2 = 59.
A024893 Numbers k such that 3k+2 is prime.
A007528 Primes of the form 6k-1.
A024898 Positive integers k such that 6k-1 is prime.
1, 4, 7, 10, 13, 19, ... = (3*(4*A024898 - A024893) - 7)/2 = (A112774 - 3*A024893 - 5)/2 = A003627 - (3*A024893 - 5)/2.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 320], PrimeQ[(p = 2*# + 3)] && Mod[p, 3] == 2 &] (* Amiram Eldar, Jul 30 2024 *)

Formula

a(n) = 3*A059325(n) + 1. - Amiram Eldar, Jul 30 2024

Extensions

Data corrected and extended by Amiram Eldar, Jul 30 2024

A286717 a(n) is the number of zeros of the Chebyshev S(n, x) polynomial (A049310) in the open interval (-phi, +phi), with the golden section phi = (1 + sqrt(5))/2.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 14, 15, 16, 17, 18, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 23, 24, 25, 26, 27, 26, 27, 28, 29, 30, 29, 30, 31, 32, 33, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 38, 39, 40, 41, 42
Offset: 0

Views

Author

Wolfdieter Lang, May 13 2017

Keywords

Comments

See a May 06 2017 comment on A049310 where these problems are considered which originated in a conjecture by Michel Lagneau (see A008611) on Fibonacci polynomials.

Examples

			a(4) = 2: S(4, x) = 1+x^4-3*x^2, and only two of the four zeros -phi, -1/phi, +1/phi, phi are in the open interval (-phi, +phi), the other two are at the borders.
		

Crossrefs

Cf. A008611(n-1) (1), A285869 (sqrt(2)), A285872 (sqrt(3)).

Programs

  • Magma
    m:=80; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x+x^2-x^3+x^4)/((1-x)^2*(1+x+x^2+x^3+x^4)))); // G. C. Greubel, Mar 08 2018
  • Mathematica
    CoefficientList[Series[x*(1+x+x^2-x^3+x^4)/((1-x)^2*(1+x+x^2+x^3+x^4)), {x, 0, 50}], x] (* G. C. Greubel, Mar 08 2018 *)
    LinearRecurrence[{1,0,0,0,1,-1},{0,1,2,3,2,3},80] (* Harvey P. Dale, Aug 20 2020 *)
  • PARI
    concat(0, Vec(x*(1 + x + x^2 - x^3 + x^4) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^100))) \\ Colin Barker, May 18 2017
    

Formula

a(n) = 2*b(n) if n is even and 1 + 2*b(n) if n is odd with b(n) = floor(n/2) - floor((n+1)/6) = A286716(n). See the g.f. for {b(n)}_{n>=0} there.
From Colin Barker, May 18 2017: (Start)
G.f.: x*(1 + x + x^2 - x^3 + x^4) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>5.
(End)

A307018 Total number of parts of size 3 in the partitions of n into parts of size 2 and 3.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 2, 4, 2, 4, 6, 4, 6, 9, 6, 9, 12, 9, 12, 16, 12, 16, 20, 16, 20, 25, 20, 25, 30, 25, 30, 36, 30, 36, 42, 36, 42, 49, 42, 49, 56, 49, 56, 64, 56, 64, 72, 64, 72, 81, 72, 81, 90, 81, 90, 100, 90, 100, 110, 100, 110, 121, 110, 121, 132
Offset: 0

Views

Author

Andrew Ivashenko, Mar 19 2019

Keywords

Crossrefs

Programs

  • GAP
    a:=[0,0,0,1,0,1,2,1];; for n in [9..80] do a[n]:=a[n-2]+2*a[n-3] -2*a[n-5]-a[n-6]+a[n-8]; od; a; # G. C. Greubel, Apr 03 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); [0,0,0] cat Coefficients(R!( x^3/((1-x^2)*(1-x^3)^2) )); // G. C. Greubel, Apr 03 2019
    
  • Mathematica
    LinearRecurrence[{0,1,2,0,-2,-1,0,1}, {0,0,0,1,0,1,2,1}, 80] (* G. C. Greubel, Apr 03 2019 *)
    Table[(6n(2+n)-5-27(-1)^n+8(4+3n)Cos[2n Pi/3]-8Sqrt[3]n Sin[2n Pi/3])/216,{n,0,66}] (* Stefano Spezia, Apr 21 2022 *)
  • PARI
    my(x='x+O('x^80)); concat([0,0,0], Vec(x^3/((1-x^2)*(1-x^3)^2))) \\ G. C. Greubel, Apr 03 2019
    
  • Sage
    (x^3/((1-x^2)*(1-x^3)^2)).series(x, 80).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019
    

Formula

a(n+2) = A321202(n) - A114209(n+1).
a(3n+1) = A002620(n+2).
a(3n+2) = A002620(n+1).
a(3n+3) = A002620(n+2).
G.f.: x^3/((1+x)*(1+x+x^2)^2*(1-x)^3). - Alois P. Heinz, Mar 19 2019
a(n) = a(n-2) + 2*a(n-3) - 2*a(n-5) - a(n-6) + a(n-8). - G. C. Greubel, Apr 03 2019
a(n) = (6*n*(2 + n) + 8*(4 + 3*n)*cos(2*n*Pi/3) - 8*sqrt(3)*n*sin(2*n*Pi/3) - 5 - 27*(-1)^n)/216. - Stefano Spezia, Apr 21 2022
From Ridouane Oudra, Nov 24 2024: (Start)
a(n) = (7*n/2 - 7*n^2/2 - 9*floor(n/2) + (6*n+4)*floor(2*n/3) + 4*floor(n/3))/18.
a(n) = A008133(n) - A069905(n-1).
a(n) = A002620(A008611(n)). (End)

Extensions

More terms from Alois P. Heinz, Mar 19 2019

A060551 a(n) is the number of nonsymmetric patterns (no reflective, nor rotational symmetry) which may be formed by an equilateral triangular arrangement of closely packed black and white cells satisfying the local matching rule of Pascal's triangle modulo 2, where n is the number of cells in each edge of the arrangement. The matching rule is such that any elementary top-down triangle of three neighboring cells in the arrangement contains either one or three white cells.

Original entry on oeis.org

0, 0, 0, 6, 12, 42, 84, 210, 420, 924, 1860, 3900, 7800, 15996, 31992, 64728, 129528, 260568, 521136, 1045464, 2090928, 4187952, 8376240, 16764720, 33529440, 67084080, 134168160, 268385376, 536772192, 1073642592, 2147285184, 4294769760, 8589539520, 17179472064
Offset: 1

Views

Author

André Barbé (Andre.Barbe(AT)esat.kuleuven.ac.be), Apr 03 2001

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,2,-2,-4,-4,10,-4,-4,4,8,8,-16},{0,0,0,6,12,42,84,210,420,924,1860,3900},40] (* Harvey P. Dale, Feb 01 2015 *)
  • PARI
    a(n) = { 2^n-3*2^ceil(n/2)-2^(floor(n/3)+(n%3)%2)+3*2^(floor((n+3)/6)+(n%6==1)) } \\ Harry J. Smith, Jul 07 2009

Formula

a(n) = 2^n - 3*2^ceiling(n/2) - 2^(floor(n/3)+(n mod 3)mod 2) + 3*2^(floor((n+3)/6) + d(n)), with d(n)=1 if n mod 6=1 else d(n)=0.
a(n) = A000079(n) - 3*A060546(n) - A060547(n) + 3*A060548(n).
a(n) = A000079(n) - 3*2^A008619(n-1) - 2^A008611(n-1) + 3*2^A008615(n+1), for n >= 1.
G.f.: -6*x^4*(2*x^6 + 2*x^5 - x^4 + 2*x^3 - x^2 - 1) / ((2*x-1)*(2*x^2-1)*(2*x^3-1)*(2*x^6-1)). - Colin Barker, Aug 29 2013
a(n) = 6*A060552(n). - Andrew Howroyd, Dec 24 2024

Extensions

More terms from Colin Barker, Aug 29 2013
Previous Showing 21-30 of 43 results. Next