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.

Previous Showing 21-30 of 308 results. Next

A077197 a(n) = lambda(phi(n)) where lambda(n) (A002322) is the Carmichael lambda function which gives the smallest integer m such that k^m = 1 mod n for all integers k relatively prime to n and phi(n) is A000010.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 6, 2, 2, 4, 10, 2, 4, 2, 6, 2, 6, 2, 4, 4, 4, 4, 2, 2, 6, 6, 2, 4, 4, 2, 6, 4, 2, 10, 22, 4, 6, 4, 8, 2, 12, 6, 4, 2, 6, 6, 28, 4, 4, 4, 6, 8, 4, 4, 10, 8, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 8, 18, 4, 40, 2, 16, 6, 6, 4, 10, 2, 6, 10, 4, 22, 6, 8
Offset: 1

Views

Author

Joseph L. Pe, Nov 29 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[CarmichaelLambda[EulerPhi[n]], {n, 1, 100}]
  • PARI
    a(n)=lcm(znstar(eulerphi(n))[2]) \\ Charles R Greathouse IV, Feb 21 2013

A173927 Smallest integer k such that the number of iterations of Carmichael lambda function (A002322) needed to reach 1 starting at k (k is counted) is n.

Original entry on oeis.org

1, 2, 3, 5, 11, 23, 47, 283, 719, 1439, 2879, 34549, 138197, 531441, 1594323, 4782969, 14348907, 43046721, 86093443, 258280327, 688747547
Offset: 1

Views

Author

Michel Lagneau, Nov 26 2010

Keywords

Comments

Smallest number k such that the trajectory of k under iteration of Carmichael lambda function contains exactly n distinct numbers (including k and the fixed point).
The first 13 terms are 1 or a prime. The next five terms are powers of 3. Then another prime. What explains this behavior? - T. D. Noe, Mar 23 2012
A185816(a(n)) = n - 1. - Reinhard Zumkeller, Sep 02 2014
If a(n) (n > 1) is either a prime or a power of 3, then a(n) is also the smallest integer k such that the number of iterations of Euler's totient function (A000010) needed to reach 1 starting at k (k is counted) is n. - Jianing Song, Jul 10 2019

Examples

			for n=5, a(5)=11 gives a chain of length 5 because the trajectory is 11 -> 10 -> 4 -> 2 -> 1.
		

Crossrefs

