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.

A173751 a(n) = gcd(n, lcm_{p is a prime divisor of n} (p-1)) = gcd(n, A173614(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) is divisor of A126864(n).

Examples

			84 = 2^2*3*7; lcm{p-1|p is prime and divisor of 84} = lcm{1,2,6} = 6; gcd(84,6) = 6 ==> a(84)=6.
		

Crossrefs

Cf. A173614.

Programs

  • Mathematica
    fa=FactorInteger; lcm[n_] := Module[{aux = 1, lon = Length[fa[n]]}, Do[aux = LCM[aux, (fa[n][[i]][[1]] - 1)], {i, lon}]; aux] a[n_] := GCD[lcm[n], n]; Table[a[n], {n, 1, 300}]
  • PARI
    a(n)=gcd(n, lcm(apply(p->p-1, factor(n)[,1]))) \\ Andrew Howroyd, Aug 06 2018

A174824 a(n) = period of the sequence {m^m, m >= 1} modulo n.

Original entry on oeis.org

1, 2, 6, 4, 20, 6, 42, 8, 18, 20, 110, 12, 156, 42, 60, 16, 272, 18, 342, 20, 42, 110, 506, 24, 100, 156, 54, 84, 812, 60, 930, 32, 330, 272, 420, 36, 1332, 342, 156, 40, 1640, 42, 1806, 220, 180, 506, 2162, 48, 294, 100, 816, 156, 2756, 54, 220, 168, 342
Offset: 1

Views

Author

Keywords

Comments

This is a divisibility sequence: if n divides m, a(n) divides a(m).
We have the equality n = a(n) for numbers n in A124240, which is related to Carmichael's function (A002322). The largest values of a(n) occur when n is prime, in which case a(n) = n*(n-1). - T. D. Noe, Feb 21 2014

Examples

			For n=3, 1^1 == 1 (mod 3), 2^2 == 1 (mod 3), 3^3 == 0 (mod 3), etc. The sequence of residues 1, 1, 0, 1, 2, 0, 1, 1, 0, ... has period 6, so a(3) = 6. - _Michael B. Porter_, Mar 13 2018
		

Crossrefs

Programs

  • Mathematica
    Table[LCM[n, CarmichaelLambda[n]], {n, 100}] (* T. D. Noe, Feb 20 2014 *)
  • PARI
    a(n)=local(ps);ps=factor(n)[,1]~;for(k=1,#ps,n=lcm(n,ps[k]-1));n
    
  • PARI
    a(n) = lcm(n, lcm(znstar(n)[2])); \\ Michel Marcus, Mar 18 2016; corrected by Michel Marcus, Nov 13 2019
    
  • PARI
    apply( {A174824(n)=lcm(lcm([p-1|p<-factor(n)[,1]]),n)}, [1..99]) \\ [...] = znstar(n)[2], but 3x faster. - M. F. Hasler, Nov 13 2019

Formula

a(n) = lcm(n, A173614(n)) = lcm(n, A002322(n)) = lcm(n, A011773(n)).
If n and m are relatively prime, a(n*m) = lcm(a(n), a(m)); a(p^k) = (p-1)*p^k for p prime and k > 0.
a(n) = n*A268336(n). - M. F. Hasler, Nov 13 2019

A346467 a(n) is the least common multiple of the divisors d of n-1 such that d+1 is prime; a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 4, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 20, 1, 22, 1, 12, 1, 2, 1, 28, 1, 30, 1, 16, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 44, 1, 46, 1, 48, 1, 10, 1, 52, 1, 18, 1, 28, 1, 58, 1, 60, 1, 2, 1, 16, 1, 66, 1, 4, 1, 70, 1, 72, 1, 2, 1, 4, 1, 78, 1, 80, 1, 82, 1, 84, 1, 2, 1, 88, 1, 90, 1, 92, 1, 2, 1, 96
Offset: 1

Views

Author

Antti Karttunen and Thomas Ordowski, Jul 22 2021

Keywords

Comments

Original definition: a(n) is the least common multiple of p-1 computed over all primes p for which p-1 is a divisor of n-1; a(1) = 1.

Crossrefs

Programs

  • Maple
    f:= proc(n)
      if n::even then return 1 fi;
      ilcm(op(select(d -> isprime(d+1), numtheory:-divisors(n-1))));
    end proc:
    f(1):= 1:
    map(f, [$1..200]); # Robert Israel, Aug 30 2021
  • Mathematica
    {1}~Join~Array[CarmichaelLambda@ Denominator@ BernoulliB@ # &, 96] (* Michael De Vlieger, Jul 22 2021 *)
  • PARI
    A346467(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d),m = lcm(m,d))); (m));
    
  • PARI
    apply( {A346467(n)=if(n>1, lcm([d|d<-divisors(n-1),isprime(d+1)]), 1)}, [1..99]) \\ M. F. Hasler, Nov 23 2021

