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-10 of 12 results. Next

A001414 Integer log of n: sum of primes dividing n (with repetition). Also called sopfr(n).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, 8, 17, 8, 19, 9, 10, 13, 23, 9, 10, 15, 9, 11, 29, 10, 31, 10, 14, 19, 12, 10, 37, 21, 16, 11, 41, 12, 43, 15, 11, 25, 47, 11, 14, 12, 20, 17, 53, 11, 16, 13, 22, 31, 59, 12, 61, 33, 13, 12, 18, 16, 67, 21, 26, 14, 71, 12, 73, 39, 13, 23, 18, 18
Offset: 1

Views

Author

Keywords

Comments

MacMahon calls this the potency of n.
Downgrades the operators in a prime decomposition. E.g., 40 factors as 2^3 * 5 and sopfr(40) = 2 * 3 + 5 = 11.
Consider all ways of writing n as a product of zero, one, or more factors; sequence gives smallest sum of terms. - Amarnath Murthy, Jul 07 2001
a(n) <= n for all n, and a(n) = n iff n is 4 or a prime.
Look at the graph of this sequence. At the lower edge of the logarithmic scatterplot there is a set of fuzzy but unmistakable diagonal fringes, sloping toward the southeast. Their spacing gradually increases, and their slopes gradually decrease; they are more distinct toward the lower edge of the range. Is any explanation known? - Allan C. Wechsler, Oct 11 2015
For n >= 2, the glb and lub are: 3 * log(n) / log(3) <= a(n) <= n, where the lub occurs when n = 3^k, k >= 1. (Jakimczuk 2012) - Daniel Forgues, Oct 12 2015
Except for the initial term, row sums of A027746. - M. F. Hasler, Feb 08 2016
Atanassov proves that a(n) <= A065387(n) - n. - Charles R Greathouse IV, Dec 06 2016
From Robert G. Wilson v, Aug 15 2022: (Start)
Differs from A337310 beginning with n at 64, 192, 256, 320, 448, 512, ..., .
The number of terms which equal k is A000607(k).
The first occurrence of k>1 is A056240(k).
The last occurrence of k>1 is A000792(k).
The Amarnath Murthy comment of Jul 07 2001 is a result of the fundamental theorem of arithmetic.
(End)

Examples

			a(24) = 2+2+2+3 = 9.
a(30) = 10: 30 can be written as 30, 15*2, 10*3, 6*5, 5*3*2. The corresponding sums are 30, 17, 13, 11, 10. Among these 10 is the least.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Amarnath Murthy, Generalization of Partition function and introducing Smarandache Factor Partition, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring-2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 89.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A000607(n) gives the number of values of k for which A001414(k) = n.
Cf. A036349 (indices of even terms), A356163 (their char. function), A335657 (indices of odd terms), A289142 (of multiples of 3), A373371 (their char. function).
For sum of squares of prime factors see A067666, for cubes see A224787.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A056239 (with a(p)=primepi(p)), A059975 (with a(p)=p-1), A064097 (with a(p)=1+a(p-1)), A113177 (with a(p)=Fib(p)), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
For other completely additive sequences see the cross-references in A104244.

Programs

  • Haskell
    a001414 1 = 0
    a001414 n = sum $ a027746_row n
    -- Reinhard Zumkeller, Feb 27 2012, Nov 20 2011
    
  • Magma
    [n eq 1 select 0 else (&+[j[1]*j[2]: j in Factorization(n)]): n in [1..100]]; // G. C. Greubel, Jan 10 2019
  • Maple
    A001414 := proc(n) add( op(1,i)*op(2,i),i=ifactors(n)[2]) ; end proc:
    seq(A001414(n), n=1..100); # Peter Luschny, Jan 17 2011
  • Mathematica
    a[n_] := Plus @@ Times @@@ FactorInteger@ n; a[1] = 0; Array[a, 78] (* Ray Chandler, Nov 12 2005 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); sum(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    A001414(n) = (n=factor(n))[,1]~*n[,2] \\ M. F. Hasler, Feb 07 2009
    
  • Python
    from sympy import factorint
    def A001414(n):
        return sum(p*e for p,e in factorint(n).items()) # Chai Wah Wu, Jan 08 2016
    
  • Sage
    [sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0,len(factor(n)))) for n in range(1,79)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

