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.

A352996 a(n) = n*(n+1)/2 mod (sum (with multiplicity) of prime factors of n).

This page as a plain text file.
%I A352996 #21 Apr 24 2022 17:21:45
%S A352996 1,0,2,0,1,0,0,3,6,0,1,0,6,0,0,0,3,0,3,1,6,0,3,5,6,0,10,0,5,0,8,1,6,6,
%T A352996 6,0,6,12,6,0,3,0,0,1,6,0,10,7,3,6,1,0,0,4,10,3,6,0,6,0,6,1,4,3,3,0,
%U A352996 15,23,7,0,0,0,6,3,5,15,3,0,3,9,6,0,0,3,6,20,6,0,0,6,12,19,6,0,2,0
%N A352996 a(n) = n*(n+1)/2 mod (sum (with multiplicity) of prime factors of n).
%C A352996 If n is an odd prime, a(n) = 0.
%C A352996 If n is prime, a(n^2) = n.
%H A352996 Robert Israel, <a href="/A352996/b352996.txt">Table of n, a(n) for n = 2..10000</a>
%F A352996 a(n) = A000217(n) mod A001414(n).
%e A352996 For n = 6, A000217(6) = 6*7/2 = 21 and A001414(6) = 2+3 = 5, so a(6) = 21 mod 5 = 1.
%p A352996 seq((n*(n+1)/2) mod add(t[1]*t[2],t=ifactors(n)[2]), n=2..100);
%t A352996 a[n_] := Mod[n*(n + 1)/2, Plus @@ Times @@@ FactorInteger[n]]; Array[a, 100, 2] (* _Amiram Eldar_, Apr 15 2022 *)
%o A352996 (Python)
%o A352996 from sympy import factorint
%o A352996 def a(n): return (n*(n+1)//2)%sum(p*e for p, e in factorint(n).items())
%o A352996 print([a(n) for n in range(2, 98)]) # _Michael S. Branicky_, Apr 24 2022
%Y A352996 Cf. A352989, A352990, A352997.
%K A352996 nonn
%O A352996 2,3
%A A352996 _J. M. Bergot_ and _Robert Israel_, Apr 14 2022