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-7 of 7 results.

A008811 Expansion of x*(1+x^4)/((1-x)^2*(1-x^4)).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 10, 13, 16, 21, 26, 31, 36, 43, 50, 57, 64, 73, 82, 91, 100, 111, 122, 133, 144, 157, 170, 183, 196, 211, 226, 241, 256, 273, 290, 307, 324, 343, 362, 381, 400, 421, 442, 463, 484, 507, 530, 553, 576, 601, 626, 651, 676, 703, 730, 757, 784, 813
Offset: 0

Views

Author

Keywords

Comments

Number of 0..n-1 arrays of 5 elements with zero 2nd differences. - R. H. Hardin, Nov 15 2011

Crossrefs

Cf. A129756 (first differences).
Cf. Expansions of the form (1+x^m)/((1-x)^2*(1-x^m)): A000290 (m=1), A000982 (m=2), A008810 (m=3), this sequence (m=4), A008812 (m=5), A008813 (m=6), A008814 (m=7), A008815 (m=8), A008816 (m=9), A008817 (m=10).

Programs

  • GAP
    a:=[0,1,2,3,4,7];; for n in [7..60] do a[n]:=2*a[n-1]-a[n-2] +a[n-4]-2*a[n-5]+a[n-6]; od; a; # G. C. Greubel, Sep 12 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( x*(1+x^4)/((1-x)^2*(1-x^4)) )); // G. C. Greubel, Sep 12 2019
    
  • Maple
    f := n->n^2/4+3*n/2+g(n);
    g := n->if n mod 2 = 0 then 3 elif n mod 4 = 1 then 9/4 else 13/4; fi;
    seq(f(n), n=-3..50);
  • Mathematica
    CoefficientList[Series[x*(1+x^4)/((1-x)^2*(1-x^4)), {x,0,60}], x] (* G. C. Greubel, Sep 12 2019 *)
  • PARI
    concat([0], Vec(x*(1+x^4)/((1-x)^2*(1-x^4))+O(x^60))) \\ Charles R Greathouse IV, Sep 26 2012, modified by G. C. Greubel, Sep 12 2019
    
  • Sage
    def A008811_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+x^4)/((1-x)^2*(1-x^4))).list()
    A008811_list(60) # G. C. Greubel, Sep 12 2019
    

Formula

G.f.: x*(1+x^4)/((1-x)^2*(1-x^4)).
a(n) = 2*a(n-1) -a(n-2) +a(n-4) -2*a(n-5) +a(n-6). - R. H. Hardin, Nov 15 2011
a(n) = (-2*(1+(-1)^n)*(-1)^floor(n/2) + 2*n^2 + 5 - (-1)^n)/8. - Tani Akinari, Jul 24 2013
E.g.f.: ((2 + x + x^2)*cosh(x) + (3 + x + x^2)*sinh(x) - 2*cos(x))/4. - Stefano Spezia, May 26 2021
Sum_{n>=1} 1/a(n) = Pi^2/24 + tanh(Pi/2)*Pi/4 + tanh(sqrt(3)*Pi/2)*Pi/sqrt(3). - Amiram Eldar, Aug 25 2022
a(n) = 2*floor((n^2 + 4)/8) + (n mod 2). - Ridouane Oudra, Sep 08 2023

A083219 a(n) = n - 2*floor(n/4).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 22 2003

Keywords

Comments

Conjecture: number of roots of P(x) = x^n - x^(n-1) - x^(n-2) - ... - x - 1 in the left half-plane. - Michel Lagneau, Apr 09 2013
a(n) is n+2 with its second least significant bit removed (see A021913(n+2) for that bit). - Kevin Ryde, Dec 13 2019

Crossrefs

Cf. A083220, A129756, A162751 (second highest bit removed).
Essentially the same as A018837.

Programs

Formula