Formula

a(n) = A002322(A027642(n-1)).
a(n) = A346466(n) * A346481(n).
For n > 1, a(n) = (n-1) / A346468(n).
a(n) = LCM { d | n-1; d+1 is prime }, where "|" means "divides". - M. F. Hasler, Nov 23 2021

A346466 The least common multiple of all divisors d of n-1 such that d+1 is a prime divisor of n; a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 1, 1, 36, 1, 2, 1, 40, 1, 42, 1, 4, 1, 46, 1, 6, 1, 2, 1, 52, 1, 1, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 1, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 6, 1, 2, 1, 1, 1, 96, 1, 2, 1, 100, 1, 102, 1, 4
Offset: 1

Views

Author

Antti Karttunen, Jul 19 2021

Keywords

Examples

			From _M. F. Hasler_, Nov 23 2021: (Start)
For n = 2, the only prime factor of n is p = 2, and p-1 = 1 divides n-1 = 1, therefore a(2) = LCM { 1 } = 1.
For n = 35, the prime factors of n are p = 5 and p = 7; but neither 5-1 = 4 nor 7-1 = 6 divides n-1 = 34, therefore a(35) = LCM {} = 1. (End)
		

Crossrefs

Cf. also A173614, A346467.

Programs

  • PARI
    A346466(n) = lcm(apply(p->if((n-1)%(p-1),1,(p-1)), factor(n)[, 1]));
    
  • PARI
    A346466(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d)&&!(n%(1+d)),m = lcm(m,d))); (m));
    
  • PARI
    apply( {A346466(n)=lcm([p-1|p<-factor(n)[,1],(n-1)%(p-1)==0])}, [1..99]) \\ M. F. Hasler, Nov 23 2021

Formula

a(n) = LCM_{p-1|n-1, p|n, p prime} (p-1).
a(n) = p-1 for prime powers n = p^e, e >= 1; a(n) = 1 for any even n = 2k. - M. F. Hasler, Nov 23 2021

A343979 Composite numbers m such that lambda(m) = lambda(D_{m-1}), where lambda(n) is the Carmichael function of n (A002322) and D_k is the denominator (A027642) of Bernoulli number B_k.

Original entry on oeis.org

5615659951, 36901698733, 55723044637, 776733036121, 2752403727511, 7725145165297, 14475486778537, 15723055492417, 22824071195485, 29325910221631, 54669159894469, 62086332981241, 125685944708905, 180225455689481, 298620660945331, 335333122310629, 426814989321721
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, May 06 2021

Keywords

Comments

Squarefree composites m such that LCM_{prime p|m} (p-1) = LCM_{prime p, p-1|m-1} (p-1).
Carmichael numbers m such that LCM_{prime p|m} (p-1) = LCM_{prime p, p-1|m-1} (p-1), i.e., with A173614(m) = A346467(m).
Carmichael numbers m such that their index (m-1)/lambda(m) = A346468(m), cf. A174590.
Carl Pomerance noted that, for k = 40826, Chernick's Carmichael number (6k+1)*(12k+1)*(18k+1) = 88189878776579929 satisfies this condition.
Theorem: lambda(m) | lambda(D_{m-1}) if and only if m | D_{m-1}.
Composites m such that lambda(m) | lambda(D_{m-1}) are all Carmichael numbers, defined as composites m such that lambda(m) | m-1, while lambda(D_{m-1}) | m-1 for every m.
Note that if p is prime, then lambda(p) = lambda(D_{p-1}) = p-1.

Crossrefs

Programs

  • Mathematica
    c = Cases[Import["https://oeis.org/A002997/b002997.txt", "Table"], {, }][[;; , 2]]; q[d_] := If[PrimeQ[d + 1], d, 1]; Select[c, LCM @@ (FactorInteger[#][[;; , 1]] - 1) == LCM @@ (q /@ Divisors[# - 1]) &]
  • PARI
    A002322(n) = lcm(znstar(n)[2]); \\ From A002322
    A173614(n) = lcm(apply(p->p-1, factor(n)[, 1]));
    A346467(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d),m = lcm(m,d))); (m));
    isA343979(n) = ((n>1) && !isprime(n) && (!((n-1)%A002322(n))) && A173614(n)==A346467(n)); \\ Antti Karttunen, Jul 22 2021
Showing 1-5 of 5 results.