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 11-20 of 43 results. Next

A049798 a(n) = (1/2)*Sum_{k = 1..n} T(n,k), array T as in A049800.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 2, 2, 3, 7, 2, 7, 10, 8, 8, 15, 11, 19, 16, 15, 22, 32, 19, 25, 34, 34, 33, 46, 33, 47, 47, 48, 61, 65, 45, 62, 77, 79, 68, 87, 74, 94, 97, 86, 105, 127, 98, 114, 120, 124, 129, 154, 141, 151, 142, 147, 172, 200, 151, 180
Offset: 1

Views

Author

Keywords

Comments

a(n) is the sum of the remainders after dividing each larger part by its corresponding smaller part for each partition of n+1 into two parts. - Wesley Ivan Hurt, Dec 20 2020

Examples

			From _Lei Zhou_, Mar 10 2014: (Start)
For n = 3, n+1 = 4, floor((n+1)/2) = 2, mod(4,2) = 0, and so a(3) = 0.
For n = 4, n+1 = 5, floor((n+1)/2) = 2, mod(5,2) = 1, and so a(4) = 1.
...
For n = 12, n+1 = 13, floor((n+1)/2) = 6, mod(13,2) = 1, mod(13,3) = 1, mod(13,4) = 1, mod(13,5) = 3, mod(13,6) = 1, and so a(12) = 1 + 1 + 1 + 3 + 1 = 7. (End)
		

Crossrefs

Half row sums of A049800.

Programs

  • GAP
    List([1..60], n-> Sum([1..n], k-> (n+1) mod Int((k+1)/2))/2 ); # G. C. Greubel, Dec 09 2019
    
  • Magma
    [ (&+[(n+1) mod Floor((k+1)/2): k in [1..n]])/2: n in [1..60]]; // G. C. Greubel, Dec 09 2019
    
  • Maple
    seq( add( (n+1) mod floor((k+1)/2), k=1..n)/2, n=1..60); # G. C. Greubel, Dec 09 2019
  • Mathematica
    Table[Sum[Mod[n+1, Floor[(k+1)/2]], {k,n}]/2, {n, 60}] (* G. C. Greubel, Dec 09 2019 *)
  • PARI
    vector(60, n, sum(k=1,n, lift(Mod(n+1, (k+1)\2)) )/2 ) \\ G. C. Greubel, Dec 09 2019
    
  • Python
    def A049798(n): return sum((n+1)%k for k in range(2,(n+1>>1)+1)) # Chai Wah Wu, Oct 20 2023
  • Sage
    def a(n):
        return sum([(n+1)%k for k in range(2,floor((n+3)/2))])
    # Ralf Stephan, Mar 14 2014
    

Formula

a(n) = Sum_{k=2..floor((n+1)/2)} ((n+1) mod k). - Lei Zhou, Mar 10 2014
a(n) = A004125(n+1) - A008805(n-2), for n >= 2. - Carl Najafi, Jan 31 2013
a(n) = Sum_{i = 1..ceiling(n/2)} ((n-i+1) mod i). - Wesley Ivan Hurt, Jan 05 2017

A060548 a(n) is the number of D3-symmetric patterns that may be formed with a top-down 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

2, 1, 2, 2, 2, 2, 4, 2, 4, 4, 4, 4, 8, 4, 8, 8, 8, 8, 16, 8, 16, 16, 16, 16, 32, 16, 32, 32, 32, 32, 64, 32, 64, 64, 64, 64, 128, 64, 128, 128, 128, 128, 256, 128, 256, 256, 256, 256, 512, 256, 512, 512, 512, 512, 1024, 512, 1024, 1024, 1024, 1024, 2048, 1024, 2048
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[n-2]*a[n-3]/a[n-5]; a[1] = a[3] = a[4] = a[5] = 2; a[2] = 1; Table[a[n], {n, 1, 63}] (* Jean-François Alcover, Dec 27 2011, after second formula *)
    LinearRecurrence[{0,0,0,0,0,2},{2,1,2,2,2,2},70] (* Harvey P. Dale, Sep 19 2016 *)
  • PARI
    a(n)=if(n<1,0,2^((n+3)\6+(n%6==1)))

Formula

a(n) = 2^A008615(n+1) = 2^floor(A008611(n+2)/2) for n >= 1.
a(n) = 2^(floor((n+3)/6) + d(n)), where d(n)=1 if n mod 6=1, else d(n)=0.
a(n) = a(n-2)*a(n-3)/a(n-5), n>5.
From Colin Barker, Aug 29 2013: (Start)
a(n) = 2*a(n-6) for n>1.
G.f.: -x*(2*x^5+2*x^4+2*x^3+2*x^2+x+2) / (2*x^6-1). (End)
Sum_{n>=1} 1/a(n) = 7. - Amiram Eldar, Dec 10 2022