a(n) = A083220(n)/2.
a(n) = a(n-1) + n mod 2 + (n mod 4 - 1)*(1 - n mod 2), a(0) = 0.
G.f.: x*(1+x+x^2-x^3)/((1-x)^2*(1+x)*(1+x^2)). - R. J. Mathar, Aug 28 2008
a(n) = n - A129756(n). - Michel Lagneau, Apr 09 2013
Bisection: a(2*k) = 2*floor((n+2)/4), a(2*k+1) = a(2*k) + 1, k >= 0. - Wolfdieter Lang, May 08 2017
a(n) = (2*n + 3 - 2*cos(n*Pi/2) - cos(n*Pi) - 2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
a(n) = A162330(n+2) - 1 = A285869(n+3) - 1. - Kevin Ryde, Dec 13 2019
E.g.f.: ((1 + x)*cosh(x) - cos(x) + (2 + x)*sinh(x) - sin(x))/2. - Stefano Spezia, May 27 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2) - 1. - Amiram Eldar, Aug 21 2023

A212120 Triangle read by rows T(n,k), n>=1, k>=1, where T(n,k) is the sum of the divisors d of n with min(d, n/d) = k.

Original entry on oeis.org

1, 3, 5, 7, 1, 9, 1, 11, 3, 13, 3, 15, 5, 17, 5, 1, 19, 7, 1, 21, 7, 1, 23, 9, 3, 25, 9, 3, 27, 11, 3, 29, 11, 5, 31, 13, 5, 1, 33, 13, 5, 1, 35, 15, 7, 1, 37, 15, 7, 1, 39, 17, 7, 3, 41, 17, 9, 3, 43, 19, 9, 3, 45, 19, 9, 3, 47, 21, 11, 5, 49, 21, 11, 5, 1
Offset: 1

Views

Author

Omar E. Pol, Jul 02 2012

Keywords

Comments

Column k lists the odd numbers repeated k times starting in row k^2.
1 together with the first differences of the row sums give the divisor function A000005.
T(n,k) is also the total number of divisors of all positive integers <= n on the edges of k-th triangle in the diagram of divisors (see link section). See also A212119.

Examples

			Written as an irregular triangle the sequence begins:
1;
3;
5;
7,   1;
9,   1;
11,  3;
13,  3;
15,  5;
17,  5,  1;
19,  7,  1;
21,  7,  1;
23,  9,  3;
25,  9,  3;
27, 11,  3;
29, 11,  5;
31, 13,  5,  1;
33, 13,  5,  1;
35, 15,  7,  1;
37, 15,  7,  1;
39, 17,  7,  3;
41, 17,  9,  3;
43, 19,  9,  3;
45, 19,  9,  3;
47, 21, 11,  5;
49, 21, 11,  5,  1;
		

Crossrefs

Row sums give A006218, n >= 1.
Columns (1-5): A005408, A109613, A130823, A129756, A130497.

Formula

T(n,k) = Sum_{j=1..n} A212119(j,k).

Extensions

Definition changed by Franklin T. Adams-Watters, Jul 12 2012

A212831 a(4*n) = 2*n, a(2*n+1) = 2*n+1, a(4*n+2) = 2*n+2.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, 11, 6, 13, 8, 15, 8, 17, 10, 19, 10, 21, 12, 23, 12, 25, 14, 27, 14, 29, 16, 31, 16, 33, 18, 35, 18, 37, 20, 39, 20, 41, 22, 43, 22, 45, 24, 47, 24, 49, 26, 51, 26, 53, 28, 55, 28, 57, 30, 59, 30, 61, 32, 63, 32, 65, 34, 67, 34, 69, 36, 71, 36, 73, 38, 75
Offset: 0

Views

Author

Paul Curtz, Aug 14 2012

Keywords

Comments

First differences: (1, 1, 1, -1, 3, -1, 3, -3, 5,...) = (1, A186422).
Second differences: (0, 0, -2, 4, -4, 4, -6, 8, ...) = (-1)^(n+1) * A201629(n).
Interleave the terms with even indices of the companion A215495 and this one to get (A215495(0), A212831(0), A215495(2), A212831(2),...) = (1, 0, 1, 2, 3, 2, 3, 4, 5, 4,...) = A106249, up to the initial term = A083219 = A083220/2.

Crossrefs

Programs

  • Magma
    [(1/4)*((1 +(-1)^n)*(1 - (-1)^Floor(n/2)) + (3 -(-1)^n)*n): n in [0..50]]; // G. C. Greubel, Apr 25 2018
  • Mathematica
    a[n_] := (1/4)*((-(1 + (-1)^n))*(-1 + (-1)^Floor[n/2]) - (-3 + (-1)^n)*n ); Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Sep 18 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1},{0,1,2,3,2,5},80] (* Harvey P. Dale, May 29 2016 *)
  • PARI
    A212831(n)=if(bittest(n,0), n, n\2+bittest(n,1)) \\ M. F. Hasler, Oct 21 2012
    
  • PARI
    for(n=0,50, print1((1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n), ", ")) \\ G. C. Greubel, Apr 25 2018
    

