OFFSET
1,1
REFERENCES
Jeffrey Shallit, personal communication.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
V. L. Klee, Jr., Some remarks on Euler's totient function, Amer. Math. Monthly, 54 (1947), 332.
Don Reble, Python program.
J. Shallit, Letter to N. J. A. Sloane, Jul 17 1975.
MAPLE
with(numtheory): A001836:=n->`if`(phi(2*n-1) < phi(2*n), n, NULL): seq(A001836(n), n=1..5*10^3); # Wesley Ivan Hurt, Oct 10 2014
MATHEMATICA
Select[Range[3000], EulerPhi[2# - 1] < EulerPhi[2#] &] (* Harvey P. Dale, Apr 01 2012 *)
Position[Partition[EulerPhi[Range[6000]], 2], _?(#[[1]]<#[[2]]&), 1, Heads-> False]//Flatten (* Harvey P. Dale, Jul 02 2021 *)
PROG
(PARI) is(n)=eulerphi(2*n-1)<eulerphi(2*n) \\ Charles R Greathouse IV, Feb 21 2013
(Haskell)
a001836 n = a001836_list !! (n-1)
a001836_list = f a000010_list 1 where
f (u:v:ws) x = if u < v then x : f ws (x + 1) else f ws (x + 1)
-- Reinhard Zumkeller, Jul 11 2014
(Python)
from sympy import totient
def ok(n): return totient(2*n - 1) < totient(2*n) # Indranil Ghosh, Apr 29 2017
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Corrected and extended by Don Reble, Jan 04 2007
STATUS
approved