Cf. A185816 (number of iterations of Carmichael lambda function needed to reach 1), A003434 (number of iterations of Euler's totient function needed to reach 1).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a173927 = (+ 1) . fromJust . (`elemIndex` map (+ 1) a185816_list)
    -- Reinhard Zumkeller, Sep 02 2014
  • Mathematica
    f[n_] := Length@ NestWhileList[ CarmichaelLambda, n, Unequal, 2] - 1; t = Table[0, {30}]; k = 1; While[k < 2100000001, a = f@ k; If[ t[[a]] == 0, t[[a]] = k; Print[a, " = ", k]]; k++] (* slightly modified by Robert G. Wilson v, Sep 01 2014 *)

Extensions

a(20)-a(21) from Robert G. Wilson v, Sep 01 2014

A181776 a(n) = lambda(lambda(n)), where lambda(n) is the Carmichael lambda function (A002322).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 4, 1, 2, 2, 2, 2, 4, 2, 6, 2, 2, 4, 10, 1, 4, 2, 6, 2, 6, 2, 4, 2, 4, 4, 2, 2, 6, 6, 2, 2, 4, 2, 6, 4, 2, 10, 22, 2, 6, 4, 4, 2, 12, 6, 4, 2, 6, 6, 28, 2, 4, 4, 2, 4, 2, 4, 10, 4, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 2, 18, 4, 40, 2, 4, 6, 6
Offset: 1

Views

Author

Michel Lagneau, Nov 12 2010

Keywords

Comments

Harland proves the conjecture of Martin & Pomerance that a(n) = n exp ((1 + o(1))(log log n)^2 log log log n) for almost all n, as well as a generalization to k-th iterates. - Charles R Greathouse IV, Dec 21 2011

Examples

			a(11) = 4 is in the sequence because A002322(11) = 10 and A002322(10) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[CarmichaelLambda[CarmichaelLambda[n]],{n,1,100}]
    Table[Nest[CarmichaelLambda,n,2],{n,100}] (* Harvey P. Dale, Jul 01 2020 *)
  • PARI
    a(n)=lcm(znstar(lcm(znstar(n)[2]))[2]) \\ Charles R Greathouse IV, Nov 04 2012

A231570 Composite numbers n such that lambda(n) divides 3n-3, where lambda is the Carmichael lambda function (A002322).

Original entry on oeis.org

9, 21, 45, 63, 65, 105, 117, 133, 231, 273, 341, 481, 561, 585, 645, 651, 1001, 1105, 1281, 1365, 1541, 1729, 2465, 2821, 3201, 3605, 4033, 4371, 4641, 4921, 5461, 5565, 6305, 6533, 6601, 7107, 7161, 8321, 8911, 10585, 11041, 12545, 13333, 13833, 14981
Offset: 1

Views

Author

Keywords

Comments

Conjecture: the relative asymptotic density of the Carmichael numbers in this sequence exists, is positive and smaller than 1.

Crossrefs

Programs

  • Mathematica
    Select [1 + Range[100000], ! PrimeQ[#] && IntegerQ[3 (# -1)/ CarmichaelLambda[#]] &]
  • PARI
    is(n)=!isprime(n) && (3*n-3)%lcm(znstar(n)[2])==0 && n>1 \\ Charles R Greathouse IV, Nov 13 2013

A231572 Composite numbers n such that lambda(n) divides 5n-5, where lambda is the Carmichael lambda function (A002322).

Original entry on oeis.org

25, 33, 165, 217, 325, 385, 561, 793, 825, 1025, 1045, 1065, 1105, 1353, 1525, 1705, 1729, 2465, 2665, 2821, 3565, 4123, 4681, 5005, 5185, 5425, 6601, 6697, 8029, 8569, 8911, 9073, 10585, 11005, 12025, 12505, 12801, 13237, 13741, 14707, 14725, 14905, 15457
Offset: 1

Views

Author

Keywords

Comments

Contains the Carmichael numbers (A002997).
Conjecture: the relative asymptotic density of the Carmichael numbers in this sequence exists, is positive and smaller than 1.

Crossrefs

Programs

  • Mathematica
    Select [1 + Range[100000], ! PrimeQ[#] && IntegerQ[5 (# -1)/ CarmichaelLambda[#]] &]
  • PARI
    is(n)=!isprime(n) && (5*n-5)%lcm(znstar(n)[2])==0 && n>1 \\ Charles R Greathouse IV, Nov 13 2013

A231573 Composite numbers n such that lambda(n) divides 6n-6, where lambda is the Carmichael lambda function (A002322).

Original entry on oeis.org

4, 6, 8, 9, 12, 14, 15, 18, 21, 24, 28, 35, 36, 39, 42, 45, 56, 63, 65, 66, 72, 76, 84, 91, 105, 117, 126, 133, 153, 168, 186, 195, 231, 247, 252, 259, 273, 276, 315, 341, 344, 396, 435, 455, 481, 504, 532, 561, 585, 616, 645, 651, 671, 703, 804, 819, 861
Offset: 1

Views

Author

Keywords

Comments

Contains the Carmichael numbers, A231569 and A231570.
Conjecture: the relative asymptotic density of Carmichael numbers in this sequence exists, is positive and smaller than 1.

Crossrefs

Programs

  • Mathematica
    Select [1 + Range[100000], ! PrimeQ[#] && IntegerQ[6 (# -1)/ CarmichaelLambda[#]] &]
  • PARI
    is(n)=!isprime(n) && (6*n-6)%lcm(znstar(n)[2])==0 && n>1 \\ Charles R Greathouse IV, Nov 13 2013

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

A289624 a(n) = A002322(n)/A007947(A034380(n)).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 1, 6, 4, 10, 1, 12, 6, 2, 2, 16, 6, 18, 2, 3, 10, 22, 1, 20, 12, 18, 3, 28, 2, 30, 4, 5, 16, 6, 3, 36, 18, 6, 2, 40, 3, 42, 5, 6, 22, 46, 2, 42, 20, 8, 6, 52, 18, 10, 3, 9, 28, 58, 2, 60, 30, 1, 8, 6, 5, 66, 8, 11, 6, 70, 3, 72, 36, 10, 9, 15, 6, 78, 2, 54, 40, 82, 3, 8, 42, 14, 5, 88, 6, 2, 11, 15, 46
Offset: 1

Views

Author

Antti Karttunen, Jul 17 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A002322(n) / A007947(A034380(n)) = A002322(n) / A007947(A000010(n) / A002322(n)).

A306414 a(n) = psi(A002997(n)), psi = A002322.

Original entry on oeis.org

80, 48, 36, 112, 60, 1320, 198, 504, 360, 180, 120, 288, 1224, 2024, 36, 240, 300, 720, 72, 2320, 60, 108, 600, 112, 216, 1980, 8568, 528, 420, 6120, 2268, 360, 540, 3360, 240, 4900, 2160, 396, 432, 144, 300, 120, 576, 2970, 612, 396, 648, 630, 1260, 1080, 1008
Offset: 1

Views

Author

Jianing Song, Feb 13 2019

Keywords

Comments

By definition, A002997 lists the composite numbers k such that psi(k) divides k - 1. This sequence lists the values for psi(k) when k runs through A002997.

Examples

			A002997(1) = 561, psi(561) = 80, 561 = 7*80 + 1.
A002997(2) = 1105, psi(1105) = 48, 1105 = 23*48 + 1.
A002997(3) = 1729, psi(1729) = 36, 1729 = 48*36 + 1.
A002997(4) = 2465, psi(2465) = 112, 2465 = 22*112 + 1.
		

Crossrefs

Programs

  • Mathematica
    seq[kmax_] := Module[{s = {}, lam}, Do[If[CompositeQ[k], lam = CarmichaelLambda[k]; If[Mod[k, lam] == 1, AppendTo[s, lam]]], {k, 9, kmax, 2}]; s]; seq[10^6] (* Amiram Eldar, Nov 14 2023 *)
  • PARI
    forstep(n=3, 1e6, 2, my(m=lcm(znstar(n)[2])); if((n-1)%m==0 && !isprime(n), print1(m, ", ")))

Formula

a(n) = A002322(A002997(n)).
a(n) = (A002997(n) - 1) / A174590(n). - Jianing Song, Dec 12 2021

A317210 Composite numbers k+1 such that A002322(A027760(k)) = k.

Original entry on oeis.org

21, 45, 49, 81, 85, 91, 93, 111, 117, 121, 133, 141, 145, 165, 175, 177, 201, 205, 209, 213, 217, 221, 231, 235, 247, 253, 261, 265, 273, 289, 291, 301, 309, 319, 325, 333, 357, 361, 365, 369, 381, 391, 411, 415, 441, 445, 451, 453, 465, 469, 477, 481, 493
Offset: 1

Views

Author

Max Alekseyev and Thomas Ordowski, Jul 09 2018

Keywords

Comments

Also, composite numbers n such that LCM( p-1 : prime p|A027642(n-1) ) = n-1. Also, composite numbers n such that LCM( p-1 : p is prime & (p-1)|(n-1) ) = n-1. - Max Alekseyev, Dec 03 2021
Contains all Carmichael numbers except 2628073, 3224065, 23382529, 182356993, 1419339691, ...

Crossrefs

Programs

  • Mathematica
    1 + Select[Range[500], CompositeQ[# + 1] && CarmichaelLambda[ Times @@ Select[1 + Divisors@ #, PrimeQ]] == # &] (* Giovanni Resta, Aug 13 2018 *)
  • PARI
    a027760(n) = denominator(sumdiv(n, d, if(isprime(d+1), 1/(d+1))));
    a002322(n) = lcm(znstar(n)[2]);
    isok(n) = !isprime(n) && (n--) && !frac(a002322(a027760(n))/n); \\ Michel Marcus, Aug 13 2018

Extensions

More terms from Giovanni Resta, Aug 13 2018
Previous Showing 21-30 of 308 results. Next