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.

A132742 Triangle T(n,m) = 1 + ((2*n*3^m) mod 12), read by rows.

Original entry on oeis.org

1, 3, 7, 5, 1, 1, 7, 7, 7, 7, 9, 1, 1, 1, 1, 11, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 3, 7, 7, 7, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Nov 17 2007

Keywords

Comments

T(n,m) differs from A132728 in the order in which n and m are handled.

Examples

			n\m|  0   1   2   3   4   5   6   7   8
---+-----------------------------------
0  |  1
1  |  3   7
2  |  5   1   1
3  |  7   7   7   7
4  |  9   1   1   1   1
5  | 11   7   7   7   7   7
6  |  1   1   1   1   1   1   1
7  |  3   7   7   7   7   7   7   7
9  |  5   1   1   1   1   1   1   1   1
...
		

Crossrefs

Programs

  • GAP
    Flat(List([0..20], n->List([0..n], m->(1 + ((2*n*3^m) mod 12))))); # Stefano Spezia, Dec 26 2018
    
  • Magma
    [([1 + ((2*n*3^k) mod 12): k in [0..n]]): n in [0..20]]; // Stefano Spezia, Dec 26 2018
    
  • Magma
    A132742:= func< n,k | 1 + ((2*n*3^k) mod 12) >;
    [A132742(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 15 2021
  • Maple
    a := (n, m) -> (1 + ((2*n*3^m) mod 12)): seq(seq(a(n, m), m = 0 .. n), n = 0 .. 20) # Stefano Spezia, Dec 26 2018
  • Mathematica
    Flatten[Table[1 + Mod[2*n*3^m, 12], {n,0,20}, {m, 0, n}]] (* modified by G. C. Greubel, Feb 15 2021 *)
  • Maxima
    sjoin(v, j) := apply(sconcat, rest(join(makelist(j, length(v)), v))); display_triangle(n) := for i from 0 thru n do disp(sjoin(makelist(1 + mod(2*i*3^j, 12), j, 0, i), " ")); display_triangle(20); /* Stefano Spezia, Dec 26 2018 */
    
  • PARI
    T(n, m) = 1 + ((2*n*3^m) % 12); \\ Stefano Spezia, Dec 26 2018
    

Formula

T(n,m) = 1 + ((2*n*3^m) mod 12).
T(n,m) = 1 + ((A005843(n)*A000244(m)) mod 12). - Stefano Spezia, Dec 26 2018
Bivariate g.f.: -(4*x^7*y^2 + 8*x^6*y^2 - x^6*y - 7*x^5*y + 4*x^4*y^2 - 11*x^5 - x^4*y - 4*x^3*y^2 - 9*x^4 - 7*x^3*y - 7*x^3 - x^2*y - 5*x^2 - 7*x*y - 3*x - 1)/((1 - x^6)*(1 - x^2*y^2)). - J. Douglas Morrison, Jul 24 2021

Extensions

Edited by Stefano Spezia, Dec 26 2018