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 31 results. Next

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A018818 Number of partitions of n into divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 5, 11, 2, 45, 2, 14, 14, 36, 2, 81, 2, 92, 18, 20, 2, 458, 7, 23, 23, 156, 2, 742, 2, 202, 26, 29, 26, 2234, 2, 32, 30, 1370, 2, 1654, 2, 337, 286, 38, 2, 9676, 9, 407, 38, 454, 2, 3132, 38, 3065, 42, 47, 2, 73155, 2, 50, 493, 1828, 44, 5257, 2, 740, 50, 5066
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Dec 11 2009: (Start)
For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n);
For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End)
From Matthew Crawford, Jan 19 2021: (Start)
For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2;
For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End)

Examples

			The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1.
		

Crossrefs

Programs

  • Haskell
    a018818 n = p (init $ a027750_row n) n + 1 where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
  • Maple
    A018818 := proc(n)
        local a,p,w,el ;
        a := 0 ;
        for p in combinat[partition](n) do
            w := true ;
            for el in p do
                if modp(n,el) <> 0 then
                    w := false;
                    break;
                end if;
            end do:
            if w then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* T. D. Noe, Jul 28 2011 *)
  • PARI
    a(n)=numbpartUsing(n, divisors(n));
    numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ Antti Karttunen, Jan 23 2025, after Vladeta Jovovic
    

Formula

Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - Vladeta Jovovic, Sep 28 2002
a(n) = 2 iff n is prime. - Juhani Heino, Aug 27 2009
a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - Reinhard Zumkeller, Dec 11 2009
Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - Charles R Greathouse IV, Dec 04 2012

A014092 Numbers that are not the sum of 2 primes.

Original entry on oeis.org

1, 2, 3, 11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53, 57, 59, 65, 67, 71, 77, 79, 83, 87, 89, 93, 95, 97, 101, 107, 113, 117, 119, 121, 123, 125, 127, 131, 135, 137, 143, 145, 147, 149, 155, 157, 161, 163, 167, 171, 173, 177, 179, 185, 187, 189, 191, 197, 203, 205, 207, 209
Offset: 1

Views

Author

Keywords

Comments

Suggested by the Goldbach conjecture that every even number larger than 2 is the sum of 2 primes.
Since (if we believe the Goldbach conjecture) all the entries > 2 in this sequence are odd, they are equal to 2 + an odd composite number (or 1).
Otherwise said, the sequence consists of 2 and odd numbers k such that k-2 is not prime. In particular there is no element from A006512, greater of a twin prime pair. - M. F. Hasler, Sep 18 2012
Values of k such that A061358(k) = 0. - Emeric Deutsch, Apr 03 2006
Values of k such that A073610(k) = 0. - Graeme McRae, Jul 18 2006

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 2.8 (for Goldbach conjecture).

Crossrefs

