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.

A367503 Sum of the final digits of the squarefree divisors of n.

Original entry on oeis.org

1, 3, 4, 3, 6, 12, 8, 3, 4, 8, 2, 12, 4, 14, 14, 3, 8, 12, 10, 8, 12, 6, 4, 12, 6, 12, 4, 14, 10, 22, 2, 3, 8, 14, 18, 12, 8, 20, 16, 8, 2, 26, 4, 6, 14, 12, 8, 12, 8, 8, 12, 12, 4, 12, 12, 14, 20, 20, 10, 22, 2, 6, 12, 3, 14, 24, 8, 14, 16, 24, 2, 12, 4, 14, 14, 20
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 20 2023

Keywords

Comments

Inverse Möbius transform of mu(n)^2 * (n mod 10). - Wesley Ivan Hurt, Jun 21 2024

Examples

			a(10) = 8. The squarefree divisors of 10 are 1, 2, 5, 10 and the sum of their final digits is 1 + 2 + 5 + 0 = 8.
		

Crossrefs

Cf. A005117 (squarefree numbers), A010879 (final digit of n), A367466 (sum of the final digits of the divisors of n), A371925 (numbers that occur in this sequence).

Programs

  • Maple
    f:= proc(n) local t;  add(t mod 10, t = map(convert,combinat:-powerset(numtheory:-factorset(n)),`*`)) end proc:
    map(f, [$1..100]); # Robert Israel, Nov 21 2023
  • Mathematica
    Table[DivisorSum[n, MoebiusMu[#]^2*Mod[#, 10] &], {n, 100}]
    Table[Total[Mod[Select[Divisors[n],SquareFreeQ],10]],{n,100}] (* Harvey P. Dale, Jun 06 2025 *)
  • PARI
    a(n) = sumdiv(n, d, if (issquarefree(d), d%10)); \\ Michel Marcus, Nov 21 2023

Formula

a(n) = Sum_{d|n} mu(d)^2 * (d mod 10).

A367476 Sum of the final digits of the distinct prime divisors of n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Nov 19 2023

Keywords

Comments

Even if a prime divides n more than once, it is only counted once.
Inverse Möbius transform of (n mod 10) * c(n), where c(n) is the prime characteristic (A010051). - Wesley Ivan Hurt, Jun 23 2024

Examples

			a(66) = 6; The distinct prime divisors of 66 are 2, 3, 11 and the sum of their final digits is 2 + 3 + 1 = 6.
		

Crossrefs

Cf. A008472, A010051, A010879 (final digit of n), A367466.

Programs

  • Mathematica
    a[n_]:=Total[Mod[Select[Divisors[n],PrimeQ],10]]; Array[a,85] (* Stefano Spezia, Nov 19 2023 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,1] % 10); \\ Michel Marcus, Nov 21 2023
  • Python
    from sympy import factorint
    def a(n): return sum(p%10 for p in factorint(n))
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Nov 19 2023
    

Formula

a(n) = Sum_{p|n, p prime} (p mod 10).
a(n) = Sum_{d|n} (d mod 10) * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 23 2024
Showing 1-2 of 2 results.