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.

A291503 a(n) is the smallest k such that sigma(k) = phi(n), or 0 if no such k exists.

Original entry on oeis.org

1, 1, 0, 0, 3, 0, 5, 3, 5, 3, 0, 3, 6, 5, 7, 7, 0, 5, 10, 7, 6, 0, 0, 7, 19, 6, 10, 6, 12, 7, 29, 0, 19, 0, 14, 6, 22, 10, 14, 0, 27, 6, 20, 19, 14, 0, 0, 0, 20, 19, 21, 14, 0, 10, 27, 14, 22, 12, 0, 0, 24, 29, 22, 21, 33, 19, 0, 21, 43, 14, 0, 14, 30, 22, 27, 22, 24, 14, 45
Offset: 1

Views

Author

Altug Alkan, Aug 25 2017

Keywords

Examples

			a(5) = 3 because sigma(3) = phi(5) and 3 is the smallest number with this property.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    R:= Vector(N):
    for k from 1 to N-1 do
      s:= numtheory:-sigma(k);
      if s <= N and R[s] = 0 then R[s]:= k fi;
    od:
    seq(R[numtheory:-phi(n)],n=1..N); # Robert Israel, Aug 25 2017
  • PARI
    a(n) = for(k=1, eulerphi(n), if(sigma(k)==eulerphi(n), return(k))); 0 \\ after Charles R Greathouse IV at A051444

Formula

a(A069825(n)) = 0 for n > 1.
a(n) = A051444(A000010(n)). - Michel Marcus, Aug 25 2017