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

A270564 Terms of A143407, sorted.

Original entry on oeis.org

2, 24, 240, 264, 480, 504, 552, 1128, 1416, 1992, 2568, 4008, 4296, 5448, 5520, 5736, 6312, 6960, 8328, 8616, 9192, 10632, 11208, 11280, 11496, 12072, 12408, 12720, 13200, 13512, 13920, 14088, 14160, 15528, 15576, 15816, 16320, 17256, 18744, 19848, 19920, 20136, 20712, 21288, 21912, 22560, 23592
Offset: 1

Views

Author

Joerg Arndt, Mar 19 2016

Keywords

Comments

Numbers m such that r is the maximal order in the multiplicative group modulo m and there is no M > m with the same maximal order modulo M.

Crossrefs

A002174 Values taken by reduced totient function psi(n).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 28, 30, 32, 36, 40, 42, 44, 46, 48, 52, 54, 56, 58, 60, 64, 66, 70, 72, 78, 80, 82, 84, 88, 90, 92, 96, 100, 102, 104, 106, 108, 110, 112, 116, 120, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 156, 160, 162, 164, 166, 168
Offset: 1

Views

Author

Keywords

Comments

If p is a Sophie Germain prime (A005384), then 2p is here. - T. D. Noe, Aug 13 2008
Terms of A002322, sorted and multiple values taken just once. - Vladimir Joseph Stephan Orlovsky, Jul 21 2009
a(2445343) = 10^7, suggesting that Luca & Pomerance's lower bound may be closer to the truth than the upper bound. The fit exponent log a(n)/log n - 1 = 0.0957... in this case. - Charles R Greathouse IV, Jul 02 2017

