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

A168277 a(n) = 2*n - (-1)^n - 2.

Original entry on oeis.org

1, 1, 5, 5, 9, 9, 13, 13, 17, 17, 21, 21, 25, 25, 29, 29, 33, 33, 37, 37, 41, 41, 45, 45, 49, 49, 53, 53, 57, 57, 61, 61, 65, 65, 69, 69, 73, 73, 77, 77, 81, 81, 85, 85, 89, 89, 93, 93, 97, 97, 101, 101, 105, 105, 109, 109, 113, 113, 117, 117, 121, 121, 125, 125, 129, 129
Offset: 1

Views

Author

Vincenzo Librandi, Nov 22 2009

Keywords

Crossrefs

Cf. A006752, A111003 (Pi^2/8).

Programs

Formula

a(n) = 4*n - a(n-1) - 6, with n>1, a(1)=1.
a(n) = A163980(n-1), n>1. - R. J. Mathar, Nov 25 2009
G.f.: x*(1 + 3*x^2)/( (1+x)*(x-1)^2 ). - R. J. Mathar, Jul 15 2013
a(n) = A168276(n) - 1. - Vincenzo Librandi, Sep 17 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 17 2013
E.g.f.: (-1 + 3*exp(x) + 2*(x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 16 2016
Sum_{n>=1} 1/a(n)^2 = Pi^2/8 + G, where G is Catalan's constant (A006752). - Amiram Eldar, Aug 21 2022

Extensions

New definition from Bruno Berselli, Sep 17 2013

A168381 a(n) = 4*n + 2*(-1)^n.

Original entry on oeis.org

2, 10, 10, 18, 18, 26, 26, 34, 34, 42, 42, 50, 50, 58, 58, 66, 66, 74, 74, 82, 82, 90, 90, 98, 98, 106, 106, 114, 114, 122, 122, 130, 130, 138, 138, 146, 146, 154, 154, 162, 162, 170, 170, 178, 178, 186, 186, 194, 194, 202, 202, 210, 210, 218, 218, 226, 226, 234, 234
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2009

Keywords

Crossrefs

Cf. A163980.

Programs

  • Magma
    [4*n +2*(-1)^n: n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
  • Mathematica
    CoefficientList[Series[(2 + 8 x - 2 x^2)/((1 + x) (x -1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)

Formula

a(n) = 8*n - a(n-1) - 4, with n>1, a(1)=2.
G.f.: 2*x*(1 + 4*x - x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 18 2013
From Bruno Berselli, Sep 18 2013: (Start)
a(n) = 2*A163980(n).
a(n) = 2 + 8*floor(n/2). (End)
E.g.f.: 2*(1 - exp(x) + 2*x*exp(2*x))*exp(-x). - G. C. Greubel, Jul 19 2016

Extensions

Definition rewritten by Vincenzo Librandi, Sep 18 2013

A292576 Permutation of the natural numbers partitioned into quadruples [4k-1, 4k-3, 4k-2, 4k], k > 0.

Original entry on oeis.org

3, 1, 2, 4, 7, 5, 6, 8, 11, 9, 10, 12, 15, 13, 14, 16, 19, 17, 18, 20, 23, 21, 22, 24, 27, 25, 26, 28, 31, 29, 30, 32, 35, 33, 34, 36, 39, 37, 38, 40, 43, 41, 42, 44, 47, 45, 46, 48, 51, 49, 50, 52, 55, 53, 54, 56, 59, 57, 58, 60, 63, 61, 62
Offset: 1

Views

Author

Guenther Schrack, Sep 19 2017

Keywords

Comments

Partition the natural number sequence into quadruples starting with (1,2,3,4); swap the second and third elements, then swap the first and the second element; repeat for all quadruples.

Crossrefs

Inverse: A056699(n+1) - 1 for n > 0.
Sequence of fixed points: A008586(n) for n > 0.
Subsequences:
elements with odd index: A042964(A103889(n)) for n > 0.
elements with even index: A042948(n) for n > 0.
odd elements: A166519(n) for n>0.
indices of odd elements: A042963(n) for n > 0.
even elements: A005843(n) for n>0.
indices of even elements: A014601(n) for n > 0.
Sum of pairs of elements:
a(n+2) + a(n) = A163980(n+1) = A168277(n+2) for n > 0.
Difference between pairs of elements:
a(n+2) - a(n) = (-1)^A011765(n+3)*A091084(n+1) for n > 0.
Compound relations:
a(n) = A284307(n+1) - 1 for n > 0.
a(n+2) - 2*a(n+1) + a(n) = (-1)^A011765(n)*A132400(n+1) for n > 0.
Compositions:
a(n) = A116966(A080412(n)) for n > 0.
a(A284307(n)) = A256008(n) for n > 0.
a(A042963(n)) = A166519(n-1) for n > 0.
A256008(a(n)) = A056699(n) for n > 0.

Programs

  • MATLAB
    a = [3 1 2 4]; % Generate b-file
    max = 10000;
    for n := 5:max
       a(n) = a(n-4) + 4;
    end;
    
  • PARI
    for(n=1, 10000, print1(n + ((-1)^(n*(n-1)/2)*(2 - (-1)^n) - (-1)^n)/2, ", "))

Formula

a(1)=3, a(2)=1, a(3)=2, a(4)=4, a(n) = a(n-4) + 4 for n > 4.
O.g.f.: (2*x^3 + x^2 - 2*x + 3)/(x^5 - x^4 - x + 1).
a(n) = n + ((-1)^(n*(n-1)/2)*(2-(-1)^n) - (-1)^n)/2.
a(n) = n + (cos(n*Pi/2) - cos(n*Pi) + 3*sin(n*Pi/2))/2.
a(n) = n + n mod 2 + (ceiling(n/2)) mod 2 - 2*(floor(n/2) mod 2).
Linear recurrence: a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
First Differences, periodic: (-2, 1, 2, 3), repeat; also (-1)^A130569(n)*A068073(n+2) for n > 0.
Showing 1-3 of 3 results.