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

A069932 Number of k, 1<=k<=n, such that phi(k) divides n.

Original entry on oeis.org

1, 2, 2, 4, 2, 5, 2, 7, 2, 5, 2, 11, 2, 5, 2, 11, 2, 9, 2, 10, 2, 5, 2, 19, 2, 5, 2, 9, 2, 11, 2, 16, 2, 5, 2, 20, 2, 5, 2, 18, 2, 9, 2, 10, 2, 5, 2, 32, 2, 7, 2, 9, 2, 13, 2, 15, 2, 5, 2, 26, 2, 5, 2, 22, 2, 11, 2, 9, 2, 7, 2, 38, 2, 5, 2, 9, 2, 9, 2, 30, 2, 5, 2, 23, 2, 5, 2, 17, 2, 17, 2, 10, 2, 5
Offset: 1

Views

Author

Benoit Cloitre, May 05 2002

Keywords

Comments

Unlike A070633, this sequence does not give the number of all integers of the form phi(k) dividing n (for some n and some m > n, phi(m) divides n).

Crossrefs

Row lengths of A378636.

Programs

  • Mathematica
    a[n_] := Boole[ Divisible[n, EulerPhi[#]]] & /@ Range[n] // Total; Table[a[n], {n, 1, 94}] (* Jean-François Alcover, May 23 2013 *)
  • PARI
    for(n=1,150,print1(sum(i=1,n,if(n%eulerphi(i),0,1)),","))
    
  • PARI
    a(n)=if(n<1,0,polcoeff(sum(k=1,n,1/(1-x^eulerphi(k)),x*O(x^n)),n))
    
  • PARI
    A069932(n) = sum(k=1, n, !(n%eulerphi(k))); \\ Antti Karttunen, Sep 10 2018
    
  • PARI
    a(n) = sumdiv(n, d, #select(x -> x<=n, invphi(d))); \\ Amiram Eldar, Nov 29 2024, using Max Alekseyev's invphi.gp

Formula

Asymptotically (still conjectured): Sum_{k=1..n} a(k) = C*n*log(n) + o(n*log(n)) with C = 1.5...
G.f.: Sum_{k>=1} 1/(1-x^phi(k)).
a(n) <= A070633(n). - Antti Karttunen, Sep 10 2018
a(n) = Sum_{k=1..n} (1 - ceiling(n/phi(k)) + floor(n/phi(k))). - Wesley Ivan Hurt, Apr 21 2023
a(n) = n - A378642(n). - Paolo Xausa, Dec 06 2024

A378641 Largest m <= n such that phi(m) does not divide n, or -1 if no such m exists, where phi is the Euler totient function (A000010).

Original entry on oeis.org

-1, -1, 3, -1, 5, 5, 7, 7, 9, 10, 11, 11, 13, 14, 15, 14, 17, 17, 19, 20, 21, 22, 23, 23, 25, 26, 27, 28, 29, 30, 31, 31, 33, 34, 35, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50, 51, 52, 53, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Paolo Xausa, Dec 05 2024

Keywords

Crossrefs

Programs

  • Mathematica
    A378641[n_] := Module[{m = n}, While[m > 0 && Divisible[n, EulerPhi[m]], m--]; If[m == 0, -1, m]];
    Array[A378641, 100]

Formula

a(n) = n if n is an odd number >= 3.

A378640 Smallest m such that phi(m) does not divide n, where phi is the Euler totient function (A000010).

Original entry on oeis.org

3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 15, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5, 3, 7, 3, 5, 3, 7, 3, 5, 3, 11, 3, 5
Offset: 1

Views

Author

Paolo Xausa, Dec 05 2024

Keywords

Comments

Up to n = 10^7 the distinct terms of the sequence (which are also the record values) are {3, 5, 7, 11, 15, 17, 19, 23, 29, 47, 51, 53}. Is this A076245 (for n >= 2)?
First differs from A095366 at n = 60.
It appears that a(n) = A095366(n) except when n = 60*(2*k + 1), with k >= 0, where a(n) = 15 while A095366(n) = 17.

Crossrefs

Programs

  • Mathematica
    A378640[n_] := If[OddQ[n], 3, Module[{m = 4}, While[Divisible[n, EulerPhi[++m]]]; m]];
    Array[A378640, 100]

Formula

a(n) = 3 if n is odd.
Showing 1-3 of 3 results.