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.

Previous Showing 31-40 of 54 results. Next

A063959 Sum of the primes from 1 to n!.

Original entry on oeis.org

0, 0, 2, 10, 100, 1593, 41741, 1578242, 80294846, 5356015580, 451223209946, 46900682786541, 5891009442510166, 879657744587755114, 153967535281046615774, 31216213430872403460411, 7256556722488434503836458, 1917031284234466887065107947, 571083301099266868435687532291
Offset: 0

Views

Author

Jason Earls, Sep 03 2001

Keywords

Comments

Sum of prime factors (without repetition) of (n!)!.

Examples

			a(4) = sum of primes <= 24. They are 2, 3, 5, 7, 11, 13, 17, 19 and 23. This sum is 100.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ ! PrimeQ[k], k++ ]; k); s = 0; p = 1; Do[ Do[p = NextPrim[p]; s = s + p, {i, PrimePi[(n - 1)! ] + 1, PrimePi[(n)! ]}]; Print[s], {n, 1, 12} ]
    Do[ Print[ Sum[ Prime[k], {k, 1, PrimePi[n! ]}]], {n, 0, 10} ]
    Table[Total[Prime[Range[PrimePi[n!]]]],{n,0,9}] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Aug 17 2025 *)
  • PARI
    sumprime(n,s,fac,i)=fac=factor(n); for(i=1,matsize(fac)[1],s=s+fac[i,1]); return(s); for(n=0,22,print(sumprime(n!!)))

Formula

a(n) = A034387(A000142(n)). - Michel Marcus, Jun 14 2024

Extensions

Better description and more terms from Robert G. Wilson v, Oct 04 2001
a(13)-a(15) from Donovan Johnson, May 03 2010
a(16)-a(18) from Daniel Suteu, Nov 15 2018

A063960 Sum of non-unitary prime divisors of n!: sum of those prime divisors for which the exponent in the prime factorization exceeds 1.

Original entry on oeis.org

0, 0, 0, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 17, 17, 17, 17, 17, 17, 17, 17, 28, 28, 28, 28, 41, 41, 41, 41, 41, 41, 41, 41, 58, 58, 58, 58, 77, 77, 77, 77, 77, 77, 77, 77, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 129, 129, 129, 129, 160, 160, 160, 160
Offset: 1

Views

Author

Labos Elemer, Sep 04 2001

Keywords

Comments

Sum of the prime numbers among the smallest parts of the partitions of n into two parts. For example, a(8)=5; the partitions of 8 into two parts are (7,1), (6,2), (5,3) and (4,4). The prime numbers among the smallest parts are 2 and 3, so 2 + 3 = 5. - Wesley Ivan Hurt, Nov 01 2017
Number of distinct rectangles with integer length and prime width such that L + W = n, W <= L. For a(14)=17; the rectangles are 2 X 12, 3 X 11, 5 X 9, and 7 X 7. The sum of the lengths are then 2+3+5+7 = 17. - Wesley Ivan Hurt, Nov 08 2017

Examples

			20! = (2^18)*(3^8)*(5^4)*(7^2)*11*13*17*19, the non-unitary prime divisors are {2, 3, 5, 7}, so a(20) = 2 + 3 + 5 + 7 = 17.
		

Crossrefs