A257075 a(n) = (-1)^(n mod 3).

Original entry on oeis.org

1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1
Offset: 0

Views

Author

Michael Somos, Apr 15 2015

Keywords

Comments

Period 3: repeat [1, -1, 1]. - Wesley Ivan Hurt, Jul 02 2016

Examples

			G.f. = 1 - x + x^2 + x^3 - x^4 + x^5 + x^6 - x^7 + x^8 + x^9 - x^10 + ...
G.f. = q - q^3 + q^5 + q^7 - q^9 + q^11 + q^13 - q^15 + q^17 + q^19 + ...
		

Crossrefs

Essentially the same as A131561.

Programs

  • Magma
    [(-1)^(n mod 3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 02 2016
  • Maple
    A257075:=n->(-1)^(n mod 3): seq(A257075(n), n=0..100); # Wesley Ivan Hurt, Jul 02 2016
  • Mathematica
    a[ n_] := (-1)^Mod[n, 3]; Table[a[n], {n, 0, 100}]
    LinearRecurrence[{0,0,1},{1,-1,1},80] (* or *) PadRight[{},100,{1,-1,1}] (* Harvey P. Dale, May 25 2023 *)
  • PARI
    {a(n) = (-1)^(n%3)};
    
  • PARI
    {a(n) = 1 - 2 * (n%3 == 1)};
    
  • PARI
    {a(n) = [1, -1, 1][n%3 + 1]};
    
  • PARI
    {a(n) = my(A, p, e); n = abs(2*n + 1); A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k,]; if( p==2, 0, p==3, -1, 1))};
    

Formula

Euler transform of length 6 sequence [-1, 1, 2, 0, 0, -1].
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = -1 if e>0, otherwise b(p^e) = 1.
a(n) = a(-1-n) = a(n+3) = -a(n-1)*a(n-2) for all n in Z.
G.f.: (1 - x + x^2) / (1 - x^3).
G.f.: (1 - x) * (1 - x^6) / ((1 - x^2) * (1 - x^3)^2).
G.f.: 1 / (1 + x / (1 + 2*x^2 / (1 - x / (1 - x / (1 + x))))).
Given g.f. A(x), then x*A(x^2) = Sum_{k>0} (x^k - x^(2*k)) - 2*(x^(3*k) - x^(6*k)).
a(n) = A131561(n+1) for all n in Z.
a(n) = (-1)^n * A130151(n) for all n in Z.
Convolution inverse is A257076.
PSUM transform is A008611.
BINOMIAL transform is A086953.
1 / (1 - a(0)*x / (1 - a(1)*x / (1 - a(2)*x / ...))) is the g.f. of A168505.
From Wesley Ivan Hurt, Jul 02 2016: (Start)
a(n) = (1 + 2*cos(2*n*Pi/3) - 2*sqrt(3)*sin(2*n*Pi/3))/3.
a(n) = 2*sgn((n+2) mod 3) - 1. (End)
E.g.f.: (exp(3*x/2) + 4*sin(Pi/6-sqrt(3)*x/2))*exp(-x/2)/3. - Ilya Gutkovskiy, Jul 02 2016

A271800 Five steps forward, four steps back.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 15 2016

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).

Programs

  • Maple
    A271800:=n->add((-1)^floor((2*i-2)/9), i=1..n): seq(A271800(n), n=0..200);
  • Mathematica
    Table[Sum[(-1)^Floor[(2 i - 2)/9], {i, n}], {n, 0, 100}]
  • PARI
    concat(0, Vec(x*(1+x+x^2+x^3+x^4-x^5-x^6-x^7-x^8)/((1-x)^2*(1+x+x^2)*(1+x^3+x^6)) + O(x^50))) \\ Colin Barker, Apr 15 2016

Formula

a(n) = a(n-1) + a(n-9) - a(n-10) for n>9.
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/9).
G.f.: x*(1+x+x^2+x^3+x^4-x^5-x^6-x^7-x^8) / ((1-x)^2*(1+x+x^2)*(1+x^3+x^6)). - Colin Barker, Apr 15 2016

A334596 Number of values in A334556 with binary length n.

Original entry on oeis.org

