login
Numbers n such that phi(n) + sigma(n) = reversal(n) + 4.
6

%I #20 Dec 28 2024 17:08:26

%S 499,2836,4999,49999,280036,4999999,28000036,283682836,2800000000036

%N Numbers n such that phi(n) + sigma(n) = reversal(n) + 4.

%C If p=5*10^m-1 is prime (m is a term of A056712) then p is in the sequence.

%C Let p(m,n) = 10^(m+3)*(7*10^(m+2)+92)*(10^((m+4)*n)-1)/(10^(m+4)-1) +7*10^(m+1)+9, if m>0, n>=0 and p(m,n) is prime then 4*p(m,n) is in the sequence.

%C All known terms are of these two forms.

%C What is the smallest term of the sequence which is not of the form p or 4*p where p is prime?

%C Note that a(2)=4*p(1,0), a(5)=4*p(3,0), a(7)=4*p(5,0) and a(8)=4*p(1,1).

%e phi(499)+sigma(499) = 498+500 = 994+4 = reversal(499)+4, so 499 is in the sequence.

%t r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Do[If[DivisorSigma[1,n] + EulerPhi[n] == r[n] + 4, Print[n]], {n,1050000000}]

%t Select[Range[5*10^6],EulerPhi[#]+DivisorSigma[1,#]==IntegerReverse[#]+4&] (* The program generates the first 6 terms of the sequence. *) (* _Harvey P. Dale_, Dec 28 2024 *)

%o (PARI) is(n)=subst(Polrev(digits(n)),'x,10)+4==eulerphi(n)+sigma(n) \\ _Charles R Greathouse IV_, Nov 08 2013

%Y Cf. A000010, A000203, A004086, A056712, A230005.

%K nonn,base

%O 1,1

%A _Farideh Firoozbakht_, Nov 07 2013

%E a(9) from _Giovanni Resta_, Feb 06 2014