If n = Product p_j^k_j then a(n) = Sum p_j * k_j.
Dirichlet g.f. f(s)*zeta(s), where f(s) = Sum_{p prime} p/(p^s-1) = Sum_{k>0} primezeta(k*s-1) is the Dirichlet g.f. for A120007. Totally additive with a(p^e) = p*e. - Franklin T. Adams-Watters, Jun 02 2006
For n > 1: a(n) = Sum_{k=1..A001222(n)} A027746(n,k). - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} (-1)^a(n)/n^s = ((2^s + 1)/(2^s - 1))*zeta(2*s)/zeta(s), if Re(s)>1 and 0 if s=1 (Alladi and Erdős, 1977). - Amiram Eldar, Nov 02 2020
a(n) >= k*log(n), where k = 3/log(3). This bound is sharp. - Charles R Greathouse IV, Jul 28 2025

A288814 a(n) is the smallest composite number whose prime divisors (with multiplicity) sum to n.

Original entry on oeis.org

4, 6, 8, 10, 15, 14, 21, 28, 35, 22, 33, 26, 39, 52, 65, 34, 51, 38, 57, 76, 95, 46, 69, 92, 115, 184, 161, 58, 87, 62, 93, 124, 155, 248, 217, 74, 111, 148, 185, 82, 123, 86, 129, 172, 215, 94, 141, 188, 235, 376, 329, 106, 159, 212, 265, 424, 371, 118, 177, 122, 183, 244, 305, 488, 427, 134, 201, 268, 335, 142
Offset: 4

Views

Author

David James Sycamore, Jun 16 2017

Keywords

Comments

Agrees with A056240(n) if n is composite (but not if n is prime).
For n prime, let P_n = greatest prime < n such that A056240(n-P_n) = A288313(m) for some m; then a(n) = Min{q*a(n-q): q prime, n-1 > q >= P_n}.
In most cases q is the greatest prime < p, but there are exceptions; e.g., p=211 is the smallest prime for which q (=197) is the second prime removed from 211, not the first. 541 is the next prime with this property (q=521). The same applies to p=16183, for which q=16139, the second prime removed from p. These examples all arise with q being the lesser of a prime pair.
For p prime, a(p) = q*a(p-q) for some prime q < p as described above. Then a(p-q) = 2,4,8 or 3*r for some prime r.
The subsequence of terms (4, 6, 8, 10, 14, 21, 22, 26, 34, ...), where for all m > n, a(m) > a(n) is the same as sequence A088686, and the sequence of its indices (4, 5, 6, 7, 9, 10, 13, 19, ...) is the same as A088685. - David James Sycamore, Jun 30 2017
Records are in A088685. - Robert G. Wilson v, Feb 26 2018
Number of terms less than 10^k, k=1,2,3,...: 3, 32, 246, 2046, 17053, 147488, ..., . - Robert G. Wilson v, Feb 26 2018

Examples

			a(5) = 6 = 2*3 is the smallest composite number whose prime divisors add to 5.
a(7) = 10 = 2*5 is the smallest composite number whose prime divisors add to 7.
12 = 2 * 2 * 3 is not in the sequence, since the sum of its prime divisors is 7, a value already obtained by the lesser 10. - _David A. Corneth_, Jun 22 2017
		

Crossrefs

Programs

A046344 Sum of the prime factors of the odd composite numbers (counted with multiplicity).

Original entry on oeis.org

6, 8, 10, 10, 9, 14, 12, 16, 11, 14, 20, 16, 22, 13, 18, 26, 13, 18, 12, 22, 32, 20, 34, 24, 17, 15, 40, 28, 19, 24, 22, 44, 15, 46, 26, 14, 50, 24, 34, 17, 23, 36, 56, 30, 19, 26, 25, 17, 62, 64, 42, 28, 16, 21, 70, 36, 46, 29, 30, 74, 48, 38, 76, 30, 16, 21, 52, 82, 15, 19
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Examples

			a(54)=21 because 195 = 3 * 5 * 13 and 21 = 3 + 5 + 13.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[!PrimeQ[n],AppendTo[t,Total[Times@@@FactorInteger[n]]]],{n,9,245,2}]; t (* Jayanta Basu, Jun 04 2013 *)
    spf[n_]:=Total[Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]]; spf/@ Select[Range[9,501,2],CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 29 2021 *)

