login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A343903
a(n) = Sum{i=1..A343901(n)} n (mod A343902(n, i)^2).
2
1, 2, 6, 4, 11, 8, 17, 16, 10, 13, 16, 15, 44, 21, 24, 23, 43, 20, 42, 22, 67, 28, 31, 30, 33, 63, 57, 60, 36, 10, 100, 44, 48, 52, 91, 83, 162, 80, 98, 59, 104, 109, 96, 71, 111, 49, 52, 74, 54, 57, 61, 64, 65, 61, 119, 71, 190, 72, 67, 76, 275, 147, 219, 79
OFFSET
1,2
COMMENTS
A theorem of Pomerance says that if a(n) = 0, then A000010(x) = A000010(y) has only the solution y = x (cf. Pomerance, 1974).
LINKS
Carl Pomerance, On Carmichael's conjecture, Proceedings of the American Mathematical Society 43 (1974), 297-298.
MATHEMATICA
a[n_] := DivisorSum[EulerPhi[n], Mod[n, (#+1)^2] &, PrimeQ[# + 1] &]; Array[a, 100] (* Amiram Eldar, Dec 06 2024 *)
PROG
(PARI) row_a343902(n) = my(e=eulerphi(n), v=[]); forprime(p=1, e+1, if(e%(p-1)==0, v=concat(v, [p]))); v \\ corrected by Amiram Eldar, Dec 06 2024
a(n) = my(v=row_a343902(n)); sum(i=1, #v, n%v[i]^2)
(PARI) a(n) = sumdiv(eulerphi(n), d, isprime(d+1) * n % (d+1)^2); \\ Amiram Eldar, Dec 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, May 03 2021
EXTENSIONS
Offset changed to 1 and data corrected by Amiram Eldar, Dec 06 2024
STATUS
approved