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-2 of 2 results.

A129138 a(n) = number of positive divisors of n that are <= phi(n), where phi(n) = A000010(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 3, 4, 1, 4, 1, 4, 3, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 3, 2, 3, 7, 1, 2, 3, 6, 1, 5, 1, 4, 5, 2, 1, 8, 2, 4, 3, 4, 1, 6, 3, 6, 3, 2, 1, 9, 1, 2, 5, 6, 3, 5, 1, 4, 3, 6, 1, 10, 1, 2, 5, 4, 3, 5, 1, 8, 4, 2, 1, 9, 3, 2, 3, 6, 1, 9, 3, 4, 3, 2, 3, 10, 1, 4, 5, 7, 1, 5, 1, 6
Offset: 1

Views

Author

Leroy Quet, Mar 30 2007

Keywords

Examples

			phi(16) = 8. So a(16) is the number of divisors of 16 which are <= 8. There are 4 such divisors: 1, 2, 4, 8; so a(16) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div, ct, j: div:=divisors(n): ct:=0: for j from 1 to tau(n) do if div[j]<=phi(n) then ct:=ct+1 else ct:=ct: fi od: ct; end: seq(a(n),n=1..135); # Emeric Deutsch, Mar 31 2007
  • Mathematica
    Table[Length[Select[Divisors[n], # <= EulerPhi[n] &]], {n, 104}] (* Jayanta Basu, May 23 2013 *)
  • PARI
    a(n)=my(p=eulerphi(n));#select(k->k<=p,divisors(n)) \\ Charles R Greathouse IV, Mar 05 2013

Extensions

More terms from Emeric Deutsch, Mar 31 2007

A074818 Number of integers in {1, 2, ..., prime(n)} that are coprime to n.

Original entry on oeis.org

2, 2, 4, 4, 9, 5, 15, 10, 16, 12, 29, 13, 38, 19, 26, 27, 56, 21, 64, 29, 42, 36, 80, 30, 78, 47, 69, 46, 106, 31, 123, 66, 84, 66, 103, 51, 153, 78, 104, 70, 175, 52, 187, 88, 106, 96, 207, 75, 195, 92, 147, 111, 237, 84, 187, 113, 170, 131, 273, 75, 279, 142, 176
Offset: 1

Views

Author

Joseph L. Pe, Oct 04 2002

Keywords

Comments

Compare the definition of a(n) to phi(n) = number of integers in {1, 2, ..., n} that are coprime to n.

Examples

			There are five numbers in {1, 2, ..., prime(6) = 13} that are coprime to 6, i.e. 1, 5, 7, 11, 13. Hence a(6) = 5.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(mobius(d)*floor(ithprime(n)/d), d in divisors(n)), n=1..100) ; # Ridouane Oudra, Jun 04 2025
  • Mathematica
    h[n_] := Module[{l}, l = {}; For[i = 1, i <= Prime[n], i++, If[GCD[i, n] == 1, l = Append[l, i]]]; l]; Table[Length[h[i]], {i, 1, 100}]
  • PARI
    a(n) = sum(k=1, prime(n), gcd(k, n)==1); \\ Michel Marcus, Jun 04 2025
    
  • PARI
    a(n) = my(p = prime(n)); eulerphi(n) * (p \ n) + sum(i = (p \ n)*n + 1, p, gcd(i, n) == 1); \\ David A. Corneth, Jun 04 2025

Formula

a(n) = Sum_{d|n} mu(d)*floor(prime(n)/d). - Ridouane Oudra, Jun 04 2025
Showing 1-2 of 2 results.