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.

A065385 Numbers m at which value of cototient function (A051953) reaches a new record: cototient(m) > cototient(k) for all k < m.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 102, 108, 114, 120, 126, 132, 138, 144, 150, 168, 180, 198, 204, 210, 240, 252, 264, 270, 294, 300, 330, 360, 378, 390, 420, 450, 462, 480, 504, 510, 540, 546, 570, 600, 630, 660, 690, 714
Offset: 1

Views

Author

Labos Elemer, Nov 05 2001

Keywords

Comments

For totient values prime numbers give similar records.

Examples

			a(8) = 30 because for m = 1...29 the cototient values are all smaller than cototient(30) = 22 = A065386(8) and this is the 8th number at which such a record is reached; analogous sequences are A002093, A002182, A015702 or A005250 for functions other than cototient.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Array[# - EulerPhi@ # &, 10^3]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, May 16 2018 *)
  • PARI
    r=-1; for(n=1,1000,d=n-eulerphi(n); if(r
    				
  • PARI
    { n=0; x=-1; for (m=1, 10^9, c=m - eulerphi(m); if (c > x, x=c; write("b065385.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 17 2009

Formula

a=0; s=0; Do[s=n-EulerPhi[n]; If[s>a, a=s; Print[n]], {n, 1, 10000}]