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-4 of 4 results.

A002322 Reduced totient function psi(n): least k such that x^k == 1 (mod n) for all x prime to n; also known as the Carmichael lambda function (exponent of unit group mod n); also called the universal exponent of n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 2, 6, 4, 10, 2, 12, 6, 4, 4, 16, 6, 18, 4, 6, 10, 22, 2, 20, 12, 18, 6, 28, 4, 30, 8, 10, 16, 12, 6, 36, 18, 12, 4, 40, 6, 42, 10, 12, 22, 46, 4, 42, 20, 16, 12, 52, 18, 20, 6, 18, 28, 58, 4, 60, 30, 6, 16, 12, 10, 66, 16, 22, 12, 70, 6, 72, 36, 20, 18, 30, 12, 78, 4, 54
Offset: 1

Views

Author

Keywords

Comments

a(n) is the largest order of any element in the multiplicative group modulo n. - Joerg Arndt, Mar 19 2016
Largest period of repeating digits of 1/n written in different bases (i.e., largest value in each row of square array A066799 and least common multiple of each row). - Henry Bottomley, Dec 20 2001

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 53.
  • Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 269.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002322 n = foldl lcm 1 $ map (a207193 . a095874) $
                              zipWith (^) (a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Magma
    [1] cat [ CarmichaelLambda(n) : n in [2..100]];
    
  • Maple
    with(numtheory); A002322 := lambda; [seq(lambda(n), n=1..100)];
  • Mathematica
    Table[CarmichaelLambda[k], {k, 50}] (* Artur Jasinski, Apr 05 2008 *)
  • PARI
    A002322(n)= lcm( apply( f -> (f[1]-1)*f[1]^(f[2]-1-(f[1]==2 && f[2]>2)), Vec(factor(n)~))) \\ M. F. Hasler, Jul 05 2009
    
  • PARI
    a(n)=lcm(znstar(n)[2]) \\ Charles R Greathouse IV, Aug 04 2012
    
  • Python
    from sympy import reduced_totient
    def A002322(n): return reduced_totient(n) # Chai Wah Wu, Feb 24 2021

Formula

If M = 2^e*P1^e1*P2^e2*...*Pk^ek, lambda(2^e) = 2^(e-1) if e=1 or 2, = 2^(e-2) if e > 2; lambda(M) = lcm(lambda(2^e), (P1-1)*P1^(e1-1), (P2-1)*P2^(e2-1), ..., (Pk-1)*Pk^(ek-1)).
a(n) = lcm_{k=1..A001221(n)} A207193(A095874(A027748(n,k)^A124010(n,k))). - Reinhard Zumkeller, Feb 16 2012

A036391 a(n) = sum of order of a mod n, 0 < a < n, gcd(a, n) = 1.

Original entry on oeis.org

0, 1, 3, 3, 11, 3, 21, 7, 21, 11, 63, 7, 77, 21, 23, 23, 171, 21, 183, 23, 49, 63, 333, 15, 231, 77, 183, 49, 473, 23, 441, 87, 147, 171, 161, 49, 671, 183, 161, 47, 903, 49, 903, 147, 161, 333, 1521, 47, 903, 231, 343, 161, 1727, 183, 483, 105, 427, 473, 2439, 47
Offset: 1

Views

Author

Keywords

Comments

Related to a problem of Arnold.
Row sums of triangle A139366. - Wolfdieter Lang, Sep 09 2008

Programs

  • Haskell
    a036391 = sum . a139366_row  -- Reinhard Zumkeller, May 01 2013
  • Maple
    with(numtheory):
    a:= n-> add(`if`(igcd(n, k)=1, order(k, n), 0), k=1..n-1):
    seq(a(n), n=1..60);  # Alois P. Heinz, Oct 28 2012
  • Mathematica
    a[n_] := Sum[ If[ CoprimeQ[k, n], MultiplicativeOrder[k, n], 0], {k, 1, n-1}]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Aug 19 2013 *)