Cf. A010051, A000040, A051035 (composites).
Equivalent sequence for prime powers: A071331.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: this sequence (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Haskell
    a014092 n = a014092_list !! (n-1)
    a014092_list = filter (\x ->
       all ((== 0) . a010051) $ map (x -) $ takeWhile (< x) a000040_list) [1..]
    -- Reinhard Zumkeller, Sep 28 2011
    
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..50): gser:=series(g,x=0,230): a:=proc(n) if coeff(gser,x^n)=0 then n else fi end: seq(a(n),n=1..225); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    s1falsifiziertQ[s_]:= Module[{ip=IntegerPartitions[s, {2}], widerlegt=False},Do[If[PrimeQ[ip[[i,1]] ] ~And~ PrimeQ[ip[[i,2]] ], widerlegt = True; Break[]],{i,1,Length[ip]}];widerlegt]; Select[Range[250],s1falsifiziertQ[ # ]==False&] (* Michael Taktikos, Dec 30 2007 *)
    Join[{1,2},Select[Range[3,300,2],!PrimeQ[#-2]&]] (* Zak Seidov, Nov 27 2010 *)
    Select[Range[250],Count[IntegerPartitions[#,{2}],?(AllTrue[#,PrimeQ]&)]==0&] (* _Harvey P. Dale, Jun 08 2022 *)
  • PARI
    isA014092(n)=local(p,i) ; i=1 ; p=prime(i); while(pA014092(a), print(n," ",a); n++)) \\ R. J. Mathar, Aug 20 2006
    
  • Python
    from sympy import prime, isprime
    def ok(n):
        i=1
        x=prime(i)
        while xIndranil Ghosh, Apr 29 2017

Formula

Odd composite numbers + 2 (essentially A014076(n) + 2 ).
Equals {2} union A005408 \ A052147, i.e., essentially the complement of A052147 (or rather A048974) within the odd numbers A005408. - M. F. Hasler, Sep 18 2012

A067187 Numbers that can be expressed as the sum of two primes in exactly one way.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 12, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265, 271
Offset: 1

Views

Author

Amarnath Murthy, Jan 10 2002

Keywords

Comments

All primes + 2 are terms of this sequence. Is 12 the last even term? - Frank Ellermann, Jan 17 2002
A048974, A052147, A067187 and A088685 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003
Values of n such that A061358(n)=1. - Emeric Deutsch, Apr 03 2006

Examples

			4 is a term as 4 = 2+2, 15 is a term as 15 = 13+2.
		

Crossrefs

Subsequence of A014091.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), this sequence (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..80): gser:=series(g,x=0,280): a:=proc(n) if coeff(gser,x^n)=1 then n else fi end: seq(a(n),n=1..272); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    cQ[n_]:=Module[{c=0},Do[If[PrimeQ[n-i]&&PrimeQ[i],c++],{i,2,n/2}]; c==1]; Select[Range[4,271],cQ[#]&] (* Jayanta Basu, May 22 2013 *)
    y = Select[Flatten@Table[Prime[i] + Prime[j], {i, 60}, {j, 1, i}], # < Prime[60] &]; Select[Union[y], Count[y, #] == 1 &] (* Robert Price, Apr 21 2025 *)

Extensions

Edited by Frank Ellermann, Jan 17 2002

A113935 a(n) = prime(n) + 3.

Original entry on oeis.org

5, 6, 8, 10, 14, 16, 20, 22, 26, 32, 34, 40, 44, 46, 50, 56, 62, 64, 70, 74, 76, 82, 86, 92, 100, 104, 106, 110, 112, 116, 130, 134, 140, 142, 152, 154, 160, 166, 170, 176, 182, 184, 194, 196, 200, 202, 214, 226, 230, 232, 236, 242, 244, 254, 260, 266, 272, 274
Offset: 1

Views

Author

Jorge Coveiro, Jan 30 2006

Keywords

Crossrefs

Programs

Formula

a(n) = A116366(n-1,1) for n>1. - Reinhard Zumkeller, Feb 06 2006
a(n) = 2*A098090(n-1) for n > 1. - Reinhard Zumkeller, Sep 14 2006
a(n) = A000040(n) + 3 = A008864(n) + 2 = A052147(n) + 1 = A175221(n) - 1 = A175222(n) - 2 = A139049(n) - 3 = A175223(n) - 4 = A175224(n) - 5 = A140353(n) - 6 = A175225(n) - 7. - Jaroslav Krizek, Mar 06 2010

A175222 a(n) = prime(n) + 5.

Original entry on oeis.org

7, 8, 10, 12, 16, 18, 22, 24, 28, 34, 36, 42, 46, 48, 52, 58, 64, 66, 72, 76, 78, 84, 88, 94, 102, 106, 108, 112, 114, 118, 132, 136, 142, 144, 154, 156, 162, 168, 172, 178, 184, 186, 196, 198, 202, 204, 216, 228, 232, 234, 238, 244, 246, 256, 262, 268, 274, 276
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Comments

a(n) = A000040(n) + 5 = A008864(n) + 4 = A052147(n) + 3 = A113395(n) + 2 = A175221 (n) + 1 = A139049(n) - 1 = A175223(n) - 2 = A175224(n) - 3 = A140353(n) - 4 = A175225(n) - 5.

Crossrefs

Programs

Extensions

More terms from Vincenzo Librandi, Mar 14 2010

A140353 a(n) = prime(n) + 9.

Original entry on oeis.org

11, 12, 14, 16, 20, 22, 26, 28, 32, 38, 40, 46, 50, 52, 56, 62, 68, 70, 76, 80, 82, 88, 92, 98, 106, 110, 112, 116, 118, 122, 136, 140, 146, 148, 158, 160, 166, 172, 176, 182, 188, 190, 200, 202, 206, 208, 220, 232, 236, 238, 242, 248, 250, 260, 266, 272, 278, 280, 286
Offset: 1

Views

Author

Odimar Fabeny, May 30 2008

Keywords

Comments

a(n) = A000040(n) + 9 = A008864(n) + 8 = A052147(n) + 7 = A113395(n) + 6 = A175221(n) + 5 = A175222(n) + 4 = A139049(n) + 3 = A175223(n) + 2 = A175224(n) + 1 = A175225(n) - 1. - Jaroslav Krizek, Mar 06 2010

Crossrefs

Programs

  • GAP
    Filtered([1..300], k-> IsPrime(k) ) +9 # G. C. Greubel, May 20 2019
  • Magma
    [NthPrime(n)+9: n in [1..70]]; // G. C. Greubel, May 20 2019
    
  • Mathematica
    9 + Prime[Range[70]] (* G. C. Greubel, May 20 2019 *)
  • PARI
    A140353(n) = prime(n)+9
    
  • Sage
    [nth_prime(n) +9 for n in (1..70)] # G. C. Greubel, May 20 2019
    

Extensions

Edited by Michael B. Porter, Jan 28 2010

A175221 a(n) = prime(n) + 4.

Original entry on oeis.org

6, 7, 9, 11, 15, 17, 21, 23, 27, 33, 35, 41, 45, 47, 51, 57, 63, 65, 71, 75, 77, 83, 87, 93, 101, 105, 107, 111, 113, 117, 131, 135, 141, 143, 153, 155, 161, 167, 171, 177, 183, 185, 195, 197, 201, 203, 215, 227, 231, 233, 237, 243, 245, 255, 261, 267, 273, 275
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Programs

Formula

a(n) = A000040(n) + 4 = A008864(n) + 3 = A052147(n) + 2 = A113395(n) + 1.
a(n) = A175222(n) - 1 = A139049(n) - 2 = A175223(n) - 3.
a(n) = A175224(n) - 4 = A140353(n) - 5 = A175225(n) - 6.

Extensions

More terms from Vincenzo Librandi, Mar 14 2010

A139049 a(n) = prime(n) + 6.

Original entry on oeis.org

8, 9, 11, 13, 17, 19, 23, 25, 29, 35, 37, 43, 47, 49, 53, 59, 65, 67, 73, 77, 79, 85, 89, 95, 103, 107, 109, 113, 115, 119, 133, 137, 143, 145, 155, 157, 163, 169, 173, 179, 185, 187, 197, 199, 203, 205, 217, 229, 233, 235, 239, 245, 247, 257, 263, 269, 275, 277
Offset: 1

Views

Author

Odimar Fabeny, Jun 02 2008

Keywords

Comments

a(n) = A000040(n) + 6 = A008864(n) + 5 = A052147(n) + 4 = A113395(n) + 3 = A175221(n) + 2 = A175222(n) + 1 = A175223(n) - 1 = A175224(n) - 2 = A140353(n) - 3 = A175225(n) - 4. - Jaroslav Krizek, Mar 06 2010

Crossrefs

Cf. A140353.

Programs

Extensions

Edited by Michael B. Porter, Jan 28 2010

A175223 a(n) = prime(n) + 7.

Original entry on oeis.org

9, 10, 12, 14, 18, 20, 24, 26, 30, 36, 38, 44, 48, 50, 54, 60, 66, 68, 74, 78, 80, 86, 90, 96, 104, 108, 110, 114, 116, 120, 134, 138, 144, 146, 156, 158, 164, 170, 174, 180, 186, 188, 198, 200, 204, 206, 218, 230, 234, 236, 240, 246, 248, 258, 264, 270, 276, 278
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Comments

a(n) = A000040(n) + 7 = A008864(n) + 6 = A052147(n) + 5 = A113395(n) + 4 = A175221(n) + 3 = A175222 (n) + 2 = A139049(n) + 1 = A175224(n) - 1 = A140353(n) - 2 = A175225(n) - 3.

Programs

Extensions

More terms from Vincenzo Librandi, Mar 14 2010
Showing 1-10 of 31 results. Next