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.

A282728 Irregular triangle read by rows: row n gives "digits" d_1, d_2, d_3, ... of the 3-expansion of A282720(n).

Original entry on oeis.org

1, 3, 6, 2, 3, 2, 7, 4, 6, 4, -2, -7, 2, 2, 3, 2, 2, 8, 2, 4, 9, 6, -2, -1, 4, 4, 6, 4, -6, 2, 1, 4, -2, -4, -9, 4, -2, -2, -8, 2, 2, 2, 3, 2, 2, 2, 9, 2, 2, 4, 12, 2, 6, -2, 5, 2, 4, 6, 9, 6, -6, 4, 8, 6, -2, 0, -3, 6, 2, -4, -15, 4, 4, 4, 6, 4, -6, -2, 4, 15, 4, -6, 2, 0, 3
Offset: 1

Views

Author

N. J. A. Sloane, Mar 03 2017

Keywords

Examples

			Triangle begins:
  1;
  3;
  6;
  2,  3;
  2,  7;
  4,  6;
  4, -2, -7;
  ...
		

Crossrefs

Cf. A282720.

Programs

  • PARI
    add(v, w) = v = Vecrev(v); w = Vecrev(w); my(z = if (#v == #w, v+w, if (#v < #w, Vec(v,#w) + w, Vec(w, #v) + v))); Vecrev(z);
    row(n) = if (n==0, return([])); if (n==1, return([1])); my(e = logint(n, 2), r = n-2^e); if (r <= 2^(e-1), add(2*digits(3^(e-1), 3), add(a(2^(e-1)+r), a(r))), add(4*digits(3^e, 3), add(-digits(2*3^(e-1), 3), add(-a(2^(e-1)+2^e-r), -a(2^e-r))))); \\ Michel Marcus, Feb 25 2025

Extensions

More terms from Michel Marcus, Feb 25 2025