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.

A195013 Multiples of 2 and of 3 interleaved: a(2n-1) = 2n, a(2n) = 3n.

Original entry on oeis.org

2, 3, 4, 6, 6, 9, 8, 12, 10, 15, 12, 18, 14, 21, 16, 24, 18, 27, 20, 30, 22, 33, 24, 36, 26, 39, 28, 42, 30, 45, 32, 48, 34, 51, 36, 54, 38, 57, 40, 60, 42, 63, 44, 66, 46, 69, 48, 72, 50, 75, 52, 78, 54, 81, 56, 84, 58, 87, 60, 90, 62, 93, 64, 96, 66, 99, 68, 102
Offset: 1

Views

Author

Omar E. Pol, Sep 09 2011

Keywords

Comments

First differences of A195014.

Crossrefs

Cf. A111712 (partial sums of this sequence prepended with 1).

Programs

  • Haskell
    import Data.List (transpose)
    a195013 n = a195013_list !! (n-1)
    a195013_list = concat $ transpose [[2, 4 ..], [3, 6 ..]]
    -- Reinhard Zumkeller, Apr 06 2015
    
  • Magma
    &cat[[2*n,3*n]: n in [1..34]]; // Bruno Berselli, Sep 25 2011
    
  • Mathematica
    With[{r = Range[50]}, Riffle[2*r, 3*r]] (* or *)
    LinearRecurrence[{0, 2, 0, -1}, {2, 3, 4, 6}, 100] (* Paolo Xausa, Feb 09 2024 *)
  • PARI
    a(n)=(5*n+(n-2)*(-1)^n+2)/4 \\ Charles R Greathouse IV, Sep 24 2015

Formula

Pair(2*n, 3*n).
From Bruno Berselli, Sep 26 2011: (Start)
G.f.: x*(2+3*x)/(1-x^2)^2.
a(n) = (5*n+(n-2)*(-1)^n+2)/4.
a(n) = 2*a(n-2) - a(n-4) = a(n-2) + A010693(n-1).
a(n)+a(-n) = A010673(n).
a(n)-a(-n) = A106832(n). (End)