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.

A001836 Numbers k such that phi(2k-1) < phi(2k), where phi is Euler's totient function A000010.

Original entry on oeis.org

53, 83, 158, 263, 293, 368, 578, 683, 743, 788, 878, 893, 908, 998, 1073, 1103, 1208, 1238, 1268, 1403, 1418, 1502, 1523, 1658, 1733, 1838, 1943, 1964, 2048, 2063, 2153, 2228, 2243, 2258, 2363, 2393, 2423, 2468, 2558, 2573, 2633, 2657, 2678
Offset: 1

Views

Author

Keywords

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).

Crossrefs

Programs

  • 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
    
  • 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 *)
  • PARI
    is(n)=eulerphi(2*n-1)Charles R Greathouse IV, Feb 21 2013
    
  • Python
    from sympy import totient
    def ok(n): return totient(2*n - 1) < totient(2*n) # Indranil Ghosh, Apr 29 2017

Extensions

Corrected and extended by Don Reble, Jan 04 2007