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.

A222713 Least number k such that n divides gcd(sigma(k), phi(k)) (A009223).

Original entry on oeis.org

1, 3, 14, 12, 88, 14, 116, 15, 190, 88, 989, 35, 477, 116, 209, 105, 6901, 190, 7067, 88, 196, 989, 6439, 35, 15049, 477, 2754, 172, 10207, 209, 4976, 336, 989, 6901, 1189, 190, 10877, 7067, 477, 248, 13529, 377, 44461, 989, 418, 6439, 79523, 105, 10244, 15049
Offset: 1

Views

Author

Phil Carmody, Mar 01 2013

Keywords

Comments

For each n there are infinitely many numbers k for which n divides sigma(k) and phi(k). - Marius A. Burtea, Mar 28 2019

Examples

			Given A009223 = 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 4, 2, 6, 8, 1, 2, 3, ...
1 first divides A009223(1); 2 first divides A009223(3); 3 first divides A009223(14)=6.
		

Crossrefs

Programs

  • Magma
    [Min([n: n in [1..300000] | IsIntegral(SumOfDivisors(n)/m) and IsIntegral(EulerPhi(n)/m) ]): m in [1..70]]; // Marius A. Burtea, Mar 28 2019
    
  • Magma
    v:=[];
    for n in [1..60] do
    m:=1;
            while  not EulerPhi(m) mod n  eq 0 or not SumOfDivisors(m) mod n  eq 0 do
               v[n]:=0;
               m:=m+1;
            end while;
         v[n]:=m;
    end for;
    v; // Marius A. Burtea, Mar 30 2019
  • Mathematica
    Array[Block[{i = 1}, While[Mod[GCD[DivisorSigma[1, i], EulerPhi@ i], #] != 0, i++]; i] &, 50] (* Michael De Vlieger, Mar 28 2019 *)
  • PARI
    a(n)={my(k=1); while(gcd(sigma(k), eulerphi(k))%n!=0, k++); k}