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 31-40 of 308 results. Next

A327979 a(n) = gcd(n, A002322(n)), where A002322 is Carmichael lambda, also known as psi.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 6, 1, 4, 3, 2, 1, 2, 5, 2, 9, 2, 1, 2, 1, 8, 1, 2, 1, 6, 1, 2, 3, 4, 1, 6, 1, 2, 3, 2, 1, 4, 7, 10, 1, 4, 1, 18, 5, 2, 3, 2, 1, 4, 1, 2, 3, 16, 1, 2, 1, 4, 1, 2, 1, 6, 1, 2, 5, 2, 1, 6, 1, 4, 27, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 3, 2, 1, 8, 1, 14, 3, 20, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Oct 04 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Array[GCD[#, CarmichaelLambda[#]] &, 100] (* Amiram Eldar, Oct 04 2019 *)
  • PARI
    A327979(n) = gcd(n, lcm(znstar(n)[2]));

Formula

a(n) = gcd(n, A002322(n)).

A341858 Numbers k such that psi(k^2) = k, psi = A002322; indices of 1 in A341857.

Original entry on oeis.org

1, 2, 4, 6, 12, 20, 42, 60, 84, 156, 220, 420, 660, 780, 1092, 1806, 1860, 2436, 3612, 3660, 4620, 5060, 5460, 8268, 8580, 12180, 12324, 13020, 15180, 18060, 20460, 24180, 24492, 25620, 29820, 31668, 40260, 41340, 44220, 46956, 47580, 57876, 60060, 61620, 86268, 88620
Offset: 1

Views

Author

Jianing Song, Feb 21 2021

Keywords

Comments

For all k we have k divides psi(k^2). This sequence gives those k such that the quotient is 1.
Apart from 5 exceptional terms, every term is the product of 4 and distinct odd primes. The exceptional terms are precisely the 5 terms in A014117.
Except for k = 1, 2, 6, 42, 1806, k is a term if and only if k = 4*(p_1)*(p_2)*...*(p_m), where p_1 < p_2 < ... < p_m are odd primes, (p_i)-1 | 4*(p_1)*(p_2)*...*(p_(i-1)) for all 1 <= i <= m.
The LCM of two terms is again in this sequence.
Is this sequence infinite? If this sequence is finite, it means that there exists a term of the form k = 4*(p_1)*(p_2)*...*(p_s), where p_1 < p_2 < ... < p_s are odd primes such that: for every (e_0, e_1, ..., e_s) in {0, 1}^(s+1), 2^((e_0)+1)*(p_1)^(e_1)*(p_2)^(e_2)*...*(p_s)^(e_s)+1 is either composite or equal to some p_i. That term must be divisible by all other terms, since there are no more odd primes q other than p_1, p_2, ..., p_s such that q-1 | k.
Numbers k such that b^k == 1 (mod k^2) for every b coprime to k. Proof: these are numbers k such that psi(k^2) divides k, which holds if and only if psi(k^2) = k. Subsequence of A124240 (see my comment there). If k is a term of the sequence and k+1 is prime, then k*(k+1) is also a term. - Thomas Ordowski, Jul 26 2024

Examples

			1092 = 4 * 3 * 7 * 13 is a term since 3-1 | 4, 7-1 | 4*3 and 13-1 | 4*3*7. Indeed, we have psi(1092^2) = 1092.
5060 = 4 * 5 * 11 * 23 is a term since 5-1 | 4, 11-1 | 4*5 and 23-1 | 4*5*11.
		

Crossrefs

A229289 gives the set of prime factors of the terms.
Subsequence of A124240.

Programs

  • Mathematica
    Select[Range[10^5], CarmichaelLambda[#^2] == # &] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    isA341858(n) = (A002322(n^2)==n) \\ See A002322 for its program

A206941 a(n) = phi(lambda(n)), where phi = A000010, lambda = A002322.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 13 2012

Keywords

References

  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 55, Theorem 4.10.

Crossrefs

Programs

A207193 Auxiliary function for computing the Carmichael lambda function (A002322).

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 2, 6, 10, 12, 4, 16, 18, 22, 20, 18, 28, 30, 8, 36, 40, 42, 46, 42, 52, 58, 60, 16, 66, 70, 72, 78, 54, 82, 88, 96, 100, 102, 106, 108, 112, 110, 100, 126, 32, 130, 136, 138, 148, 150, 156, 162, 166, 156, 172, 178, 180, 190, 192, 196, 198
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 16 2012

Keywords

Crossrefs

Programs

  • Haskell
    a207193 1 = 1
    a207193 n | p == 2 && e > 2 = 2 ^ (e - 2)
              | otherwise       = (p - 1) * p ^ (e - 1)
              where p = a025473 n; e = a025474 n
  • Mathematica
    f[p_, e_] := If[p == 2 && e > 2, 2^(e-2), (p-1)*p^(e-1)]; s[n_] := If[n == 1, 1, If[PrimePowerQ[n], f @@ (FactorInteger[n][[1]]), Nothing]]; Array[s, 200] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n) = f(A000961(n)), where f(1) = 1, and f(p^e) = 2^(e-2) if p = 2 and e > 2, and f(p^e) = (p-1)*p^(e-1) otherwise.

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

Original entry on oeis.org

4, 6, 8, 10, 12, 15, 16, 20, 24, 28, 30, 40, 48, 52, 60, 66, 70, 80, 85, 91, 112, 120, 130, 176, 190, 208, 232, 240, 276, 280, 286, 364, 370, 435, 451, 496, 520, 532, 561, 616, 703, 742, 910, 946, 976, 1036, 1105, 1128, 1288, 1387, 1456, 1729, 1770, 1891
Offset: 1

Views

Author

Keywords

Comments

Contains the Carmichael numbers (A002997) and A231569.
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[4 (# -1)/ CarmichaelLambda[#]] &]
  • PARI
    is(n)=!isprime(n) && (4*n-4)%lcm(znstar(n)[2])==0 && n>1 \\ Charles R Greathouse IV, Nov 13 2013

A246700 Table read by rows: trajectories under iteration of Carmichael's lambda function (cf. A002322).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 2, 1, 5, 4, 2, 1, 6, 2, 1, 7, 6, 2, 1, 8, 2, 1, 9, 6, 2, 1, 10, 4, 2, 1, 11, 10, 4, 2, 1, 12, 2, 1, 13, 12, 2, 1, 14, 6, 2, 1, 15, 4, 2, 1, 16, 4, 2, 1, 17, 16, 4, 2, 1, 18, 6, 2, 1, 19, 18, 6, 2, 1, 20, 4, 2, 1, 21, 6, 2, 1, 22, 10, 4, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 02 2014

Keywords

Comments

Length of row n = A185816(n) + 1.

Examples

			.   |  1 | 1             | 13 | 13-12-2-1        | 25 | 25-20-4-2-1
.   |  2 | 2-1           | 14 | 14-6-2-1         | 26 | 26-12-2-1
.   |  3 | 3-2-1         | 15 | 15-4-2-1         | 27 | 27-18-6-2-1
.   |  4 | 4-2-1         | 16 | 16-4-2-1         | 28 | 28-6-2-1
.   |  5 | 5-4-2-1       | 17 | 17-16-4-2-1      | 29 | 29-28-6-2-1
.   |  6 | 6-2-1         | 18 | 18-6-2-1         | 30 | 30-4-2-1
.   |  7 | 7-6-2-1       | 19 | 19-18-6-2-1      | 31 | 31-30-4-2-1
.   |  8 | 8-2-1         | 20 | 20-4-2-1         | 32 | 32-8-2-1
.   |  9 | 9-6-2-1       | 21 | 21-6-2-1         | 33 | 33-10-4-2-1
.   | 10 | 10-4-2-1      | 22 | 22-10-4-2-1      | 34 | 34-16-4-2-1
.   | 11 | 11-10-4-2-1   | 23 | 23-22-10-4-2-1   | 35 | 35-12-2-1
.   | 12 | 12-2-1        | 24 | 24-2-1           | 36 | 36-6-2-1  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a246700 n k = genericIndex a246700_tabf (n - 1) !! (k-1)
    a246700_row n = genericIndex a246700_tabf (n - 1)
    a246700_tabf = [1] : f 2  where
       f x = (x : a246700_row (a002322 x)) : f (x + 1)
  • Mathematica
    Array[Most[FixedPointList[CarmichaelLambda, #]] &, 25] (* Paolo Xausa, Aug 17 2024 *)

Formula

T(n,1) = n and T(n,k+1) = A002322(T(n,k)), k = 1..A185816(n).

A264024 a(n) = gcd(phi(k), k-1) / lambda(k), where k is n-th Carmichael number A002997(n) and lambda(k) = A002322(k).

Original entry on oeis.org

1, 1, 12, 2, 1, 1, 9, 1, 4, 1, 6, 18, 1, 1, 1, 2, 1, 1, 1, 2, 12, 1, 1, 1, 1, 3, 3, 3, 50, 1, 18, 2, 1, 2, 1, 2, 5, 36, 1, 1, 2, 3, 4, 3, 3, 2, 3, 1, 1, 3, 3, 2, 4, 2, 5, 1, 4, 4, 4, 1, 1, 3, 40, 28, 1, 2, 4, 2, 4, 1, 2, 1, 2, 1, 33, 5, 50, 64, 1, 1, 3, 2, 1, 1, 12, 3, 1, 12, 1, 1, 1, 24, 1, 3, 128, 1, 6, 8, 5, 20, 3, 2, 2, 6, 4
Offset: 1

Views

Author

Thomas Ordowski, Nov 01 2015

Keywords

Crossrefs

Programs

  • Mathematica
    t = Cases[Range[1, 16 (10^6), 2], n_ /; Mod[n, CarmichaelLambda@ n] == 1 && ! PrimeQ@ n]; Table[GCD[EulerPhi@ t[[n]], t[[n]] - 1]/CarmichaelLambda@ t[[n]], {n, 105}] (* Michael De Vlieger, Nov 03 2015, after Artur Jasinski at A002997: alternatively use A002997 data for t *)
  • PARI
    t(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1;
    is(n)=n%2 && !isprime(n) && t(n) && n>1;
    c(n)=gcd(eulerphi(n),n-1)/lcm(znstar(n)[2]);
    for(n=1, 1e7, if(is(n), print1(c(n)", "))) \\ Altug Alkan, Nov 01 2015

Formula

a(n) = A049559(k)/A002322(k), where k = A002997(n).

Extensions

More terms from Altug Alkan, Nov 01 2015

A303758 a(1) = 1 and for n > 1, a(n) = number of values of k, 2 <= k <= n, with A002322(k) = A002322(n), where A002322 is Carmichael lambda.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 2, 1, 5, 1, 3, 3, 4, 1, 4, 1, 5, 5, 2, 1, 6, 1, 2, 2, 6, 1, 6, 1, 1, 3, 2, 3, 7, 1, 3, 4, 7, 1, 8, 1, 4, 5, 2, 1, 8, 2, 2, 3, 6, 1, 4, 3, 9, 5, 2, 1, 9, 1, 2, 10, 4, 7, 5, 1, 5, 3, 8, 1, 11, 1, 2, 4, 6, 3, 9, 1, 10, 1, 2, 1, 12, 6, 3, 3, 6, 1, 10, 11, 4, 4, 2, 3, 2, 1, 4, 5, 5, 1, 7, 1, 12, 13
Offset: 1

Views

Author

Antti Karttunen, Apr 30 2018

Keywords

Comments

Ordinal transform of f, where f(1) = 0 and f(n) = A002322(n) for n > 1.

Crossrefs

Cf. A002322.
Cf. also A303756, A303757.

Programs

  • Mathematica
    a[1] = 1; a[n_] := With[{c = CarmichaelLambda[n]}, Select[Range[2, n], c == CarmichaelLambda[#]&] // Length];
    Array[a, 1000] (* Jean-François Alcover, Sep 19 2020 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A002322(n) = lcm(znstar(n)[2]); \\ From A002322
    Aux303758(n) = if(1==n,0,A002322(n));
    v303758 = ordinal_transform(vector(up_to,n,Aux303758(n)));
    A303758(n) = v303758[n];

Formula

Except for a(2) = 1, a(n) = A303756(n).

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

Views

Author

Michel Marcus, May 13 2018

Keywords

Crossrefs

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

A329885 a(n) = A051903(n) mod A002322(n), where A051903 gives the maximal prime exponent of n, and A002322 is Carmichael's lambda (also known as psi).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 11 2019

Keywords

Comments

This differs from A051903 at n = 2, 4, 8, 12, 16, 24, 48, 80, 240. Are there any other such n? (None other found <= 201326592.)

Crossrefs

Programs

Previous Showing 31-40 of 308 results. Next