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.

A319384 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), a(0)=1, a(1)=5, a(2)=9, a(3)=21, a(4)=29.

Original entry on oeis.org

1, 5, 9, 21, 29, 49, 61, 89, 105, 141, 161, 205, 229, 281, 309, 369, 401, 469, 505, 581, 621, 705, 749, 841, 889, 989, 1041, 1149, 1205, 1321, 1381, 1505, 1569, 1701, 1769, 1909, 1981, 2129, 2205, 2361, 2441, 2605, 2689, 2861, 2949, 3129, 3221, 3409, 3505, 3701, 3801, 4005, 4109, 4321, 4429, 4649, 4761, 4989, 5105, 5341, 5461
Offset: 0

Views

Author

Paul Curtz, Sep 18 2018

Keywords

Comments

The two bisections A136392(n+1)=1,9,29,61, ... and A201279(n)=5,21,49, ... are in the hexagonal spiral based on 2*n+1:
.
67--65--63--61
/ \
69 33--31--29 59
/ / \ \
71 35 11---9 27 57
/ / / \ \ \
73 37 13 1 7 25 55
/ / / / / /
39 15 3---5 23 53
\ \ / /
41 17--19--21 51
\ /
43--45--47--49
.
A201279(n) - A136892(n) = 20*n.

Crossrefs

In the spiral: A003154(n+1), A080859, A126587, A136392, A201279, A227776.
Partial sums of A382154.

Programs

  • Magma
    [(6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4 : n in [0..50]]; // Wesley Ivan Hurt, Jan 19 2021
    
  • Mathematica
    Table[(6 n^2 + 6 n + 5 - (2 n + 1)*(-1)^n)/4, {n, 0, 80}] (* Wesley Ivan Hurt, Jan 07 2021 *)
  • PARI
    Vec((1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2) + O(x^50)) \\ Colin Barker, Jun 05 2019
    
  • Python
    def A319384(n): return (n*(3*n+4)+3 if n&1 else n*(3*n+2)+2)>>1 # Chai Wah Wu, Mar 25 2025

Formula

a(2*n) = A136392(n+1), a(2*n+1) = A201279(n).
a(-n) = a(n).
a(2*n) + a(2*n+1) = 6*A001844(n).
a(n) = (6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4. - Wesley Ivan Hurt, Oct 04 2018
G.f.: (1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2). - Colin Barker, Jun 05 2019
a(n) = A104585(n) + A032766(n+1). - Alex W. Nowak, Jan 08 2021

Extensions

More terms from N. J. A. Sloane, Mar 23 2025

A382155 a(n) = (n+1)! if n <= 2; thereafter a(n) = 4*n if n even or 2*n if n odd.

Original entry on oeis.org

1, 2, 6, 6, 16, 10, 24, 14, 32, 18, 40, 22, 48, 26, 56, 30, 64, 34, 72, 38, 80, 42, 88, 46, 96, 50, 104, 54, 112, 58, 120, 62, 128, 66, 136, 70, 144, 74, 152, 78, 160, 82, 168, 86, 176, 90, 184, 94, 192, 98, 200, 102, 208, 106, 216, 110, 224, 114, 232, 118, 240, 122, 248, 126, 256, 130, 264, 134, 272, 138, 280, 142, 288, 146, 296
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2025

Keywords

Comments

Let G denote the 2-dimensional grid obtained from the square grid Z X Z by deleting the vertices with both coordinates odd and the four edges at each of those vertices (see link). G has vertices with valency either 2 (one coordinate even and one odd, indicated by X) or 4 (both coordinates even, indicated by O). The present sequence is the coordination sequence of G with respect to a vertex of valency 2.
See A382154 for further information.

Crossrefs

Partial sums give A382156.

Programs

  • Mathematica
    Join[{1, 2, 6}, Riffle[4*# + 2, 8*(# + 1)]] & [Range[50]] (* Paolo Xausa, Mar 24 2025 *)
  • Python
    def A382155(n): return (1,2,6)[n] if n<3 else n<<(2>>(n&1)) # Chai Wah Wu, Mar 24 2025

Formula

G.f.: (-2*x^6+5*x^4+2*x^3+4*x^2+2*x+1)/(1-x^2)^2.

A382156 Partial sums of A382155.

Original entry on oeis.org

1, 3, 9, 15, 31, 41, 65, 79, 111, 129, 169, 191, 239, 265, 321, 351, 415, 449, 521, 559, 639, 681, 769, 815, 911, 961, 1065, 1119, 1231, 1289, 1409, 1471, 1599, 1665, 1801, 1871, 2015, 2089, 2241, 2319, 2479, 2561, 2729, 2815, 2991, 3081, 3265, 3359, 3551, 3649, 3849, 3951, 4159, 4265, 4481, 4591, 4815, 4929, 5161, 5279, 5519
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2025

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 2, -2, -1, 1}, {1, 3, 9, 15, 31, 41, 65}, 100] (* Paolo Xausa, Mar 24 2025 *)
Showing 1-3 of 3 results.