2, 0, 0, 2, 0, 2, 4, 2, 0, 8, 4, 8, 16, 8, 16, 32, 0, 32, 64, 32, 64, 128, 64, 128, 256, 128, 256, 512, 256, 512, 1024, 512, 0, 2048, 1024, 2048, 4096, 2048, 4096, 8192, 4096, 8192, 16384, 8192, 16384, 32768, 16384, 32768, 65536, 32768, 65536, 131072, 65536, 131072, 262144, 131072
Offset: 1

Views

Author

Peter Kagey, May 07 2020

Keywords

Comments

All nonzero values are powers of two.

Examples

			For n = 11, the a(11) = 4 XOR-triangles of side length 11 are:
  1 0 1 0 1 1 0 0 0 1 1, 1 0 1 1 1 0 0 1 0 1 1,
   1 1 1 1 0 1 0 0 1 0    1 1 0 0 1 0 1 1 1 0
    0 0 0 1 1 1 0 1 1      0 1 0 1 1 1 0 0 1
     0 0 1 0 0 1 1 0        1 1 1 0 0 1 0 1
      0 1 1 0 1 0 1          0 0 1 0 1 1 1
       1 0 1 1 1 1            0 1 1 1 0 0
        1 1 0 0 0              1 0 0 1 0
         0 1 0 0                1 0 1 1
          1 1 0                  1 1 0
           0 1                    0 1
            1                      1
and their reflections across a vertical line.
By reading the first rows in binary, these XOR-triangles correspond to A334556(20) = 1379, A334556(21) = 1483, A334556(22) = 1589, and A334556(23) = 1693 respectively.
		

Crossrefs

Programs

  • Mathematica
    coeff[i_, j_, n_] := Binomial[i, j] - If[j + i == n, 1, 0];
    A334596[1] = 2;
    A334596[n_] := (
       nullsp = NullSpace[
         Table[coeff[i, j, n - 1], {i, 0, n - 1}, {j, 0, n - 1}],
         Modulus -> 2];
       If[AnyTrue[nullsp, #[[1]] == 1 &], 2^(Length[nullsp] - 1), 0]
       );

Formula

Conjectured formula:
a(1) = 2,
a(n) = 0 if n = 2^k + 1 for some k, and
a(n) = 2^A008611(n-4) otherwise.

Extensions

More terms from Rémy Sigrist, May 08 2020

A058788 Triangle T(n,k) = number of polyhedra (triconnected planar graphs) with n edges and k vertices (or k faces), where (n/3+2) <= k <= (2n/3). Note that there is no such k when n=7.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 8, 2, 11, 11, 8, 42, 8, 5, 74, 74, 5, 76, 296, 76, 38, 633, 633, 38, 14, 768, 2635, 768, 14, 558, 6134, 6134, 558, 219, 8822, 25626, 8822, 219, 50, 7916, 64439, 64439, 7916, 50, 4442, 104213, 268394, 104213, 4442, 1404, 112082, 709302, 709302, 112082, 1404, 233, 79773, 1263032, 2937495, 1263032, 79773, 233, 36528, 1556952, 8085725, 8085725, 1556952, 36528, 9714, 1338853, 15535572, 33310550
Offset: 6

Views

Author

Gerard P. Michon, Nov 29 2000

Keywords

Comments

Rows are of lengths 1,0,1,2,1,2,3,2,3,4,3,4,5,4,5,6,5, ... n-1-2*floor((n+2)/3). See A008611. Note the zero length, which means that there are no polyhedra with n=7 edges.

Examples

			There are 768 different polyhedra with 18 edges and 9 or 11 faces.
		

Crossrefs

A271859 Six steps forward, five steps back.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 15 2016

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).

Programs

  • Maple
    A271859:=n->add((-1)^floor((2*i-2)/11), i=1..n): seq(A271859(n), n=0..200);
  • Mathematica
    Table[Sum[(-1)^Floor[(2 i - 2)/11], {i, n}], {n, 0, 100}]
  • PARI
    concat(0, Vec(x*(1+x+x^2+x^3+x^4+x^5-x^6-x^7-x^8-x^9-x^10) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10)) + O(x^50))) \\ Colin Barker, Apr 16 2016

Formula

a(n) = a(n-1) + a(n-11) - a(n-12) for n>11.
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/11).
G.f.: x*(1+x+x^2+x^3+x^4+x^5-x^6-x^7-x^8-x^9-x^10) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10)). - Colin Barker, Apr 16 2016

A226023 A142705 (numerators of 1/4-1/(4n^2)) sorted to natural order.

Original entry on oeis.org