A273227 Consider all ways of writing the n-th composite number as the product of two divisors d1*d2 = d3*d4 = ...; a(n) is the minimum of the sums {d1 + d2, d3 + d4, ...}.

Original entry on oeis.org

4, 5, 6, 6, 7, 7, 9, 8, 8, 9, 9, 10, 13, 10, 10, 15, 12, 11, 11, 12, 14, 19, 12, 12, 21, 16, 13, 13, 15, 14, 25, 14, 14, 15, 20, 17, 15, 16, 15, 22, 31, 16, 33, 16, 16, 18, 17, 21, 26, 17, 17, 39, 20, 23, 18, 19, 18, 18, 43, 19, 22, 45, 32, 19, 19, 20, 27, 34
Offset: 1

Views

Author

Michel Lagneau, May 18 2016

Keywords

Comments

a(n) = A046343(n) if n is semiprime.
This sequence is included in A063655. - Giovanni Resta, May 18 2016
a(n) >= 2 * sqrt(A002808(n)). - David A. Corneth, May 20 2016

Examples

			a(14) = 10 because A002808(14) = 24 = 2*12 = 3*8 = 4*6 and 4+6 = 10 is the minimum sum.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=100:lst:={}:
    for n from 1 to nn do:
    it:=0:lst:={}:
    d:=divisors(n):n0:=nops(d):
      if n0>2 then
      for i from 2 to n0-1 do:
       p:=d[i]:
        for j from i to n0-1 do:
          q:=d[j]:
           if p*q=n then
            lst:=lst union {p+q}:
            else
           fi:
         od:
        od:
        printf(`%d, `,lst[1]):
       fi:
       od:
  • Mathematica
    Function[n, If[OddQ@ Length@ #, 2 Sqrt@ n, Total@ Take[#, {Length[#]/2, Length[#]/2 + 1}]] &@ Divisors@ n] /@ Select[Range@ 93, CompositeQ] (* Michael De Vlieger, May 20 2016 *)
    msd[n_]:=Module[{d=Divisors[n],len},len=Length[d];If[OddQ[len], 2*d[[ (len+1)/2]], d[[len/2]]+d[[len/2+1]]]]; msd/@Select[Range[200], CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 09 2018 *)
  • PARI
    forcomposite(n=4,100, d=divisors(n); t=#d; k=if(t%2,2*d[t\2+1], d[t\2]+d[t\2+1]); print1(k", ")) \\ Charles R Greathouse IV, Jun 08 2016

Extensions

Name edited by Jon E. Schoenfield, Sep 12 2017

A046345 Sum of the prime factors of the palindromic composite numbers (counted with multiplicity).

Original entry on oeis.org

4, 5, 6, 6, 13, 14, 15, 16, 16, 18, 17, 17, 40, 22, 50, 30, 25, 103, 57, 42, 35, 24, 17, 133, 25, 52, 77, 104, 36, 43, 21, 25, 134, 105, 31, 59, 40, 44, 229, 37, 84, 26, 34, 106, 108, 20, 112, 114, 45, 118, 33, 24, 29, 106, 24, 315, 60, 38, 49, 45, 30, 23, 38, 108, 242, 78
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Examples

			a(60)=45 because 666 = 2 * 3 * 3 * 37 and 45 = 2 + 3 + 3 + 37.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[!PrimeQ[n]&&Reverse[x=IntegerDigits[n]]==x,AppendTo[t,Total[Times@@@FactorInteger[n]]]],{n,4,740}]; t (* Jayanta Basu, Jun 04 2013 *)

Formula

a(n) = A001414(A032350(1+n)). - R. J. Mathar, Sep 09 2015

Extensions

Offset set to 1. - R. J. Mathar, Sep 09 2015

A161975 Sum_{x=sum of prime factors of n-th composite..n-th composite} x.

Original entry on oeis.org

4, 11, 21, 30, 34, 57, 69, 92, 108, 143, 174, 186, 175, 264, 280, 246, 342, 351, 420, 483, 470, 424, 564, 621, 531, 660, 765, 837, 885, 980, 781, 1121, 1134, 1209, 1136, 1242, 1430, 1420, 1518, 1422, 1246, 1764, 1425, 1938, 2014, 1992, 2091, 2136, 2090, 2394
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 23 2009

Keywords

Examples

			4(=4), 11(=(2+3)+6), 22(=(2+2+2)+7+8), 30(=(3+3)+7+9), 34(=(2+5)+8+9+10), etc.
		

Crossrefs

Cf. A002808.

Programs

  • Maple
    A002808 := proc(n) option remember ; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: A001414 := proc(n) pfs :=ifactors(n)[2] ; add(op(1,p)*op(2,p) ,p=pfs) ; end: A046343 := proc(n) A001414(A002808(n)); end: A000217 := proc(n) n*(n+1)/2 ; end: A161975 := proc(n) A000217( A002808(n)) - A000217(A046343(n)-1) ; end: seq(A161975(n),n=1..90) ; # R. J. Mathar, Aug 03 2009
  • PARI
    a(n)=my(c=n+n\log(n+1),f);for(i=0,n-c+primepi(c),if(isprime(c++),i--));f=factor(c);binomial(c+1,2)-binomial(sum(i=1,#f[,1],f[i,1]*f[i,2]),2)

Extensions

a(3), a(12) and others corrected by R. J. Mathar, Aug 03 2009
Program by Charles R Greathouse IV, Oct 12 2009

A144586 a(n) = odd and nonprime sum (with multiplicity) of prime factors of composite(k) = A002808(k).

Original entry on oeis.org

9, 9, 9, 15, 9, 21, 15, 25, 33, 21, 39, 45, 27, 49, 15, 55, 15, 33, 63, 35, 15, 15, 69, 75, 15, 25, 81, 15, 45, 85, 25, 91, 15, 51, 15, 99, 21, 105, 21, 57, 15, 111, 115, 21, 35, 21, 63, 15, 65, 129, 25, 35, 133, 25, 21, 141, 75, 27, 77, 153, 27, 25, 159, 165, 21, 87, 169, 27
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 04 2009

Keywords

Examples

			At k=7, A002808(k) = 14 = 2*7, and 2 + 7 = 9 (an odd nonprime), and k=7 is the smallest index for which this occurs, so a(1)=9.
At k=11, A002808(k) = 20 = 2*2*5, and 2 + 2 + 5 = 9 (an odd nonprime), and k=11 is the 2nd smallest index for which this occurs, so a(2)=9.
At k=14, A002808(k) = 24 = 2*2*2*3, and 2 + 2 + 2 + 3 = 9 (an odd nonprime), and k=24 is the 3rd smallest index for which this occurs, so a(3)=9.
At k=16, A002808(k) = 26 = 2*13 and 2 + 13 = 15 (an odd nonprime), and k=26 is the 4th smallest index for which this occurs, so a(4)=15, etc.
		

Crossrefs

Programs

  • Maple
    pss := proc(n) a := 0 ; for d in ifactors(n)[2] do a := a+ op(2,d)*op(1,d) ; end do: a ; end proc:
    A002808 := proc(n) if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc:
    A046343 := proc(n) pss(A002808(n)) ; end proc:
    for k from 1 to 800 do a := A046343(k) ; if not isprime(a) and type(a,'odd') then printf("%d,",a) ; end if; end do: # R. J. Mathar, May 01 2010
  • Mathematica
    Select[Map[Total[Times @@@ FactorInteger[#]] &, Range[500]], OddQ[#] && CompositeQ[#] &] (* Paolo Xausa, Aug 01 2025 *)

Extensions

Corrected at two or more places and extended by R. J. Mathar, May 01 2010
Example section edited by Jon E. Schoenfield, Oct 18 2015

A161994 Composites with an even remainder if divided by the sum of their prime factors.

Original entry on oeis.org

4, 8, 16, 18, 20, 24, 27, 28, 30, 32, 36, 42, 44, 48, 50, 54, 56, 60, 64, 66, 70, 72, 75, 78, 80, 84, 90, 98, 99, 100, 102, 105, 108, 110, 114, 120, 126, 128, 130, 132, 138, 140, 144, 150, 152, 154, 156, 160, 162, 168, 170, 174, 180, 182, 184, 186, 190, 192, 195, 196, 198
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 24 2009

Keywords

Comments

The composites A002808(k) have prime factor sums A046343(k). The sequence of remainders, A002808(k) mod A046343(k) = 0, 1, 2, 3, 3, 5, 5, 7, 0, ... is scanned for the even terms, occurring at positions k = 1, 3, 9, 10, 11, ..., and the associated A002808(k) are put into the sequence.

Examples

			The first composite is 4=2*2 and 4 mod (2+2) = 0 is even, so 4 is in the sequence.
The second composite is 6=2*3 and 6 mod (2+3) = 1 is odd, so 6 is not a term.
The third composite is 8=2*2*2 and 8 mod (2+2+2) = 2 is even, so 8 is a term.
		

Crossrefs

Programs

  • Mathematica
    cerQ[n_]:=!PrimeQ[n]&&EvenQ[Mod[n,Total[Flatten[Table[First[#], {Last[ #]}]&/@FactorInteger[n]]]]]; Select[Range[2,200],cerQ] (* Harvey P. Dale, Jan 19 2014 *)

Extensions

104 removed by R. J. Mathar, Sep 23 2009

A280739 a(n) is the smallest composite number > a(n-1) for which the sum of the prime factors (counted with multiplicity) is n.

Original entry on oeis.org

4, 6, 8, 10, 15, 20, 21, 28, 35, 56, 70, 105, 140, 147, 196, 198, 220, 231, 260, 273, 364, 455, 459, 510, 513, 570, 676, 798, 1064, 1122, 1242, 1254, 1288, 1463, 1976, 2057, 2277, 2299, 2320, 2436, 2480, 2527, 2552, 2622, 2728, 2997, 3224, 3509, 3885, 4147, 4216, 4433, 4592, 4810, 4816, 5412, 5661, 5676, 5875, 6253
Offset: 4

Views

Author

Dimitris Valianatos, Jan 12 2017

Keywords

Comments

Conjecture: a(n) exists for every n >= 4.

Examples

			For n=11, a(11)=28 because 28 is composite, the factors of 28=2*2*7 are (2,2,7 with multiplicity), and their sum is 11. The composite numbers 40,48,and 54 have the same sum of factors, but we take the smallest > a(10)=21, that is, 28.
		

Crossrefs

Programs

  • PARI
    {
    k=4;
    for(n=1,10000,
        if(!isprime(n),
           f=factor(n);
           s=sum(i=1, matsize(f)[1], f[i, 1]*f[i, 2]);
            if(s==k,
               print1(n", ")
               ;k++
             )
          )
    )
    }

A374954 Positive integers k for which sqrt(k) < sqrt(p_1) + ... + sqrt(p_r), where p_1*...*p_r is the prime factorization of k.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 22, 24, 28, 32, 36, 40, 48, 64
Offset: 1

Views

Author

Felix Huber, Jul 29 2024

Keywords

Comments

This sequence is finite. Proof: First, let's assume that p_1 = ... = p_r = p, i.e. k = p^r. Then sqrt(p^r) < r*sqrt(p) or p < r^(2/(r-1)) respectively must apply. This inequality is satisfied for p = 2 and 2 <= r <= 6 as well as for p = 3 and r = 2. k can therefore contain at most r = 6 prime factors and is not a prime. By examining the individual ways for the highest value of k as a function of r, we find k = 2*2*2*2*2*2 = 64 for r = 6, k = 2*2*2*2*3 = 48 for r = 5, 2*2*2*5 = 40 for r = 4, 2*2*7 = 28 for r = 3 and 2*11 = 22 for r = 2. Therefore, this sequence is finite and its terms lie between 4 and 64.

Examples

			24 = 2*2*2*3 is in the sequence, because sqrt(24) < sqrt(2) + sqrt(2) + sqrt(2) + sqrt(3).
		

Crossrefs

Programs

  • Maple
    A374954:=proc(k)
       local i,r,s,L;
       if not isprime(k) then
          L:=ifactors(k)[2];
          r:=numelems(L);
          s:=0;
          for i to r do
             s:=s+sqrt(L[i,1])*L[i,2]
          od;
          s:=evalf(s^2);
          if kA374954(k),k=4..64);
Showing 1-10 of 12 results. Next