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.

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

A378639 a(n) = sum of all m such that phi(m) divides n, where phi is the Euler totient function (A000010).

Original entry on oeis.org

3, 16, 3, 51, 3, 64, 3, 156, 3, 49, 3, 265, 3, 16, 3, 387, 3, 202, 3, 302, 3, 85, 3, 991, 3, 16, 3, 138, 3, 190, 3, 968, 3, 16, 3, 1058, 3, 16, 3, 1240, 3, 340, 3, 419, 3, 157, 3, 2736, 3, 49, 3, 210, 3, 445, 3, 620, 3, 193, 3, 1723, 3, 16, 3, 2283, 3, 334, 3, 51, 3, 262
Offset: 1

Views

Author

Paolo Xausa, Dec 03 2024

Keywords

Crossrefs

Row sums of A378638.

Programs

  • Maple
    f:= proc(n) local d;
      if n::odd then return 3 fi;
      3+add(convert(numtheory:-invphi(d),`+`), d = select(type,numtheory:-divisors(n),even))
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 05 2024
  • Mathematica
    With[{nmax = 100}, Table[If[OddQ[n], 3, Total[PositionIndex[Divisible[n, #[[;; Max[n^2, 6]]]]][True]]], {n, nmax}] & [EulerPhi[Range[nmax^2]]]]
  • PARI
    a(n) = vecsum(select(x->!(n % eulerphi(x)), [1..max(n^2, 6)])); \\ Michel Marcus, Dec 05 2024

Formula

a(2*k+1) = 3, for k >= 0.
Showing 1-2 of 2 results.