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

A319048 a(n) is the greatest k such that A000010(k) divides n where A000010 is the Euler totient function.

Original entry on oeis.org

2, 6, 2, 12, 2, 18, 2, 30, 2, 22, 2, 42, 2, 6, 2, 60, 2, 54, 2, 66, 2, 46, 2, 90, 2, 6, 2, 58, 2, 62, 2, 120, 2, 6, 2, 126, 2, 6, 2, 150, 2, 98, 2, 138, 2, 94, 2, 210, 2, 22, 2, 106, 2, 162, 2, 174, 2, 118, 2, 198, 2, 6, 2, 240, 2, 134, 2, 12, 2, 142, 2, 270, 2, 6, 2, 12, 2, 158, 2, 330
Offset: 1

Views

Author

Michel Marcus, Sep 09 2018

Keywords

Comments

Sándor calls this function the totient maximum function and remarks that this function is well-defined, since a(n) can be at least 2, and cannot be greater than n^2 (when n > 6).

Crossrefs

Cf. A000010 (Euler totient), A061026 (the totient minimum function).
Cf. A319068 (the analog for the sum of divisors).
Right border of A378638.

Programs

  • Mathematica
    a[n_] := Module[{kmax = If[n <= 6, 10 n, n^2]}, For[k = kmax, True, k--, If[Divisible[n, EulerPhi[k]], Return[k]]]];
    Array[a, 80] (* Jean-François Alcover, Sep 17 2018, from PARI *)
  • PARI
    a(n) = {my(kmax = if (n<=6, 10*n, n^2)); forstep (k=kmax, 1, -1, if ((n % eulerphi(k)) == 0, return (k)););}
    
  • PARI
    \\ (The first two functions could probably be combined in a smarter way):
    A014197(n, m=1) = { n==1 && return(1+(m<2)); my(p, q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0, valuation(q=n\d, p=d+1), A014197(q\p^i, p))))} \\ From A014197 by M. F. Hasler
    A057635(n) = if(1==n,2,if((n%2),0,my(k=A014197(n),i=n); if(!k, 0, while(k, i++; if(eulerphi(i)==n, k--)); (i))));
    A319048(n) = { my(m=0); fordiv(n,d, m = max(m,A057635(d))); (m); }; \\ Antti Karttunen, Sep 09 2018
    
  • PARI
    a(n) = {my(d = divisors(n)); vecmax(vector(#d, i, invphiMax(d[i])));} \\ Amiram Eldar, Nov 29 2024, using Max Alekseyev's invphi.gp

Formula

a(n) = Max_{d|n} A057635(d). - Antti Karttunen, Sep 09 2018

A378636 Irregular triangle read by rows: row n lists all m <= n such that phi(m) divides n, where phi is the Euler totient function (A000010).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 6, 1, 2, 1, 2, 3, 4, 5, 6, 8, 1, 2, 1, 2, 3, 4, 6, 1, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 1, 2, 3, 4, 6, 1, 2, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 1, 2, 1, 2, 3, 4, 6, 7, 9, 14, 18, 1, 2, 1, 2, 3, 4, 5, 6, 8, 10, 11, 12
Offset: 1

Views

Author

Paolo Xausa, Dec 02 2024

Keywords

Comments

If n = 2 or an odd number >= 3, row n is {1, 2}.
If n is an even number >= 4, row n begins with {1, 2, 3, 4}.

Examples

			Triangle begins:
  n\k| 1  2  3  4  5  6  7   8   9  10  11 ...
  --------------------------------------------
   1 | 1;
   2 | 1, 2;
   3 | 1, 2;
   4 | 1, 2, 3, 4;
   5 | 1, 2;
   6 | 1, 2, 3, 4, 6;
   7 | 1, 2;
   8 | 1, 2, 3, 4, 5, 6, 8;
   9 | 1, 2;
  10 | 1, 2, 3, 4, 6;
  11 | 1, 2;
  12 | 1, 2, 3, 4, 5, 6, 7,  8,  9, 10, 12;
  13 | 1, 2;
  14 | 1, 2, 3, 4, 6;
  15 | 1, 2;
  16 | 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16;
  17 | 1, 2;
  18 | 1, 2, 3, 4, 6, 7, 9, 14, 18;
  19 | 1, 2;
  20 | 1, 2, 3, 4, 5, 6, 8, 10, 11, 12;
  ...
		

Crossrefs

Cf. A069932 (row lengths), A362469 (row sums), A378637 (right border).
Subsequence of A378638.
Cf. A000010.

Programs

  • Mathematica
    With[{nmax = 25}, Table[If[OddQ[n] && n > 2, {1, 2}, PositionIndex[Divisible[n, #[[;; n]]]][True]], {n, nmax}] & [EulerPhi[Range[nmax]]]]
  • PARI
    row(n) = select(x->!(n % eulerphi(x)), [1..n]); \\ Michel Marcus, Dec 05 2024

A070633 a(n) is the number of k>0 such that phi(k) divides n.

Original entry on oeis.org

2, 5, 2, 9, 2, 9, 2, 14, 2, 7, 2, 19, 2, 5, 2, 20, 2, 13, 2, 16, 2, 7, 2, 34, 2, 5, 2, 11, 2, 13, 2, 27, 2, 5, 2, 31, 2, 5, 2, 30, 2, 13, 2, 14, 2, 7, 2, 51, 2, 7, 2, 11, 2, 15, 2, 19, 2, 7, 2, 37, 2, 5, 2, 35, 2, 13, 2, 9, 2, 9, 2, 63, 2, 5, 2, 9, 2, 11, 2, 46, 2, 7, 2, 31, 2, 5, 2, 25, 2, 17, 2
Offset: 1

Views

Author

Benoit Cloitre, May 13 2002

Keywords

Comments

Inverse Möbius transform of A014197. - Antti Karttunen, Sep 10 2018

Crossrefs

Row lengths of A378638.

Programs

  • PARI
    for(n=1,120,print1(sum(i=1,100*n,if(n%eulerphi(i),0,1)),","));
    
  • PARI
    \\ In contrast to above program, this is safe in any range 1..n:
    A014197(n, m=1) = { n==1 && return(1+(m<2)); my(p, q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0, valuation(q=n\d, p=d+1), A014197(q\p^i, p))))}; \\ From A014197 by M. F. Hasler
    A070633(n) = sumdiv(n, d, A014197(d)); \\ Antti Karttunen, Sep 10 2018
    
  • PARI
    a(n) = sumdiv(n, d, invphiNum(d)); \\ Amiram Eldar, Nov 29 2024, using Max Alekseyev's invphi.gp

Formula

From Antti Karttunen, Sep 10 2018: (Start)
a(n) = Sum_{d|n} A014197(d).
a(n) >= A069932(n).
a(A000010(n)) = A071181(n).
(End)

A378642 Number of numbers m <= n such that phi(m) does not divide n, where phi is the Euler totient function (A000010).

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 5, 1, 7, 5, 9, 1, 11, 9, 13, 5, 15, 9, 17, 10, 19, 17, 21, 5, 23, 21, 25, 19, 27, 19, 29, 16, 31, 29, 33, 16, 35, 33, 37, 22, 39, 33, 41, 34, 43, 41, 45, 16, 47, 43, 49, 43, 51, 41, 53, 41, 55, 53, 57, 34, 59, 57, 61, 42, 63, 55, 65, 59, 67, 63
Offset: 1

Views

Author

Paolo Xausa, Dec 05 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Count[Divisible[n, #[[;;n]]], False], {n, Length[#]}] & [EulerPhi[Range[100]]]
  • PARI
    a(n) = n - sumdiv(n, d, #select(x -> x<=n, invphi(d))); \\ Amiram Eldar, Dec 10 2024, using Max Alekseyev's invphi.gp

Formula

a(n) = n - A069932(n).

A362469 Sum of the numbers k, 1 <= k <= n, such that phi(k) | n.

Original entry on oeis.org

1, 3, 3, 10, 3, 16, 3, 29, 3, 16, 3, 67, 3, 16, 3, 82, 3, 64, 3, 62, 3, 16, 3, 208, 3, 16, 3, 51, 3, 97, 3, 205, 3, 16, 3, 269, 3, 16, 3, 247, 3, 64, 3, 74, 3, 16, 3, 660, 3, 49, 3, 51, 3, 202, 3, 185, 3, 16, 3, 481, 3, 16, 3, 502, 3, 133, 3, 51, 3, 49, 3, 1034, 3, 16, 3, 51, 3
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 21 2023

Keywords

Examples

			a(4) = 10: for the numbers 1..4, phi(1)=1|4, phi(2)=1|4, phi(3)=2|4, and phi(4)=2|4. Their sum is then 1+2+3+4 = 10.
		

Crossrefs

Row sums of A378636.

Programs

  • Mathematica
    a[n_] := Sum[If[Divisible[n, EulerPhi[k]], k, 0], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Apr 22 2023 *)
  • PARI
    a(n) = sum(k=1, n, if (!(n % eulerphi(k)), k)); \\ Michel Marcus, Apr 22 2023

Formula

a(n) = Sum_{k=1..n} k * (1 - ceiling(n/phi(k)) + floor(n/phi(k))).

A362470 Number of divisors d of n such that phi(d) | n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 21 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[n, EulerPhi[#]] &]; Array[a, 100] (* Amiram Eldar, Apr 22 2023 *)
  • PARI
    a(n) = sumdiv(n, d, !(n % eulerphi(d))); \\ Michel Marcus, Apr 22 2023

Formula

a(n) = Sum_{d|n, phi(d)|n} 1.

A362628 a(n) = Sum_{d|n, phi(d)|n} d.

Original entry on oeis.org

1, 3, 1, 7, 1, 12, 1, 15, 1, 3, 1, 28, 1, 3, 1, 31, 1, 39, 1, 22, 1, 3, 1, 60, 1, 3, 1, 7, 1, 12, 1, 63, 1, 3, 1, 91, 1, 3, 1, 50, 1, 33, 1, 7, 1, 3, 1, 124, 1, 3, 1, 7, 1, 120, 1, 15, 1, 3, 1, 43, 1, 3, 1, 127, 1, 12, 1, 7, 1, 3, 1, 195, 1, 3, 1, 7, 1, 12, 1, 106, 1, 3, 1, 140
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 28 2023

Keywords

Crossrefs

Cf. A000010 (phi), A069932, A362470.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, # &, Divisible[n, EulerPhi[#]] &]; Array[a, 100]
  • PARI
    a(n) = sumdiv(n, d, if (!(n % eulerphi(d)), d)); \\ Michel Marcus, Apr 28 2023
Showing 1-7 of 7 results.