Formula

a(n) + A215495(n) = A043547(n).
a(n) = -A214283(n)/A000108([n/2]).
a(n+1) = (A186421(n)=0,1,2,1,4,...) + 1.
a(2*n) = A052928(n+1).
a(n+2) - a(n) = 2, 2, 0, 2. (period 4).
a(n) = a(n-2) +a(n-4) -a(n-6); also holds for A215495(n).
G.f.: x*(1+2*x+2*x^2+x^4) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Aug 21 2012
a(n) = (1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n). - G. C. Greubel, Apr 25 2018

Extensions

Corrected and edited by M. F. Hasler, Oct 21 2012

A130497 Repetition of odd numbers five times.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 29, 29, 29, 29, 29, 31, 31, 31
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1,1,1,1,3];; for n in [7..80] do a[n]:=a[n-1]+a[n-5]-a[n-6]; od; a; # G. C. Greubel, Sep 12 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x^5)/((1-x)*(1-x^5)) )); // G. C. Greubel, Sep 12 2019
    
  • Maple
    P:=proc(q) local k,n; k:=[]; for n from 0 to q do k:=[op(k),2*floor(n/5)+1]; od; op(k); end: P(77);
  • Mathematica
    Flatten[Table[#,{5}]&/@Range[1,31,2]] (* Harvey P. Dale, Mar 27 2013~ *)
  • PARI
    my(x='x+O('x^80)); Vec((1+x^5)/((1-x)*(1-x^5))) \\ G. C. Greubel, Sep 12 2019
    
  • Sage
    def A130497_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^5)/((1-x)*(1-x^5))).list()
    A130497_list(80) # G. C. Greubel, Sep 12 2019
    

Formula

From R. J. Mathar, Mar 17 2010: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6).
G.f.: (1+x)*(1-x+x^2-x^3+x^4)/((1+x+x^2+x^3+x^4) * (1-x)^2 ). (End)
a(n) = 2*floor(n/5)+1 = A130496(n)+1. - Tani Akinari, Jul 24 2013

A247617 a(4n) = n + 1/2 - (-1)^n/2 + (-1)^n, a(2n+1) = 2*n + 5, a(4n+2) = 2*n + 3.

Original entry on oeis.org

1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 3, 17, 9, 19, 5, 21, 11, 23, 5, 25, 13, 27, 7, 29, 15, 31, 7, 33, 17, 35, 9, 37, 19, 39, 9, 41, 21, 43, 11, 45, 23, 47, 11, 49, 25, 51, 13, 53, 27, 55, 13, 57, 29, 59, 15, 61, 31, 63, 15, 65, 33, 67
Offset: 0

Views

Author

Paul Curtz, Sep 21 2014

Keywords

Comments

Essentially a permutation of A129756 (odd numbers repeated four times).
a(-1) = 3, a(-2) = a(-3) = 1.
Distance between the first two (2*k+1)'s: 2*k+1 terms. Distance between the last two (2*n+1)'s: 4 terms. Essentially same distances as in -a(-n) = -1, -3, -1, -1, 1, 1, 1, 3, 1, 5, 3, 7, 3, 9, 5, 11, 3, 13, 7, 15, 5, 17, 9, 19, 5, 21, 11, 23, 7, 25, 13, 27, 7, ... .

Crossrefs