Programs

  • Maple
    seq(add(j, j=select(isprime, [$1..iquo(n,2)])), n=1..65); # Peter Luschny, Nov 28 2022
  • Mathematica
    Join[{0,0,0},Table[Total[Transpose[Select[FactorInteger[n!], Last[#]>1&]][[1]]],{n,4,70}]] (* Harvey P. Dale, Jun 19 2013 *)
  • PARI
    { for (n=1, 1000, f=factor(n!)~; a=0; for (i=1, length(f), if (f[2, i]>1, a+=f[1, i])); write("b063960.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 04 2009

Formula

a(n) = Sum_{i=1..floor(n/2)} i * A010051(i). - Wesley Ivan Hurt, Oct 31 2017
a(n) = A034387(floor(n/2)) for n >= 2. - Georg Fischer, Nov 28 2022
a(n) = A063958(n!). - Amiram Eldar, Jul 24 2024

A074793 Sum of prime powers less than or equal to n.

Original entry on oeis.org

0, 2, 5, 9, 14, 14, 21, 29, 38, 38, 49, 49, 62, 62, 62, 78, 95, 95, 114, 114, 114, 114, 137, 137, 162, 162, 189, 189, 218, 218, 249, 281, 281, 281, 281, 281, 318, 318, 318, 318, 359, 359, 402, 402, 402, 402, 449, 449, 498, 498, 498, 498, 551, 551, 551, 551, 551
Offset: 1

Views

Author

Benoit Cloitre, Sep 07 2002

Keywords

Examples

			a(10)=38 because 2,3,4,5,7,8,9 are the prime powers less than or equal to 10 and 2+3+4+5+7+8+9 = 38.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimePowerQ[n],n,0],{n,60}]] (* Harvey P. Dale, Oct 04 2019 *)
  • PARI
    a(n)=sum(k=1,n,k*if(omega(k)-1,0,1))

Formula

Is a(n) asymptotic to c*n^2/log(n) with c=0.55...?
From Daniel Suteu, Aug 20 2023: (Start)
a(n) = Sum_{k=1..floor(log_2(n))} Sum_{p prime <= n^(1/k)} p^k.
a(n) = A034387(n) + A081738(A000196(n)) + Sum_{p prime <= n^(1/3)} ((p^(floor(log_p(n))+1) - 1)/(p-1) - p^2 - p - 1). (End)

A143537 Triangle read by rows: T(n,k) = number of primes in the interval [k..n], n >= 1, 1 <= k <= n.

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 2, 1, 0, 3, 3, 2, 1, 1, 3, 3, 2, 1, 1, 0, 4, 4, 3, 2, 2, 1, 1, 4, 4, 3, 2, 2, 1, 1, 0, 4, 4, 3, 2, 2, 1, 1, 0, 0, 4, 4, 3, 2, 2, 1, 1, 0, 0, 0, 5, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 5, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0, 6, 6, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Aug 23 2008

Keywords

Comments

Old name: triangle read by rows, A000012 * A143536, 1<=k<=n.

Examples

			Triangle T(n,k) begins:
n\k 1  2  3  4  5  6  7  8 ...
1:  0;
2:  1, 1;
3:  2, 2, 1;
4:  2, 2, 1, 0;
5:  3, 3, 2, 1, 1;
6:  3, 3, 2, 1, 1, 0;
7:  4, 4, 3, 2, 2, 1, 1;
8:  4, 4, 3, 2, 2, 1, 1, 0;
...
		

Crossrefs

Row sums are A034387.
Column k=1 gives A000720.
Main diagonal gives A010051.
T(2n,n) gives A035250.
Cf. A143536.

Formula

T(n,k) = pi(n) - pi(k-1), where pi = A000720. - Ilya Gutkovskiy, Mar 19 2020

Extensions

New name and corrected by Ilya Gutkovskiy, Mar 19 2020

A294113 Sum of the smaller parts of the partitions of 2n into two parts with larger part prime.

Original entry on oeis.org

0, 3, 4, 4, 8, 6, 11, 8, 13, 20, 28, 24, 32, 25, 32, 41, 51, 42, 51, 40, 49, 60, 72, 60, 72, 84, 97, 111, 125, 109, 124, 107, 121, 136, 152, 169, 188, 169, 187, 206, 226, 204, 224, 199, 218, 238, 258, 229, 248, 268, 289, 312, 336, 306, 331, 357, 384, 412
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 22 2017

Keywords

Examples

			For n=7, 2n = 14 can be partitioned into two parts with the larger part prime as 13 + 1, 11 + 3, and 7 + 7. So a(7) = 1 + 3 + 7 = 11. - _Michael B. Porter_, Mar 14 2018
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1)..a(n)
    P:= select(isprime, [2,seq(i,i=3..2*N,2)]):
    S:= ListTools:-PartialSums(P):
    f:= proc(n) local k1,k2;
         k1:= numtheory:-pi(2*n);
         k2:= numtheory:-pi(n-1);
         2*n*(k1-k2) - S[k1] + S[k2]
    end proc:
    f(1):= 0:
    seq(f(n),n=1..N); # Robert Israel, Mar 13 2018
  • Mathematica
    Table[Sum[i (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n}], {n, 80}]
  • PARI
    a(n) = sum(k=1, n, k*isprime(2*n-k)); \\ Michel Marcus, Oct 24 2017
    
  • PARI
    a(n) = my(res = 0); forprime(p = n, 2*n, res+=(2*n - p)); res \\ David A. Corneth, Oct 24 2017

Formula

a(n) = Sum_{i=1..n} i * A010051(2n-i).
a(n) = 2*n*(A000720(2*n)-A000720(n-1)) - A034387(2*n) + A034387(n-1) for n >= 2. - Robert Israel, Mar 13 2018

A341700 Sum of the primes p satisfying n < p <= 2n.

Original entry on oeis.org

2, 3, 5, 12, 7, 18, 24, 24, 41, 60, 49, 72, 59, 59, 88, 119, 102, 102, 120, 120, 161, 204, 181, 228, 228, 228, 281, 281, 252, 311, 341, 341, 341, 408, 408, 479, 515, 515, 515, 594, 553, 636, 593, 593, 682, 682, 635, 635, 732, 732, 833, 936, 883, 990, 1099, 1099
Offset: 1

Views

Author

Chai Wah Wu, Feb 17 2021

Keywords

Comments

For n >= 2, a(n) is the sum of the prime numbers appearing in the 2nd row of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 17 2021

Examples

			a(7) = 24 = 11+13 (sum of primes larger than 7 and less than or equal to 14).
		

Crossrefs

Programs

  • Mathematica
    Array[Total@ Select[Range[# + 1, 2 #], PrimeQ] &, 56] (* Michael De Vlieger, Feb 17 2021 *)
  • Python
    from sympy import nextprime
    def A341700(n):
        s, m = 0, nextprime(n)
        while m <= 2*n:
            s += m
            m = nextprime(m)
        return s

Formula

a(n) = A034387(2*n) - A034387(n).
a(n) = A073837(n) if n is not a prime. Otherwise, a(n) = A073837(n)-n.
For n >= 2, a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} A010051(A128076(k)) * A128076(k). - Wesley Ivan Hurt, Jan 08 2022

A380118 a(n) = Sum_{k=1..n} (A014963(k) - A061397(k)).

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 4, 6, 9, 10, 10, 11, 11, 12, 13, 15, 15, 16, 16, 17, 18, 19, 19, 20, 25, 26, 29, 30, 30, 31, 31, 33, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 41, 42, 43, 44, 44, 45, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 60, 61, 61, 62, 63, 65, 66, 67, 67, 68, 69, 70
Offset: 1

Views

Author

Peter Luschny, Jan 30 2025

Keywords

Crossrefs

Programs

  • Maple
    pSum := L -> ListTools:-PartialSums(L): h := n -> n/A048671(n) - n*A010051(n):
    aList := upto -> pSum([seq(h(k), k = 1..upto)]): aList(70);
  • Mathematica
    Accumulate[Table[Exp[MangoldtLambda[n]] - If[PrimeQ[n], n, 0] , {n, 1, 70}]]

Formula

a(n) = A072107(n) - A034387(n). - Amiram Eldar, Jan 30 2025

A089895 Prime numbers p for which there exists an integer q > p such that the sum of all primes <= p equals the sum of all primes between p+1 and q.

Original entry on oeis.org

3, 3833, 468872968241
Offset: 1

Views

Author

Randy L. Ekl, Jan 10 2004

Keywords

Comments

Primes p such that 2*A034387(p) is a term of A034387. - Max Alekseyev, Aug 24 2023
No other terms below 10^13. - Max Alekseyev, Aug 25 2023

Examples

			2+3+5+...+3833 = 3847+...+5557 and therefore 3833 is in the sequence.
		

Programs

  • Mathematica
    a[m_] := Module[{pLst, cumsum, p, q, k, target, idx}, pLst = Prime[Range[PrimePi[m]]]; cumsum = Accumulate[pLst]; pairs = {}; For[k = 1, k <= Length[pLst], k++, p = pLst[[k]]; target = 2*cumsum[[k]]; idx = FirstPosition[Drop[cumsum, k], target]; If[idx =!= Missing["NotFound"], q = pLst[[k + First[idx]]]; If[q > p, AppendTo[pairs, p];]]]; pairs]; a[10000] (* Robert P. P. McKone, Aug 25 2023 *)
  • PARI
    p=2;s=2;q=3;t=3;while(p<512345678900, while(s<=t,p=nextprime(p+1);s=s+p;t=t-p);if (s==t,print1(p,", "),);while(t
    				

Extensions

Better definition from Adam M. Kalman (mocha(AT)clarityconnect.com), Jun 16 2005
Edited by Max Alekseyev, Aug 24 2023

A139390 Sum of primes <= 3^n.

Original entry on oeis.org

0, 5, 17, 100, 791, 5830, 42468, 327198, 2575838, 20476640, 166554645, 1353822880, 11150031169, 92258920888, 769310640408, 6447635236133, 54292816788848, 459112338326268, 3896226837717653, 33172345145637461, 283258796052356059, 2425130743589880412, 20812174068479995267
Offset: 0

Views

Author

Cino Hilliard, Jun 09 2008

Keywords

Comments

For large n, these numbers can be closely approximated by the number of primes < (3^n)^2. For example, the sum of primes < 3^12 = 11150031169. The number of primes < (3^12)^2 = 3^24 = 11152818693. The error here 0.000250.
The second term, 5, is the addition of the primes 2 and 3 since we defined the sequence as less than or equal.

Crossrefs

Programs

  • PARI
    a(n) = vecsum(primes([1, 3^n])); \\ Michel Marcus, Jul 02 2024

Formula

a(n) = A034387(A000244(n)). - Amiram Eldar, Jul 02 2024

Extensions

Duplicated term removed and a(20)-a(22) added by Amiram Eldar, Jul 02 2024

A140234 Sum of the semiprimes <= n.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 10, 10, 10, 19, 29, 29, 29, 29, 43, 58, 58, 58, 58, 58, 58, 79, 101, 101, 101, 126, 152, 152, 152, 152, 152, 152, 152, 185, 219, 254, 254, 254, 292, 331, 331, 331, 331, 331, 331, 331, 377, 377, 377, 426, 426, 477, 477, 477, 477, 532, 532, 589
Offset: 0

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A034387 is to primes A000040. From the prime number theorem A034387(n) has the asymptotic expression: a(n) ~ n^2 / (2 log n), so what is the asymptotic expression for a(n)?

Crossrefs

Programs

  • Mathematica
    a[n_]:=Total[Select[Range[n],PrimeOmega[#]==2&]];Array[a,58,0] (* James C. McMahon, Jul 06 2025 *)

Formula

a(n) = Sum_{j such that j is in A001358 and j<=n} = A062198(A072000(n)).
Previous Showing 31-40 of 54 results. Next