Formula

On the GRH, Kurlberg & Pomerance show that a(n) = n^2/log n exp(B log log n/log log log n (1 + o(1))), where B = A218342 = 0.345372.... - Charles R Greathouse IV, Oct 26 2012
If n is in A033948 then a(n) = Sum_{divisors d of phi(n)} phi(d)*d. - Geoffrey Critzer, Jan 24 2015

Extensions

Adapted to the definition: a(1)=0 by Alois P. Heinz, Oct 28 2012

A162578 Partial sums of A002322.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 20, 26, 30, 40, 42, 54, 60, 64, 68, 84, 90, 108, 112, 118, 128, 150, 152, 172, 184, 202, 208, 236, 240, 270, 278, 288, 304, 316, 322, 358, 376, 388, 392, 432, 438, 480, 490, 502, 524, 570, 574, 616, 636, 652, 664, 716, 734, 754, 760, 778
Offset: 1

Views

Author

Jonathan Vos Post, Jul 06 2009

Keywords

Crossrefs

Programs

  • Maple
    read("transforms3") ; a002322 := BFILETOLIST("b002322.txt") : A162578 :=proc(n) global a002322 ; local i; add(op(i,a002322),i=1..n) ; end: seq(A162578(n),n=1..120) ; # R. J. Mathar, Jul 16 2009
  • Mathematica
    Accumulate[CarmichaelLambda[Range[60]]] (* Harvey P. Dale, Sep 21 2011 *)
  • PARI
    a(n) = sum(i=1, n, lcm(znstar(i)[2])) \\ Felix Fröhlich, Jul 04 2018

Formula

a(n) = Sum_{k=1..n} A002322(k).
a(n) = (n^2/log(n)) * exp(B * (log(log(n))/log(log(log(n)))) * (1 + o(1))), where B = A218342 (Erdős et al., 1991). - Amiram Eldar, Dec 27 2022

Extensions

a(13) corrected and more terms added by R. J. Mathar, Jul 16 2009

A359147 Partial sums of A002326.

Original entry on oeis.org

1, 3, 7, 10, 16, 26, 38, 42, 50, 68, 74, 85, 105, 123, 151, 156, 166, 178, 214, 226, 246, 260, 272, 295, 316, 324, 376, 396, 414, 472, 532, 538, 550, 616, 638, 673, 682, 702, 732, 771, 825, 907, 915, 943, 954, 966, 976, 1012, 1060, 1090, 1190, 1241, 1253, 1359, 1395, 1431
Offset: 0

Views

Author

N. J. A. Sloane, Feb 14 2023

Keywords

Comments

a(n)/n is the average order of 2 mod m, averaged over all odd numbers m from 1 to 2n+1. From Kurlberg-Pomerance (2013), this is of order constant*n/log(n). So the graph of this sequence grows like constant*n^2/log(n). [The asymptotic formula involves the constant B = 0.3453720641..., A218342. - Amiram Eldar, Feb 15 2023]

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n=0, 1, a(n-1)+numtheory[order](2, 2*n+1))
        end:
    seq(a(n), n=0..55);  # Alois P. Heinz, Feb 14 2023
  • Mathematica
    Accumulate[MultiplicativeOrder[2,#]&/@Range[1,151,2]] (* Harvey P. Dale, Jul 08 2023 *)
  • PARI
    a(n) = sum(k = 0, n, if(k<0, 0, znorder(Mod(2, 2*k+1)))) \\ Thomas Scheuerle, Feb 14 2023
    
  • Python
    from sympy import n_order
    def A359147(n): return sum(n_order(2,m) for m in range(1,n+1<<1,2)) # Chai Wah Wu, Feb 14 2023

Formula

a(n) = Sum_{k = 0..n} A007733(2*k+1). - Thomas Scheuerle, Feb 15 2023
Showing 1-4 of 4 results.