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.

A075255 a(n) = n - (sum of prime factors of n (with repetition)).

This page as a plain text file.
%I A075255 #33 May 07 2025 10:44:48
%S A075255 1,0,0,0,0,1,0,2,3,3,0,5,0,5,7,8,0,10,0,11,11,9,0,15,15,11,18,17,0,20,
%T A075255 0,22,19,15,23,26,0,17,23,29,0,30,0,29,34,21,0,37,35,38,31,35,0,43,39,
%U A075255 43,35,27,0,48,0,29,50,52,47,50,0,47,43,56,0,60,0,35,62,53,59,60
%N A075255 a(n) = n - (sum of prime factors of n (with repetition)).
%H A075255 Alois P. Heinz, <a href="/A075255/b075255.txt">Table of n, a(n) for n = 1..10000</a>
%F A075255 a(n) = n - A001414(n).
%F A075255 a(n) = 0 if n is prime or if n = 4. - _Alonso del Arte_, Jul 31 2018
%e A075255 a(6) = 1 because 6 = 2 * 3, sopfr(6) = 2 + 3 = 5 and 6 - 5 = 1.
%p A075255 a:= n-> n-add(i[1]*i[2], i=ifactors(n)[2]):
%p A075255 seq(a(n), n=1..100);  # _Alois P. Heinz_, Aug 07 2015
%t A075255 Join[{1}, Table[n - Total[Times@@@FactorInteger[n]], {n, 2, 80}]] (* _Harvey P. Dale_, Sep 20 2011 *)
%o A075255 (PARI) A075255(n)=n-sum(i=1,#n=factor(n)~,n[1,i]*n[2,i]) \\ _M. F. Hasler_, Oct 31 2008
%o A075255 (Magma) [n eq 1 select 1 else n-(&+[p[1]*p[2]: p in Factorization(n)]): n in [1..80]]; // _G. C. Greubel_, Jan 11 2019
%o A075255 (Sage) [n - sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0, len(factor(n)))) for n in range(1, 80)] # _G. C. Greubel_, Jan 11 2019
%o A075255 (Python)
%o A075255 from sympy import factorint
%o A075255 def A075255(n): return n - sum(factorint(n,multiple=True)) # _Chai Wah Wu_, May 19 2022
%Y A075255 Cf. A001414, A008472, A075254, A075653.
%Y A075255 Cf. A145834 (= 0 followed by the nonzero terms of this sequence). - _M. F. Hasler_, Oct 31 2008
%K A075255 nonn
%O A075255 1,8
%A A075255 _Zak Seidov_, Sep 10 2002