Programs

  • Magma
    I:=[1,5,3,7,1,9,5,11,3,13,7,15]; [n le 12 select I[n] else Self(n-4)+Self(n-8)-Self(n-12): n in [1..80]]; // Vincenzo Librandi, Oct 15 2014
  • Maple
    A247617:=n->(n+4)*(1-ceil((2-n)/4)-ceil((n-2)/4))/2+(n+4)*(1+floor((1-n)/2)+floor((n-1)/2))-(n+2+2*(-1)^(n/4))*(ceil(n/4)-floor(n/4)-1)/4: seq(A247617(n), n=0..50); # Wesley Ivan Hurt, Sep 21 2014
  • Mathematica
    Table[(n + 4) (1 - Ceiling[(2 - n)/4] - Ceiling[(n - 2)/4])/2 + (n + 4) (1 + Floor[(1 - n)/2] + Floor[(n - 1)/2]) - (n + 2 + 2 (-1)^(n/4)) (Ceiling[n/4] - Floor[n/4] - 1)/4, {n, 0, 50}] (* Wesley Ivan Hurt, Sep 21 2014 *)
  • PARI
    Vec(-(3*x^11+x^10+x^9-x^8-4*x^7-2*x^6-4*x^5-7*x^3-3*x^2-5*x-1)/((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)) + O(x^100)) \\ Colin Barker, Sep 21 2014
    

Formula

a(n) = a(n-4) + a(n-8) - a(n-12).
a(n) * A246416(n) = A061037(n+2).
A246416(n+4) - a(n) = sequence of period 4: [1, 0, 0, 0].
a(n+4) - a(n) = sequence of period 8: [0, 4, 2, 4, 2, 4, 2, 4].
G.f.: -(3*x^11+x^10+x^9-x^8-4*x^7-2*x^6-4*x^5-7*x^3-3*x^2-5*x-1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)). - Colin Barker, Sep 21 2014
a(n) = a(n-8) + sequence of period 4: [2, 8, 4, 8] (= 2*A176895(n)).
a(-n) * A246416(-n) = A061037(n-2).
a(n) = (n+4)*(1-ceiling((2-n)/4)-ceiling((n-2)/4))/2+(n+4)*(1+floor((1-n)/2)+floor((n-1)/2))-(n+2+2(-1)^(n/4))*(ceiling(n/4)-floor(n/4)-1)/4. - Wesley Ivan Hurt, Sep 21 2014

A320661 a(n) = 2^(n+3) - 6*n - 7.

Original entry on oeis.org

1, 3, 13, 39, 97, 219, 469, 975, 1993, 4035, 8125, 16311, 32689, 65451, 130981, 262047, 524185, 1048467, 2097037, 4194183, 8388481, 16777083, 33554293, 67108719, 134217577, 268435299, 536870749, 1073741655, 2147483473, 4294967115, 8589934405, 17179868991
Offset: 0

Views

Author

Paul Curtz, Nov 14 2018

Keywords

Comments

Companion to A247618 which has the same recurrence.
For this recurrence the main sequence is A000295.

Crossrefs

Programs

  • GAP
    List([0..40], n -> 2^(n+3) -6*n -7); # G. C. Greubel, Nov 15 2018
  • Magma
    [2^(n+3) -6*n -7: n in [0..40]]; // G. C. Greubel, Nov 15 2018
    
  • Mathematica
    a[n_]:=2^(n+3) - 6*n - 7; Array[a,32,0] (* Amiram Eldar, Nov 14 2018 *)
  • PARI
    vector(40, n, n--; 2^(n+3) -6*n -7) \\ G. C. Greubel, Nov 15 2018
    
  • Sage
    [2^(n+3) -6*n -7 for n in range(40)] # G. C. Greubel, Nov 15 2018
    

Formula

a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
a(n+1) = a(n-1) + 12*A000225(n). a(-1) = 3.
a(2*n) mod 9 = period 3: repeat [1, 4, 7].
a(2*n+1) mod 9 = 3.
a(n) mod 9 = period 6: repeat [1, 3, 4, 3, 7, 3].
a(n) mod 10 = period 20: repeat [1, 3, 3, 9, 7, 9, 9, 5, 3, 5, 5, 1, 9, 1, 1, 7, 5, 7, 7, 3] = Im(n). Im(n-1) = [3, 1, 3, 3, 9, 7, 9, 9, 5, 3, 5, 5, 1, 9, 1, 1, 7, 5, 7, 7]. Disordered [1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9].
a(n+1) - a(n) = 2^(n+3) - 6.
From G. C. Greubel, Nov 15 2018: (Start)
G.f.: (1-x+6*x^2)/((1-2*x)*(1-x)^2).
E.g.f.: 8*exp(2*x) - (7 + 6*x)*exp(x). (End)

Extensions

More terms from Amiram Eldar, Nov 14 2018
Showing 1-7 of 7 results.