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.

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

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.

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