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.

A322465 Numbers on the 0-9-10-line in a spiral on an equilateral triangular lattice.

Original entry on oeis.org

0, 9, 10, 31, 32, 65, 66, 111, 112, 169, 170, 239, 240, 321, 322, 415, 416, 521, 522, 639, 640, 769, 770, 911, 912, 1065, 1066, 1231, 1232, 1409, 1410, 1599, 1600, 1801, 1802, 2015, 2016, 2241, 2242, 2479, 2480, 2729, 2730, 2991, 2992, 3265, 3266, 3551, 3552
Offset: 0

Views

Author

Hans G. Oberlack, Dec 09 2018

Keywords

Comments

Sequence found by reading the line from 0, in the direction 0, 9, 10, ... in the triangle spiral.

Crossrefs

Bisection (even part) gives A202804.

Programs

  • Maple
    a:= n-> `if`(n::even, n*((3/2)*n+2), (n+1)*((3/2)*(n+1)+2)-1): seq(a(n), n=0..50); # Muniru A Asiru, Dec 20 2018
  • PARI
    concat(0, Vec(x*(9 + x + 3*x^2 - x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Dec 18 2018

Formula

For even n: a(n) = n*((3/2)*n+2).
For odd n: a(n) = a(n+1)-1 = (n+1)*((3/2)*(n+1)+2)-1.
From Colin Barker, Dec 18 2018: (Start)
G.f.: x*(9 + x + 3*x^2 - x^3) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
(End)