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.
%I A001836 M5429 N2359 #49 Sep 23 2023 23:34:02 %S A001836 53,83,158,263,293,368,578,683,743,788,878,893,908,998,1073,1103,1208, %T A001836 1238,1268,1403,1418,1502,1523,1658,1733,1838,1943,1964,2048,2063, %U A001836 2153,2228,2243,2258,2363,2393,2423,2468,2558,2573,2633,2657,2678 %N A001836 Numbers k such that phi(2k-1) < phi(2k), where phi is Euler's totient function A000010. %D A001836 Jeffrey Shallit, personal communication. %D A001836 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001836 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001836 T. D. Noe, <a href="/A001836/b001836.txt">Table of n, a(n) for n = 1..1000</a> %H A001836 V. L. Klee, Jr., <a href="http://www.jstor.org/stable/2305207">Some remarks on Euler's totient function</a>, Amer. Math. Monthly, 54 (1947), 332. %H A001836 Don Reble, <a href="/A001836/a001836.py.txt">Python program</a>. %H A001836 J. Shallit, <a href="/A001274/a001274.pdf">Letter to N. J. A. Sloane, Jul 17 1975</a>. %p A001836 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 %t A001836 Select[Range[3000], EulerPhi[2# - 1] < EulerPhi[2#] &] (* _Harvey P. Dale_, Apr 01 2012 *) %t A001836 Position[Partition[EulerPhi[Range[6000]],2],_?(#[[1]]<#[[2]]&),1,Heads-> False]//Flatten (* _Harvey P. Dale_, Jul 02 2021 *) %o A001836 (PARI) is(n)=eulerphi(2*n-1)<eulerphi(2*n) \\ _Charles R Greathouse IV_, Feb 21 2013 %o A001836 (Haskell) %o A001836 a001836 n = a001836_list !! (n-1) %o A001836 a001836_list = f a000010_list 1 where %o A001836 f (u:v:ws) x = if u < v then x : f ws (x + 1) else f ws (x + 1) %o A001836 -- _Reinhard Zumkeller_, Jul 11 2014 %o A001836 (Python) %o A001836 from sympy import totient %o A001836 def ok(n): return totient(2*n - 1) < totient(2*n) # _Indranil Ghosh_, Apr 29 2017 %Y A001836 Cf. A000010, A001837. %K A001836 nonn,nice %O A001836 1,1 %A A001836 _N. J. A. Sloane_ %E A001836 Corrected and extended by _Don Reble_, Jan 04 2007