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

A085350 Binomial transform of poly-Bernoulli numbers A027649.

Original entry on oeis.org

1, 5, 23, 101, 431, 1805, 7463, 30581, 124511, 504605, 2038103, 8211461, 33022991, 132623405, 532087943, 2133134741, 8546887871, 34230598205, 137051532983, 548593552421, 2195536471151, 8785632669005, 35152991029223
Offset: 0

Views

Author

Paul Barry, Jun 24 2003

Keywords

Comments

Binomial transform is A085351.
a(n) mod 10 = period 4:repeat 1,5,3,1 = A132400. - Paul Curtz, Nov 13 2009

Crossrefs

a(n-1) = A080643(n)/2 = A081674(n+1) - A081674(n).
Cf. A000244 (3^n).

Programs

  • Magma
    [2*4^n-3^n: n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
  • Mathematica
    LinearRecurrence[{4,9,-36},{1,5,23},30] (* Harvey P. Dale, Nov 30 2011 *)
    LinearRecurrence[{7, -12},{1, 5},23] (* Ray Chandler, Aug 03 2015 *)

Formula

G.f.: (1-2x)/((1-3x)(1-4x)).
E.g.f.: 2exp(4x) - exp(3x).
a(n) = 2*4^n-3^n.
From Paul Curtz, Nov 13 2009: (Start)
a(n) = 4*a(n-1) + 9*a(n-2) - 36*a(n-3);
a(n) = 4*a(n-1) + 3^(n-1), both like A005061 (note for A005061 dual formula a(n) = 3*a(n-1) + 4^(n-1) = 3*a(n-1) + A000302(n-1)).
a(n) = 3*a(n-1) + 2^(2n+1) = 3*a(n-1) + A004171(n).
a(n) = A005061(n) + A000302(n).
b(n) = mix(A005061, A085350) = 0,1,1,5,7,23,... = differences of (A167762 = 0,0,1,2,7,14,37,...); b(n) differences = A167784. (End)

A056699 First differences are 2,1,-2,3 (repeated).

Original entry on oeis.org

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

Views

Author

Michael Knauth (knauth_jur(AT)yahoo.de), Nov 21 2003

Keywords

Comments

Second quadrisection of natural numbers shifted right two places. - Ralf Stephan, Jun 10 2005
A permutation of the natural numbers partitioned into quadruples [4k-3,4k-1,4k,4k-2] for k > 0. Partition the natural number sequence into quadruples starting with (1,2,3,4); swap the second and third elements, then swap the third and fourth elements; repeat for all quadruples. - Guenther Schrack, Oct 18 2017

Crossrefs

Inverse: A284307.
Sequence of fixed points: A016813(n-1) for n > 0.
Odd elements: A005408(n-1) for n > 0.
Indices of odd elements: A042963(n) for n > 0.
Even elements: 2*A103889(n) for n > 0.
Indices of even elements: A014601(n) for n > 0.

Programs

  • MATLAB
    a = [1 3 4 2];
    max = 10000;  % Generation of a b-file
    for n := 5:max
       a(n) = a(n-4) + 4;
    end;
    % Guenther Schrack, Oct 18 2017
    
  • Magma
    [Floor((n - ((-1)^n + (-1)^(n*(n-1)/2)*(2+(-1)^n)) / 2)): n in [1..100]]; // Vincenzo Librandi, Feb 05 2018
  • Mathematica
    LinearRecurrence[{1,0,0,1,-1},{1,3,4,2,5},70] (* Harvey P. Dale, May 10 2014 *)
    Table[Floor[(n - ((-1)^n + (-1)^(n (n - 1) / 2) (2 + (-1)^n)) / 2)], {n, 100}] (* Vincenzo Librandi, Feb 05 2018 *)
  • PARI
    for(n=1, 10000, print1(n - ((-1)^n + (-1)^(n*(n-1)/2)*(2+(-1)^n))/2, ", ")) \\ Guenther Schrack, Oct 18 2017
    

Formula

G.f.: x*(2*x^4 - 2*x^3 + x^2 + 2*x + 1)/((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Nov 08 2012
From Guenther Schrack, Oct 18 2017: (Start)
a(n) = a(n-4) + 4 for n > 4.
a(n) = n + periodic[0,1,1,-2].
a(n) = A092486(A067060(n) - 1) for n > 0.
a(n) = A292576(n) - 2*((-1)^floor(n/2)) for n > 0.
a(A116966(n-1)) = A263449(n-1) for n > 0.
A263449(a(n) - 1) = A116966(n-1) for n > 0.
a(n+2) - a(n) = (-1)^floor(n^2/4)*A132400(n+1) for n > 0.
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5. (End)
a(n) = A298364(n-1) + 1 for n > 1. - Guenther Schrack, Feb 04 2018

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.

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

Original entry on oeis.org

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

Views

Author

Guenther Schrack, Jan 18 2018

Keywords

Comments

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

Crossrefs

Inverse: A292576.
Sequence of fixed points: A008586(n) for n > 0.
First differences: (-1)^floor(n^2/4)*A068073(n-1) for n > 0.
Subsequences:
elements with odd index: A042963(A103889(n)) for n > 0.
elements with even index A014601(n) for n > 0.
odd elements: A166519(n-1) for n > 0.
indices of odd elements: A042964(n) for n > 0.
even elements: A005843(n) for n > 0.
indices of even elements: A042948(n) for n > 0.
Other similar permutations: A116966, A284307, A292576.

Programs

  • MATLAB
    a = [2 3 1 4];
    max = 10000;    % Generation of b-file.
    for n := 5:max
       a(n) = a(n-4) + 4;
    end;
    
  • Mathematica
    Nest[Append[#, #[[-4]] + 4] &, {2, 3, 1, 4}, 63] (* or *)
    Array[# + ((-1)^# + ((-1)^(# (# - 1)/2)) (1 - 2 (-1)^#))/2 &, 67] (* Michael De Vlieger, Jan 23 2018 *)
    LinearRecurrence[{1,0,0,1,-1},{2,3,1,4,6},70] (* Harvey P. Dale, Dec 12 2018 *)
  • PARI
    for(n=1, 100, print1(n + ((-1)^n + ((-1)^(n*(n-1)/2))*(1 - 2*(-1)^n))/2, ", "))

Formula

O.g.f.: (3*x^3 - 2*x^2 + x + 2)/(x^5 - x^4 - x - 1).
a(1) = 2, a(2) = 3, a(3) = 1, a(4) = 4, a(n) = a(n-4) + 4 for n > 4.
a(n) = n + ((-1)^n + ((-1)^(n*(n-1)/2))*(1 - 2*(-1)^n))/2.
a(n) = n + (cos(n*Pi) - cos(n*Pi/2) + 3*sin(n*Pi/2))/2.
a(n) = 2*floor((n+1)/2) - 4*floor((n+1)/4) + floor(n/2) + 2*floor(n/4).
a(n) = n + (-1)^floor((n-1)^2/4)*A140081(n) for n > 0.
a(n) = A056699(n+1) - 1, n > 0.
a(n+2) = A168269(n+1) - a(n), n > 0.
a(n+2) = a(n) + (-1)^floor((n+1)^2/4)*A132400(n+2) for n > 0.
Linear recurrence: a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
First differences: periodic, (1, -2, 3, 2) repeat.
Compositions:
a(n) = A080412(A116966(n-1)) for n > 0.
a(n) = A284307(A256008(n)) for n > 0.
a(A067060(n)) = A133256(n) for n > 0.
A116966(a(n+1)-1) = A092486(n) for n >= 0.
A056699(a(n)) = A256008(n) for n > 0.
Showing 1-4 of 4 results.