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.

Showing 1-4 of 4 results.

A161963 Even numbers n for which phi(n) > phi(n+1).

Original entry on oeis.org

314, 524, 734, 824, 944, 974, 1154, 1364, 1574, 1754, 1784, 1814, 1994, 2144, 2414, 2474, 2624, 2804, 3044, 3134, 3254, 3314, 3464, 3704, 3884, 4094, 4124, 4304, 4388, 4514, 4724, 4874, 4934, 5114, 5144, 5354, 5444, 5564, 5774, 5864
Offset: 1

Views

Author

David Angell (angell(AT)maths.unsw.edu.au), Jun 22 2009

Keywords

Comments

If n is even then for obvious reasons phi(n) will usually be less than or equal to phi(n+1). These are the first few exceptions.
Observation based upon calculation: More than 95% of the terms of this sequence have the final digit of 4 for n <= 10^7.. - Harvey P. Dale, Jul 24 2012

Examples

			314 is in the list because phi(314)=156 and phi(315)=144.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..6000] | (n mod 2 eq 0) and (EulerPhi(n) gt EulerPhi(n+1))]; // G. C. Greubel, Feb 27 2019
    
  • Mathematica
    Select[2*Range[3000],EulerPhi[#]>EulerPhi[#+1]&] (* Harvey P. Dale, Jul 24 2012 *)
  • PARI
    for(n=1, 6000, if(Mod(n,2)==0 && eulerphi(n) > eulerphi(n+1), print1(n", "))) \\ G. C. Greubel, Feb 27 2019
    
  • Sage
    [n for n in (1..6000) if mod(n,2)==0 and euler_phi(n) > euler_phi(n+1)] # G. C. Greubel, Feb 27 2019

Formula

a(n) = 2 * A001837(n) (follows from the definition). - Chris Boyd, Mar 15 2014

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

A064804 Numbers 2*k such that phi(2*k + 2) < phi(2*k).

Original entry on oeis.org

16, 22, 28, 34, 38, 40, 46, 52, 58, 64, 68, 76, 82, 86, 88, 94, 98, 100, 106, 112, 118, 124, 128, 130, 134, 136, 142, 148, 152, 154, 158, 160, 166, 172, 178, 184, 188, 190, 194, 196, 202, 206, 208, 214, 218, 220, 226, 232, 236, 238, 244, 248, 250, 256, 262, 268
Offset: 1

Views

Author

Robert G. Wilson v, Oct 21 2001

Keywords

Crossrefs

Cf. A001837.

Programs

  • Mathematica
    2Select[ Range[200], EulerPhi[2# + 2] < EulerPhi[2# ] & ]
  • PARI
    { n=e=0; forstep (m=2, 10^9, 2, f=eulerphi(m); if (fHarry J. Smith, Sep 26 2009

Extensions

a(41)-a(56) from Harry J. Smith, Sep 26 2009
Name clarified by Sean A. Irvine, Jul 28 2023

A064805 Numbers k such that phi(k) > phi(k+2).

Original entry on oeis.org

13, 16, 19, 22, 23, 25, 28, 31, 34, 37, 38, 40, 43, 46, 47, 49, 52, 53, 55, 58, 61, 64, 67, 68, 73, 76, 79, 82, 83, 85, 86, 88, 89, 91, 94, 97, 98, 100, 103, 106, 109, 112, 113, 115, 118, 121, 124, 127, 128, 130, 131, 133, 134, 136, 139, 142, 143, 145, 148, 151, 152
Offset: 1

Views

Author

Robert G. Wilson v, Oct 21 2001

Keywords

Crossrefs

Cf. A000010 (phi), A001837.

Programs

Extensions

a(60)-a(61) from Harry J. Smith, Sep 26 2009
Showing 1-4 of 4 results.