0, 2, 3, 6, 12, 15, 20, 30, 35, 42, 56, 63, 72, 90, 99, 110, 132, 143, 156, 182, 195, 210, 240, 255, 272, 306, 323, 342, 380, 399, 420, 462, 483, 506, 552, 575, 600, 650, 675, 702, 756, 783, 812, 870, 899
Offset: 0

Views

Author

Paul Curtz, May 23 2013

Keywords

Comments

A198442(n) without indices 4*n+2.
a(n)/A130823(n+1) = 0, 2,3,2, 4,5,4, 6,7,6, 8,9,8, ... (equal to A133310+1, after 0; see also A008611).
-1, 0, 2, 3, is divisible by 1 (for a(-1)=-1),
3, 6, 12, 15, 3,
15, 20, 30, 35 5,
35, 42, 56, 63 7,
63, 72, 90, 99 9,
99, 110, 132, 143, 11, etc.
First column: A000466(n),
second column: A002943(n),
third column: A002939(n+1),
fourth column: A000466(n+1).
a(n) is also the numerator of 1/4-1/(4*n+2)^2: 0/1, 2/9, 3/16, 6/25, 12/49, 15/64, 20/81, 30/121, 35/144, 42/169, 56/225,...
The n-th denominator is equal to 4*a(n) + A146325(n+2).
Note that the differences of a(n-1): 1, 2, 1, 3, 6, 3, 5, 10, 5, 7, 14, 7, 9, 18, 9, 11, 22,... (from A043547 by pairs and 2*n+1) has the same recurrence.
(Of course every sequence which obeys a linear recurrence with constant coefficients has first differences that obey the same linear recurrence. - R. J. Mathar, Jun 14 2013)

Crossrefs

Trisections: A002939, A000466, A002943.

Programs

  • Maple
    A226023 := proc(n)
        option remember;
        if n <=6 then
            op(n+1,[0,2,3,6,12,15,20]) ;
        else
            procname(n-1)+2*procname(n-3)-2*procname(n-4)-procname(n-6)+procname(n-7) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    A226023[n_]:=Floor[(2n+1)/3]Floor[(2n+5)/3];
    Array[A226023,100,0] (* Paolo Xausa, Dec 05 2023 *)

Formula

a(n) = floor( (2*n + 1)/3 ) * floor( (2*n + 5)/3 ) = A004396(n) * A004396(n+2).
Recurrences: a(n) = 3*a(n-3) -3*a(n-6) +a(n-9) = a(n-1) +2*a(n-3) -2*a(n-4) -a(n-6) +a(n-7).
a(n+15) - a(n) = 10*A042968(n+8).
a(n+1) - a(n-2) = 2*A042968(n) with a(-2)=0, a(-1)=-1.
G.f.: x*(2+x+3*x^2+2*x^3+x^4-x^5)/((1-x)^3 * (1+x+x^2)^2). [Ralf Stephan, May 24 2013]

A285872 a(n) is the number of zeros of the Chebyshev S(n, x) polynomial (A049310) in the open interval (-sqrt(3), +sqrt(3)).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, May 12 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

			n = 3: S(3, x) = x*(-2 + x^2), with all three zeros (-sqrt(2), 0, +sqrt(2)) in the interval (-sqrt(3), +sqrt(3)).
n = 4: S(4, x) = 1 - 3*x^2 + x^4, all four zeros  (-phi, -1/phi, 1/phi, phi) with phi = (1 + sqrt(5))/2, approximately 1.618, lie in the interval.
n = 6, two zeros of  S(6, x) = -1 + 6*x^2 - 5*x^4 + x^6 are out of the interval (-sqrt(3), +sqrt(3)), namely - 1.8019... and +1.8019... .
		

Crossrefs

Cf. A008611(n-1) (1), A049310, A285869 (sqrt(2)), A285870.

Programs

  • Magma
    m:=80; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+x+x^2+x^3-x^4+x^5)/((1-x)^2*(1+x)*(1-x+x^2)*(1+x+x^2)))); // G. C. Greubel, Mar 08 2018
  • Mathematica
    CoefficientList[Series[x*(1+x+x^2+x^3-x^4+x^5)/((1-x)^2*(1+x)*(1-x+x^2)*(1+x+x^2)), {x, 0, 50}], x] (* G. C. Greubel, Mar 08 2018 *)
  • PARI
    concat(0, Vec(x*(1 + x + x^2 + x^3 - x^4 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)) + 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) = A285870(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 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-6) - a(n-7) for n>6.
(End)

A287655 Seven steps forward, six steps back.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, May 29 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).

Programs

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

Formula

a(n) = a(n-1) + a(n-13) - a(n-14) for n > 13.
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/13).
Previous Showing 11-20 of 43 results. Next