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

A260142 Denominators of the distinct common values of sigma(n)/n and m/phi(m) in the order which they occur when n and m increase.

Original entry on oeis.org

1, 2, 1, 3, 8, 4, 2, 6, 1, 24, 36, 10, 128, 12, 4, 32, 16, 12, 42, 16, 72, 384, 120, 144, 2, 24, 64, 864, 36, 216, 60, 160, 504, 192, 16, 288, 54, 6, 128, 24, 144, 1920, 4, 32768, 32, 32, 216, 432, 8192, 20, 48, 1296, 1080, 1760, 4320, 384, 704, 1728, 10, 360, 4, 2816, 80
Offset: 1

Views

Author

Michel Marcus, Jul 17 2015

Keywords

Comments

To be considered as common, a value must have appeared for some N in both sequences sigma(n)/n (A017665/A017666) and n/eulerphi(n) (A109395/A076512), with 1<=n<=N.

Examples

			sigma(n)/n starts: 1/1, 3/2, 4/3, 7/4, 6/5, 2/1, 8/7, 15/8, 13/9, 9/5, ...
m/phi(m) starts:   1/1, 2/1, 3/2, 2/1, 5/4, 3/1, 7/6,  2/1,  3/2, 5/2, ...
The 1st common value is 1/1 = sigma(1)/1 = 1/eulerphi(1).
The 2nd common value is 3/2 = 3/eulerphi(3) = sigma(2)/2.
The 3rd common value is 2/1 = sigma(6)/6 = 2/eulerphi(2).
The sequence of ratios begin: 1, 3/2, 2, 7/3, 15/8, 7/4, 5/2, 13/6, 3, 65/24, 91/36, 31/10, 255/128, 31/12, ...
So this sequence begins 1, 2, 1, ...
		

Crossrefs

Cf. A259850, A260141 (numerators).

Programs

  • PARI
    already(vsv, val, vsi, n) = {pos=vecsearch(vsv, val); if (pos, until(vsv[pos] < val, pos--); pos++; pos = vsi[pos] <= n); pos;}
    lista(nn) = {vrat = [1]; vsrat = [1]; ve = vector(nn, k, k/eulerphi(k)); vs = vector(nn, k, sigma(k)/k); vesv = vecsort(ve); vesi = vecsort(ve,,1); vssv = vecsort(vs); vssi = vecsort(vs,,1); print1(1, ", "); for (n=2, nn, rn = vs[n]; if (!vecsearch(vsrat, rn) && (already(vesv, rn, vesi, n)), print1(denominator(rn), ", "); vrat = concat(vrat, rn); vsrat = vecsort(vrat,,8), rn = ve[n]; if (!vecsearch(vsrat, rn) && (already(vssv, rn, vssi, n)), print1(denominator(rn), ", "); vrat = concat(vrat, rn); vsrat = vecsort(vrat,,8););););}

A280990 Least prime p such that n divides phi(p*n).

Original entry on oeis.org

2, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 31, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 31, 31, 2, 67, 17, 71, 3, 37, 19, 13, 5, 41, 7, 43, 11, 31, 23, 47, 3, 7, 5, 103, 13, 53, 3, 11, 7, 19, 29, 59, 31, 61, 31, 7, 2, 131, 67, 67, 17, 139, 71, 71, 3, 73, 37, 31, 19, 463
Offset: 1

Views

Author

Altug Alkan, Jan 12 2017

Keywords

Comments

n*a(n) are 2, 4, 9, 8, 25, 18, 49, 16, 27, 50, 121, 36, 169, 98, 465, 32, 289, ...
a(n) <= A034694(A007947(n)). If n is in A050384 then a(n) = A034694(n). - Robert Israel, Jan 12 2017

Examples

			a(15) = 31 because 15 does not divide phi(p*15) for p < 31 where p is prime and phi(31*15) = 2*4*30 is divisible by 15.
		

Crossrefs

Cf. A000079, A065119, A086761: for those n such that a(n)=2,3,5. - Michel Marcus, Jan 20 2017

Programs

  • Maple
    f:= proc(n) local p;
        p:= 2;
        while numtheory:-phi(p*n) mod n <> 0 do p:= nextprime(p) od:
        p
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 12 2017
  • Mathematica
    lpp[n_]:=Module[{p=2},While[Mod[EulerPhi[p*n],n]!=0,p=NextPrime[p]];p]; Array[lpp,80] (* Harvey P. Dale, Sep 26 2020 *)
  • PARI
    a(n)=my(k = 1); while (eulerphi(prime(k)*n) % n != 0, k++); prime(k);
    
  • PARI
    a(n)=my(t=n/gcd(eulerphi(n),n)); if(t==1, return(2)); forstep(p=if(t%2,2*t,t)+1, if(isprime(t), t, oo),lcm(t,2), if(isprime(p), return(p))); t \\ Charles R Greathouse IV, Jan 20 2017

Formula

a(p^k) = p for all primes p and k >= 1. - Robert Israel, Jan 12 2017
a(n) << n^5 by Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Jan 20 2017

A331176 a(n) = n - n/gcd(n, phi(n)), where phi is Euler totient function.

Original entry on oeis.org

0, 0, 0, 2, 0, 3, 0, 6, 6, 5, 0, 9, 0, 7, 0, 14, 0, 15, 0, 15, 14, 11, 0, 21, 20, 13, 24, 21, 0, 15, 0, 30, 0, 17, 0, 33, 0, 19, 26, 35, 0, 35, 0, 33, 30, 23, 0, 45, 42, 45, 0, 39, 0, 51, 44, 49, 38, 29, 0, 45, 0, 31, 56, 62, 0, 33, 0, 51, 0, 35, 0, 69, 0, 37, 60, 57, 0, 65, 0, 75, 78, 41, 0, 77, 0, 43, 0, 77, 0, 75
Offset: 1

Views

Author

Antti Karttunen, Jan 11 2020

Keywords

Crossrefs

Cf. A003277 (indices of zeros).

Programs

  • Mathematica
    Table[n-n/GCD[n,EulerPhi[n]],{n,90}] (* Harvey P. Dale, Aug 20 2020 *)
  • PARI
    A331176(n) = (n - (n/gcd(n, eulerphi(n))));

Formula

a(n) = n - A109395(n).

A342867 a(n) is the least number k such that the continued fraction for phi(k)/k contains exactly n elements.

Original entry on oeis.org

1, 2, 3, 15, 35, 33, 65, 215, 221, 551, 455, 2001, 3417, 3621, 11523, 16705, 16617, 69845, 107545, 157285, 324569, 358883, 1404949, 1569295, 3783970, 3106285, 7536065, 12216295, 10589487, 24038979, 57759065, 51961945, 177005465, 131462695, 741703701, 1467144445
Offset: 1

Views

Author

Amiram Eldar, Mar 27 2021

Keywords

Comments

a(n) is the least number k such that A342866(k) = n.
All the terms above 3 are composite numbers.

Crossrefs

Cf. A071865 (similar, with sigma(k)/k).

Programs

  • Mathematica
    f[n_] := Length @ ContinuedFraction[EulerPhi[n]/n]; seq[max_] := Module[{s = Table[0, {max}], c = 0, n  = 1, i}, While[c < max, i = f[n]; If[i <= max && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[20]
  • PARI
    a(n) = my(k=1); while (#contfrac(eulerphi(k)/k) != n, k++); k; \\ Michel Marcus, Mar 30 2021

Formula

a(2) = 2 since 2 is the least number k such that A342866(k) = 2.
Previous Showing 21-24 of 24 results.