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-5 of 5 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

A218342 Decimal expansion of e^-gamma * Product_(1 - 1/(p^3 - p^2 - p + 1)) where the product is over all primes p.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The average order of Carmichael's lambda function is x/log x * exp(B log log x/log log log x (1 + o(1))), where B is this constant. Under the GRH, the same applies to A036391(n)/n, the sum of the orders mod n of the numbers coprime to n divided by n.

Examples

			0.34537206410298648767349682789103371072066562538041...
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 200; m0 = 1000; dm = 200; digits = 105; Clear[f]; f[m_] := f[m] = (slog = Normal[Series[Log[1 - 1/((p - 1)^2*(p + 1))], {p, Infinity, m}]]; Exp[slog] /. Power[p, n_] -> PrimeZetaP[-n] // N[#, digits + 10] &); f[m = m0]; Print[m, " ", f[m]]; f[m = m + dm]; While[Print[m, " ", f[m]]; RealDigits[f[m], 10, digits + 5] !=  RealDigits[f[m - dm], 10, digits + 5], m = m + dm]; B = Exp[-EulerGamma]*f[m]; RealDigits[B, 10, digits] // First (* Jean-François Alcover, Sep 20 2015 *)
  • PARI
    exp(-Euler) * prodeulerrat(1-1/((p-1)^2*(p+1))) \\ Amiram Eldar, Mar 09 2021

Extensions

More digits from Jean-François Alcover, Sep 20 2015

A242925 Numbers k such that lambda(k) divides Sum_{j=1..k} lambda(j).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 16, 18, 19, 20, 24, 30, 31, 34, 40, 42, 44, 60, 72, 80, 83, 130, 132, 136, 195, 208, 218, 232, 254, 258, 259, 260, 264, 272, 276, 305, 306, 408, 420, 440, 464, 504, 560, 585, 586, 594, 595, 609, 624, 636, 715, 819, 840
Offset: 1

Views

Author

Michel Lagneau, May 26 2014

Keywords

Comments

Numbers k such that A162578(k)/A002322(k) = Sum_{j=1..k}A002322(j)/ A002322(k) is an integer where lambda(k) is the Carmichael lambda function (A002322).
The corresponding integers are 1, 2, 2, 3, 6, 3, 10, 4, 21, 10, 16, 17, 15, 6, 28, 76, 60, 9, 19, 98, ...

Examples

			12 is in the sequence because A162578(12)/A002322(12) = 42/2 = 21 is an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=2000:for n from 1 to nn do:p:=lambda(n): s:=sum('lambda(j)', 'j'=1..n):if irem(s,p)=0 then printf(`%d, `,n):else fi:od:
  • Mathematica
    nn = 2000; sums = Accumulate[CarmichaelLambda[Range[nn]]]; Select[Range[nn], Mod[sums[[#]],CarmichaelLambda[#]] == 0 &]

A227975 Numbers m such that m divides Sum_{k=1..m} lambda(k).

Original entry on oeis.org

1, 2, 5, 6, 10, 18, 30, 82, 4866, 8784, 10170, 23364, 76296, 247166, 585570, 735480, 848754, 1559520, 2884840, 11272940, 35642420, 56652788, 174935486, 196398413, 679063441, 1398826844, 1542228164, 1665703953, 2699813692, 5734751503
Offset: 1

Views

Author

Michel Lagneau, Jun 17 2016

Keywords

Comments

lambda(n) is the Carmichael lambda function (A002322). The corresponding ratios (Sum_{k=1..m} lambda(k))/m are given by the sequence {1, 1, 2, 2, 3, 5, 8, 19, 711, 1221, 1399, 3011, 9034, 27187, 61246, 75971, 86971, 154710, 277344, 1015576,...}.
a(31) > 10^10. - Dana Jacobsen, Jul 07 2016

Examples

			5 is in the sequence because 5 divides Sum_{k=1..5} lambda(k) = 1 + 1 + 2 + 2 + 4 = 2*5.
		

Crossrefs

Programs

  • Mathematica
    s = 0; Do[s = s + CarmichaelLambda[n]; If[IntegerQ[s/n], Print[n]], {n, 1, 10^9}]
  • Perl
    use ntheory ":all"; my $v=0; for my $m (1..1e6) { $v=vecsum($v,carmichael_lambda($m)); say $m unless $v % $m; } # Dana Jacobsen, Jul 07 2016

Extensions

More terms from Dana Jacobsen, Jul 07 2016

A306762 Smallest integer k such that Sum_(i=1..k) lambda(i) is divisible by n, where lambda(i) is the Carmichael lambda function.

Original entry on oeis.org

1, 2, 4, 3, 5, 4, 12, 11, 7, 5, 49, 6, 9, 12, 10, 15, 16, 7, 24, 8, 12, 49, 26, 30, 23, 9, 13, 17, 55, 10, 58, 15, 71, 16, 44, 19, 169, 24, 100, 11, 48, 12, 25, 49, 18, 26, 38, 30, 40, 23, 164, 28, 50, 13, 141, 20, 47, 55, 21, 14, 80, 58, 192, 15, 110, 71, 76
Offset: 1

Views

Author

Michel Lagneau, Mar 08 2019

Keywords

Examples

			a(7) = 12 because Sum_{i=1..12} lambda(i) = 1 + 1 + 2 + 2 + 4 + 2 + 6 + 2 + 6 + 4 + 10 + 2 = 42, and 42/7 = 6.
		

Crossrefs

Cf. A002322 (Carmichael lambda), A162578 (partial sums of A002322).
Cf. A053049 (analog with totient function).

Programs

  • Maple
    S:= ListTools:-PartialSums(map(numtheory:-lambda, [$1..500])):
    N:= 100: count:= 0: V:= Vector(N):
    for n from 1 to 500 while count < N do
       d:= select(t -> t <= N and V[t] = 0, numtheory:-divisors(S[n]));
       count:= count + nops(d);
       V[convert(d,list)]:= n;
    od:
    convert(V,list); # Robert Israel, Mar 11 2019
  • Mathematica
    a[n_] := (m = 1; While[! IntegerQ[Sum[CarmichaelLambda[k], {k, 1, m}]/n], m++]; m); a /@ Range[80]
  • PARI
    lambda(n) = lcm(znstar(n)[2]);
    a(n) = {my(k=1, s=lambda(k)); while (s % n, k++; s += lambda(k)); k;} \\ Michel Marcus, Mar 09 2019
Showing 1-5 of 5 results.