OFFSET
1,1
COMMENTS
If k is even then for obvious reasons phi(k) will usually be less than phi(k+1). So it is more interesting to see when this occurs for odd k.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
EXAMPLE
105 is in the sequence since phi(105)=48 and phi(106)=52.
MAPLE
with(numtheory): a := proc (n) if `mod`(n, 2) = 1 and phi(n) < phi(n+1) then n else end if end proc: seq(a(n), n = 1 .. 6000); # Emeric Deutsch, Jul 11 2009
MATHEMATICA
Select[Range[5500], OddQ[#] && EulerPhi[#] < EulerPhi[# + 1] &] (* G. C. Greubel, Feb 27 2019 *)
2#-1&/@Flatten[Position[Partition[EulerPhi[Range[5500]], 2], _?(#[[1]]<#[[2]]&), 1, Heads-> False]] (* Harvey P. Dale, Nov 25 2022 *)
PROG
(Sage) [n for n in (1..5500) if mod(n+1, 2)==0 and euler_phi(n) < euler_phi(n+1)] # G. C. Greubel, Feb 27 2019
(Magma) [n: n in [1..5500] | ((n+1) mod 2 eq 0) and (EulerPhi(n) lt EulerPhi(n+1))]; // G. C. Greubel, Feb 27 2019
(PARI) for(n=1, 5500, if(Mod(n+1, 2)==0 && eulerphi(n) < eulerphi(n+1), print1(n", "))) \\ G. C. Greubel, Feb 27 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David Angell (angell(AT)maths.unsw.edu.au), Jun 22 2009
STATUS
approved