References

  • 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

  • Mathematica
    lst={}; Do[AppendTo[lst, CarmichaelLambda[n]], {n, 6*7!}]; lst; Take[Union[lst], 123] (* Vladimir Joseph Stephan Orlovsky, Jul 21 2009 *)
    (* warning: there seems to be no guarantee that no terms near the end are omitted! - Joerg Arndt, Dec 23 2014 *)
    TakeWhile[Union@ Table[CarmichaelLambda@ n, {n, 10^6}], # <= 168 &] (* Michael De Vlieger, Mar 19 2016 *)
  • PARI
    list(lim)=my(v=List([1]),u,t); forprime(p=3,lim\3+1, u=List(); listput(u,p-1); while((t=u[#u]*p)<=lim, listput(u,t)); for(j=1,#v, for(i=1,#u, t=lcm(u[i],v[j]); if(t<=lim && t!=v[j], listput(v,t)))); v=List(Set(v))); forprime(p=lim\3+2,lim+1, listput(v,p-1)); v=List(Set(v)); for(i=1,#v, t=2*v[i]; if(t>lim, break); listput(v,t); while((t*=2)<=lim, listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jun 23 2017
    
  • PARI
    is(n)=if(n%2, return(n==1)); my(f=factor(n),pe); for(i=1,#f~, if(n%(f[i,1]-1)==0, next); pe=f[i,1]^f[i,2]; forstep(q=2*pe+1,n+1,2*pe, if(n%(q-1)==0 && isprime(q), next(2))); return(0)); 1 \\ Charles R Greathouse IV, Jun 25 2017

Formula

n (log n)^0.086 << a(n) << n (log n)^0.36 where << is the Vinogradov symbol, see Luca & Pomerance. - Charles R Greathouse IV, Dec 28 2013

Extensions

More terms from T. D. Noe, Aug 13 2008

A079612 Largest number m such that a^n == 1 (mod m) whenever a is coprime to m.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 29 2003

Keywords

Comments

a(m) divides the Jordan function J_m(n) for all n except when n is a prime dividing a(m) or m=2, n=4; it is the largest number dividing all but finitely many values of J_m(n). For m > 0, a(m) also divides Sum_{k=1}^n J_m(k) for n >= the largest exceptional value. - Franklin T. Adams-Watters, Dec 10 2005
The numbers m with this property are the divisors of a(n) that are not divisors of a(r) for r

References

  • R. C. Vaughan and T. D. Wooley, Waring's problem: a survey, pp. 285-324 of Surveys in Number Theory (Urbana, May 21, 2000), ed. M. A. Bennett et al., Peters, 2003. (The function K(n), see p. 303.)

Crossrefs

Cf. A006863 (bisection except for initial term); A059379 (Jordan function).

Programs

  • PARI
    a(n) = {if (n%2, 2, res = 1; forprime(p=2, n+1, if (!(n % (p-1)), t = valuation(n, p); if (p==2, if (t, res *= p^(t+2)), res *= p^(t+1)););); res;);} \\ Michel Marcus, May 12 2018

Formula

a(n) = 2 for n odd; for n even, a(n) = product of 2^(t+2) (where 2^t exactly divides n) and p^(t+1) (where p runs through all odd primes such that p-1 divides n and p^t exactly divides n).
From Antti Karttunen, Dec 19 2018: (Start)
a(n) = A185633(n)*(2-A000035(n)).
It also seems that for n > 1, a(n) = 2*A075180(n-1). (End)
We have 2*A075180(2n-1) = A006863(n) by definition, and A006863(n) = a(2n) by the comments in A006863. Hence a(n) = 2*A075180(n-1) for all even n. For all odd n > 1, we have a(n) = 2, which is also equal to 2*A075180(n-1). So the formula above is true. - Jianing Song, Apr 05 2021

Extensions

Edited by Franklin T. Adams-Watters, Dec 10 2005
Definition corrected by T. D. Noe, Aug 13 2008
Rather arbitrary term a(0) removed by Max Alekseyev, May 27 2010

A143408 Number of numbers k such that the reduced totient function psi(k) = A002174(n).

Original entry on oeis.org

2, 6, 12, 16, 4, 8, 84, 32, 40, 32, 8, 20, 20, 64, 8, 480, 80, 48, 12, 8, 160, 20, 16, 4, 8, 1216, 8, 64, 16, 872, 24, 160, 8, 532, 52, 120, 12, 424, 100, 24, 4, 8, 944, 24, 144, 12, 1912, 272, 8, 16, 276, 24, 64, 144, 1856, 20, 96, 1276, 40, 112, 12, 8, 116, 20, 16, 96, 8
Offset: 1

Author

T. D. Noe, Aug 13 2008

Keywords

Comments

a(n) is the number of divisors of A143407(n) that are not divisors of A143407(r) for r

Examples

			Because A002174(5)=8 and psi(k)=8 for k=32,96,160,480, we have a(5)=4.
		

Crossrefs

Cf. A002322 (reduced totient function), A079612.

Programs

  • PARI
    a079612(n) = {if (n%2, 2, res = 1; forprime(p=2, n+1, if (!(n % (p-1)), t = valuation(n, p); if (p==2, if (t, res *= p^(t+2)), res *= p^(t+1)););); res;);}
    nb(n) = sumdiv(n, d, moebius(n/d)*numdiv(a079612(d)));
    lista(nn) = for (n=1, nn, if (nbs = nb(n), print1(nbs, ", "))); \\ Michel Marcus, May 12 2018

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

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

A304480 a(n) is the least m such that lambda(k) >= n for all k >= m where lambda is A002322, the Carmichael lambda function.

Original entry on oeis.org

1, 3, 25, 25, 241, 241, 505, 505, 505, 505, 505, 505, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 65521, 131041, 131041, 131041, 131041, 131041, 131041, 171865, 171865, 171865, 171865, 171865, 171865, 138181681, 138181681, 138181681, 138181681, 138181681, 138181681
Offset: 1

Author

Michel Marcus, May 13 2018

Keywords

Programs

  • PARI
    minvl(n, v) = {vgt = select(x->(x>=n), v, 1); first = vgt[1]; vgtd = vector(#vgt-1, k, vgt[k+1] - vgt[k]); vgtdr = Vecrev(vgtd); vokdiff = select(x->x!=1, vgtdr, 1); if (#vokdiff, #v - vokdiff[1]+1, first);}
    lista(nn) = {v = read("v002322.txt"); for (n=1, nn, print1(minvl(n, v), ", "););}

Extensions

a(32) and beyond from Seiichi Manyama, May 24 2020

A141162 Smallest k such that lambda(k) = n, or 0 if there is no such k.

Original entry on oeis.org

1, 3, 0, 5, 0, 7, 0, 32, 0, 11, 0, 13, 0, 0, 0, 17, 0, 19, 0, 25, 0, 23, 0, 224, 0, 0, 0, 29, 0, 31, 0, 128, 0, 0, 0, 37, 0, 0, 0, 41, 0, 43, 0, 115, 0, 47, 0, 119, 0, 0, 0, 53, 0, 81, 0, 928, 0, 59, 0, 61, 0, 0, 0, 256, 0, 67, 0, 0, 0, 71, 0, 73, 0, 0, 0, 0, 0, 79, 0, 187, 0, 83, 0, 203, 0, 0, 0, 89, 0, 209, 0, 235, 0, 0, 0, 97, 0
Offset: 1

Author

Michel Lagneau, Mar 17 2011

Keywords

Comments

Sequence A002174 gives the n such that a(n) > 0. Removing the zeros from this sequence produces A002396. Note that some n appear only for large k. For example, 728 does not appear until k=49184. See A143407 for the largest k that produces a particular value of the lambda function. See A143408 for the number of times each value occurs. - T. D. Noe, Mar 17 2011

Examples

			a(8) = 32 because lambda(32) = 8.
		

Crossrefs

Cf. A002174, A002322 (Carmichael lambda function), A002396, A143407, A143408.

Programs

  • Maple
    with(numtheory):for k from 1 to 100 do:id:=0:for n from 1 to 1000 while(id=0)
      do: if lambda(n) = k then id:=1:printf(`%d, `,n):else fi:od:if id=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    nn = 100; t = Table[0, {nn}]; Do[c = CarmichaelLambda[k]; If[c <= nn && t[[c]] == 0, t[[c]] = k], {k, 1000}]; t

Formula

a(A002174(n)) = A002396(n).

A143417 Irregular triangle in which row n gives the k such that the reduced totient function psi(k) = A002174(n).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 24, 5, 10, 15, 16, 20, 30, 40, 48, 60, 80, 120, 240, 7, 9, 14, 18, 21, 28, 36, 42, 56, 63, 72, 84, 126, 168, 252, 504, 32, 96, 160, 480, 11, 22, 33, 44, 66, 88, 132, 264, 13, 26, 35, 39, 45, 52, 65, 70, 78, 90, 91, 104, 105, 112, 117, 130, 140, 144, 156
Offset: 1

Author

T. D. Noe, Aug 13 2008

Keywords

Comments

Row n consists of the divisors of A143407(n) that are not divisors of A143407(r) for rA143408(n).

Examples

			1,2; 3,4,6,8,12,24; 5,10,15,16,20,30,40,48,60,80,120,240
		

Crossrefs

Cf. A002322 (reduced totient function).

A219793 Least k such that phi(n) = lambda(k), or 0 if there is no such k.

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 5, 7, 5, 11, 5, 13, 7, 32, 32, 17, 7, 19, 32, 13, 11, 23, 32, 25, 13, 19, 13, 29, 32, 31, 17, 25, 17, 224, 13, 37, 19, 224, 17, 41, 13, 43, 25, 224, 23, 47, 17, 43, 25, 128, 224, 53, 19, 41, 224, 37, 29, 59, 17, 61, 31, 37, 128, 119, 25
Offset: 1

Author

Michel Lagneau, Nov 28 2012

Keywords

Comments

lambda(n) is the Carmichael lambda function A002322. For n <10000, it appears that a(n) = 0 for n = 2047, 4094, 6141, 6533, 8119, 8188, 9637. if a(n) = p is a prime greater than 2, then n belongs to the finite set {p, p1, p2, ...., pk} that is a subsequence of A032447 (see the array with characteristic rows in the example of A032447), for example : a(n) = 3 for n = 3, 4, 6; a(n) = 5 for n = 5, 8, 10, 12; a(n) = 7 for n = 7, 9, 14, 18, 15, 16, 20, 24, 30; a(n) = 11 for n = 11, 22; a(n) = 13 for n = 13, 21, 26, 28, 36, 42; a(n) = 17 for n = 17, 32, 34, 40, 48, 60.

Examples

			a(6) = 3 because phi(6) = lambda(3) = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100 do: ii:=0:for k from 1 to 10^6 while(ii=0) do:if phi(n)=lambda(k) then ii:=1: printf(`%d, `,k):else fi:od:if ii=0 then printf(`%d, `,0): else fi:od:
  • Mathematica
    Table[k=0; While[!EulerPhi[n] == CarmichaelLambda[k], k++]; k, {n, 100}] (* program will go into an infinite loop at n = 2047 *)
Showing 1-9 of 9 results.