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.

A329204 Number of integers less than n having at least as many totatives as n.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 0, 2, 1, 4, 0, 6, 0, 4, 2, 3, 0, 8, 0, 6, 3, 5, 0, 10, 1, 6, 3, 8, 0, 16, 0, 7, 4, 9, 2, 15, 0, 9, 4, 14, 0, 21, 0, 10, 7, 9, 0, 21, 2, 15, 5, 11, 0, 22, 5, 14, 7, 11, 0, 33, 0, 12, 10, 12, 3, 29, 0, 15, 6, 26, 0, 28, 0, 16, 13, 18, 4, 34, 0, 24, 7, 17
Offset: 1

Views

Author

Joshua Oliver, Nov 22 2019

Keywords

Examples

			a(6) = 3, because 6 has 2 totatives and there are 3 integers less than 6 with 2 or more totatives: 3 with 2 totatives, 4 with 2 totatives, and 5 with 4 totatives.
		

Crossrefs

Cf. A000010.

Programs

  • Mathematica
    Table[Length[Select[Range[n-1],EulerPhi[#]>=EulerPhi[n]&]],{n,1,100}]
  • PARI
    a(n) = sum(k=1, n-1, eulerphi(k) >= eulerphi(n)); \\ Michel Marcus, Nov 22 2019
    
  • PARI
    first(n)=my(u=vectorsmall(n),v=vector(n)); forfactored(f=1,n,u[f[1]]=eulerphi(f)); for(i=1,n, v[i]=sum(j=1,i-1,u[j]>=u[i])); v \\ Charles R Greathouse IV, Dec 11 2019