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

A270562 a(n) is the largest number m satisfying lambda(m)=n, or zero if there is no solution, where lambda(m) is Carmichael's lambda function A002322(m).

Original entry on oeis.org

2, 24, 0, 240, 0, 504, 0, 480, 0, 264, 0, 65520, 0, 0, 0, 16320, 0, 28728, 0, 13200, 0, 552, 0, 131040, 0, 0, 0, 6960, 0, 171864, 0, 32640, 0, 0, 0, 138181680, 0, 0, 0, 1082400, 0, 151704, 0, 5520, 0, 1128, 0, 4455360, 0, 0, 0, 12720, 0, 86184, 0, 13920, 0, 1416, 0, 6814407600, 0, 0, 0, 65280
Offset: 1

Views

Author

Joerg Arndt, Mar 19 2016

Keywords

Comments

a(n) is the largest modulus m such that the largest order of any element in the multiplicative group modulo m is n; a(n) is zero if there is no such group with largest order n.
Omitting the zeros gives A143407.
a(n) = 0 if n is not a term of A002174.

Crossrefs

See also A321713 (number of solutions).

Programs

  • Mathematica
    a[n_] := Module[{f, fsz, g = 1, h = 1, p, e}, Which[n <= 0, Return[0], n == 1, Return[2], OddQ[n], Return[0]]; f = FactorInteger[n][[All, 1]]; fsz = Length[f]; For[k = 1, k <= fsz, k++, p = f[[k]]; e = 1; While[Mod[n, CarmichaelLambda[p^e]] == 0, e++]; g *= p^(e-1)]; Do[If[PrimeQ[d+1] && Mod[g, d+1] != 0, h *= (d+1)], {d, Divisors[n]}]; g *= h; If[CarmichaelLambda[g] != n, 0, g]];
    a /@ Range[100] (* Jean-François Alcover, Oct 18 2019, after Gheorghe Coserea *)
  • PARI
    lambda(n) = { \\ A002322
    my(f=factor(n), fsz=matsize(f)[1]);
    lcm(vector(fsz, k, my(p=f[k,1], e=f[k,2]);
    if (p != 2, p^(e-1)*(p-1), e > 2, 2^(e-2), 2^(e-1))));
    };
    a(n) = {
    if (n <= 0, return(0), n==1, return(2), n%2, return(0));
    my(f=factor(n), fsz=matsize(f)[1], g=1, h=1);
    for (k=1, fsz, my(p=f[k,1], e=1);
    while (n % lambda(p^e) == 0, e++); g *= p^(e-1));
    fordiv(n, d, if (isprime(d+1) && g % (d+1) != 0, h *= (d+1)));
    g *= h; if (lambda(g) != n, 0, g);
    };
    vector(64, n, a(n)) \\ Gheorghe Coserea, Feb 21 2019

Extensions

Corrected and extended by Gheorghe Coserea, Feb 21 2019
Entry revised by N. J. A. Sloane, May 03 2019

A321714 Numbers k such that lambda(k) = 12.

Original entry on oeis.org

13, 26, 35, 39, 45, 52, 65, 70, 78, 90, 91, 104, 105, 112, 117, 130, 140, 144, 156, 180, 182, 195, 208, 210, 234, 260, 273, 280, 312, 315, 336, 360, 364, 390, 420, 455, 468, 520, 546, 560, 585, 624, 630, 720, 728, 780, 819, 840, 910, 936, 1008, 1040, 1092, 1170, 1260, 1365, 1456, 1560, 1638, 1680, 1820, 1872, 2184, 2340, 2520, 2730, 3120, 3276, 3640, 4095, 4368, 4680, 5040, 5460, 6552, 7280, 8190, 9360, 10920, 13104, 16380, 21840, 32760, 65520
Offset: 1

Views

Author

Gheorghe Coserea, Feb 21 2019

Keywords

Comments

Here lambda is Carmichael's lambda function (see A002322).

Crossrefs

Programs

  • Mathematica
    Select[Range[65520], CarmichaelLambda[#] == 12 &] (* Paolo Xausa, Feb 28 2024 *)
  • PARI
    lambda(n) = { \\ A002322
      my(f=factor(n), fsz=matsize(f)[1]);
      lcm(vector(fsz, k, my(p=f[k,1], e=f[k,2]);
          if (p != 2, p^(e-1)*(p-1), e > 2, 2^(e-2), 2^(e-1))));
    };
    invlambda(n) = { \\ A270562
      if (n <= 0, return(0), n==1, return(2), n%2, return(0));
      my(f=factor(n), fsz=matsize(f)[1], g=1, h=1);
      for (k=1, fsz, my(p=f[k,1], e=1);
        while (n % lambda(p^e) == 0, e++); g *= p^(e-1));
      fordiv(n, d, if (isprime(d+1) && g % (d+1) != 0, h *= (d+1)));
      g *= h; if (lambda(g) != n, 0, g);
    };
    lambda_level(n) = {
      my(N = invlambda(n)); if (!N, return([])); my(s=List());
      fordiv(N, d, if (lambda(d) == n, listput(s, d)));
      Set(s);
    };
    lambda_level(12)
Showing 1-2 of 2 results.