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.

A003571 Order of 3 mod 3n+1.

Original entry on oeis.org

1, 2, 6, 4, 3, 4, 18, 5, 20, 6, 30, 16, 18, 4, 42, 11, 42, 6, 20, 28, 10, 16, 22, 12, 12, 18, 78, 8, 16, 10, 6, 23, 48, 20, 34, 52, 27, 12, 44, 29, 5, 30, 126, 12, 18, 16, 138, 35, 28, 18, 50, 30, 78, 8, 162, 41, 39, 42, 60, 88, 45, 22, 80, 36, 16, 42, 198, 100, 8
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    List([0..70],n->OrderMod(3,3*n+1)); # Muniru A Asiru, Feb 16 2019
    
  • Maple
    a := n -> `if`(n=0, 1, numtheory:-order(3, 3*n+1)):
    seq(a(n), n = 0..68);
  • Mathematica
    Table[MultiplicativeOrder[3, 3*n + 1], {n, 0, 68}] (* Arkadiusz Wesolowski, Nov 27 2012 *)
  • PARI
    a(n) = znorder(Mod(3, 3*n+1)); \\ Michel Marcus, Feb 16 2019
  • Sage
    def A003571(n):
        s, m, N = 0, 1, 3*n + 1
        while True:
            k = N + m
            v = valuation(k, 3)
            s += v
            m = k // 3^v
            if m == 1: break
        return s
    print([A003571(n) for n in (0..68)]) # Peter Luschny, Oct 07 2017
    

Extensions

a(0) = 1 added by Peter Luschny, Oct 07 2017