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-4 of 4 results.

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

Original entry on oeis.org

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, 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, 43, 35, 27, 0, 48, 0, 29, 50, 52, 47, 50, 0, 47, 43, 56, 0, 60, 0, 35, 62, 53, 59, 60
Offset: 1

Views

Author

Zak Seidov, Sep 10 2002

Keywords

Examples

			a(6) = 1 because 6 = 2 * 3, sopfr(6) = 2 + 3 = 5 and 6 - 5 = 1.
		

Crossrefs

Cf. A145834 (= 0 followed by the nonzero terms of this sequence). - M. F. Hasler, Oct 31 2008

Programs

  • 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
    
  • Maple
    a:= n-> n-add(i[1]*i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 07 2015
  • Mathematica
    Join[{1}, Table[n - Total[Times@@@FactorInteger[n]], {n, 2, 80}]] (* Harvey P. Dale, Sep 20 2011 *)
  • PARI
    A075255(n)=n-sum(i=1,#n=factor(n)~,n[1,i]*n[2,i]) \\ M. F. Hasler, Oct 31 2008
    
  • Python
    from sympy import factorint
    def A075255(n): return n - sum(factorint(n,multiple=True)) # Chai Wah Wu, May 19 2022
  • 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
    

Formula

a(n) = n - A001414(n).
a(n) = 0 if n is prime or if n = 4. - Alonso del Arte, Jul 31 2018

A076694 a(n) = n - sum of the distinct prime factors of n.

Original entry on oeis.org

1, 0, 0, 2, 0, 1, 0, 6, 6, 3, 0, 7, 0, 5, 7, 14, 0, 13, 0, 13, 11, 9, 0, 19, 20, 11, 24, 19, 0, 20, 0, 30, 19, 15, 23, 31, 0, 17, 23, 33, 0, 30, 0, 31, 37, 21, 0, 43, 42, 43, 31, 37, 0, 49, 39, 47, 35, 27, 0, 50, 0, 29, 53, 62, 47, 50, 0, 49, 43, 56, 0, 67, 0, 35, 67, 55, 59, 60, 0, 73
Offset: 1

Views

Author

Joseph L. Pe, Oct 25 2002

Keywords

Examples

			a(1) = 1 - 0 = 1; a(6) = 6 - (2 + 3) = 1.
		

Crossrefs

Programs

  • Mathematica
    Join[{1},Rest[Table[n-Total[Transpose[FactorInteger[n]][[1]]],{n,80}]]] (* Harvey P. Dale, May 13 2012 *)

Formula

a(n) = n - A008472(n).

A075654 Numbers n such that n + sum of prime factors of n = (n+1) + sum of prime factors of (n+1).

Original entry on oeis.org

3, 14, 152, 224, 285, 455, 902, 1518, 2013, 2079, 4823, 6655, 7104, 7584, 8493, 8532, 9416, 14344, 15687, 18569, 20115, 20163, 20490, 22351, 25543, 26123, 28250, 28564, 30744, 37305, 37406, 41261, 45844, 50609, 51992, 54137, 56563, 60651
Offset: 1

Views

Author

Joseph L. Pe, Oct 11 2002

Keywords

Examples

			14 + sum of prime factors of 14 = 14 + 2 + 7 = 23; 15 + sum of prime factors of 15 = 15 + 3 + 5 = 23; hence 14 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := n + Apply[Plus, Transpose[FactorInteger[n]][[1]]]; Select[Range[2, 10^5], s[ # ] == s[ # + 1] &]
    SequencePosition[Table[n+Total[FactorInteger[n][[All,1]]],{n,70000}],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 23 2017 *)

A254340 Sum of the distinct prime factors of n plus n+1: a(n) = A008472(n) + n + 1.

Original entry on oeis.org

2, 5, 7, 7, 11, 12, 15, 11, 13, 18, 23, 18, 27, 24, 24, 19, 35, 24, 39, 28, 32, 36, 47, 30, 31, 42, 31, 38, 59, 41, 63, 35, 48, 54, 48, 42, 75, 60, 56, 48, 83, 55, 87, 58, 54, 72, 95, 54, 57, 58, 72, 68, 107, 60, 72, 66, 80, 90, 119, 71, 123, 96, 74, 67, 84
Offset: 1

Views

Author

Wesley Ivan Hurt, May 03 2015

Keywords

Comments

If n is prime, then a(n) = 2n+1; thus if n is a Sophie Germain prime p, then a(p) gives the safe prime q=2p+1.
If n is semiprime, then a(n) = sigma(n).
If m and n are coprime, then a(m*n) = a(m) + a(n) + (m-1)*(n-1) - 2. - Robert Israel, May 04 2015

Crossrefs

Cf. A000203 (sigma), A008472 (sopf), A074372, A075653.
Cf. A005384 (Sophie Germain primes), A005385 (safe primes).

Programs

  • Magma
    [&+PrimeDivisors(n)+n+1: n in [1..70]]; // Bruno Berselli, May 27 2015
  • Maple
    map(t -> t+1+convert(numtheory:-factorset(t),`+`),[$1..100]); # Robert Israel, May 04 2015
  • Mathematica
    Table[n + 1 + DivisorSum[n, # &, PrimeQ[#] &], {n, 100}]
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)+n+1) \\ Derek Orr, May 13 2015
    

Formula

a(n) = A075653(n) + 1 = A074372(n) + n. [Bruno Berselli, May 27 2015]
Showing 1-4 of 4 results.