Displaying 1-10 of 48 results found.
4, 9, 13, 27, 23, 41, 33, 55, 83, 51, 103, 89, 69, 103, 143, 155, 95, 175, 147, 113, 205, 171, 227, 289, 201, 155, 215, 165, 229, 547, 255, 329, 205, 489, 221, 373, 385, 319, 407, 419, 263, 611, 279, 373, 289, 763
Decimal expansion of Sum_{n>=1} 1/ A033286(n)^2.
+20
0
2, 8, 4, 1, 7, 0, 7, 0, 5, 4, 7, 0, 8, 6, 8, 2, 5, 0, 1, 7, 7, 1, 4
COMMENTS
The convergence is very slow, need to use the first 100000000 primes to obtain the correct value of the coefficient of 10^(-23).
The constant is in the interval [0.28417070547086825017714, 0.28417070547086825017743]; these safe limits are computed by accumulating in parallel the partial sum of the lower estimate 1/n^4 = Zeta(4). - R. J. Mathar, Feb 06 2015
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i, 0
DIM j, 0
DIM n
DIM m
DIMS t
OPENFILEOUT myf, a(n).txt
OPENFILEIN maf, pre.txt
LABEL loop1
SET i, i+1
IF i>10000000 THEN END
GETNEXT n, maf
SET j, j+10^10000/((i*n)^2)
IF i%1000000==0 THEN SET m, j/10^9970
IF i%1000000==0 THEN WRITE myf, m
GOTO loop1
Sum of the first n primes.
(Formerly M1370)
+10
495
0, 2, 5, 10, 17, 28, 41, 58, 77, 100, 129, 160, 197, 238, 281, 328, 381, 440, 501, 568, 639, 712, 791, 874, 963, 1060, 1161, 1264, 1371, 1480, 1593, 1720, 1851, 1988, 2127, 2276, 2427, 2584, 2747, 2914, 3087, 3266, 3447, 3638, 3831, 4028, 4227, 4438, 4661, 4888
COMMENTS
This is true. Proof: By definition we have A034960(n) = Sum_{k = (a(n-1)+1)..a(n)} (2*k-1). Since Sum_{k = 1..n} (2*k-1) = n^2, it follows A034960(n) = a(n)^2 - a(n-1)^2, for n > 1. - Hieronymus Fischer, Sep 27 2012 [formulas above adjusted to changed offset of A034960 - Hieronymus Fischer, Oct 14 2012]
Ramanujan noticed the apparent identity between the prime parts partition numbers A000607 and the expansion of Sum_{k >= 0} x^a(k)/((1-x)...(1-x^k)), cf. A046676. See A192541 for the difference between the two. - M. F. Hasler, Mar 05 2014
a(n) is the smallest number that can be partitioned into n distinct primes. - Alonso del Arte, May 30 2017
For a(n) < m < a(n+1), n > 0, at least one m is a perfect square.
Proof: For n = 1, 2, ..., 6, the proposition is clear. For n > 6, a(n) < ((prime(n) - 1)/2)^2, set (k - 1)^2 <= a(n) < k^2 < ((prime(n) + 1)/2)^2, then k^2 < (k - 1)^2 + prime(n) <= a(n) + prime(n) = a(n+1), so m = k^2 is this perfect square. - Jinyuan Wang, Oct 04 2018
For n >= 5 we have a(n) < ((prime(n)+1)/2)^2. This can be shown by noting that ((prime(n)+1)/2)^2 - ((prime(n-1)+1)/2)^2 - prime(n) = (prime(n)+prime(n-1))*(prime(n)-prime(n-1)-2)/4 >= 0. - Jianing Song, Nov 13 2022
REFERENCES
E. Bach and J. Shallit, §2.7 in Algorithmic Number Theory, Vol. 1: Efficient Algorithms, MIT Press, Cambridge, MA, 1996.
H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205-206.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) ~ n^2 * log(n) / 2. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 24 2001 (see Bach & Shallit 1996)
For n >= 3, a(n) >= (n-1)^2 * (log(n-1) - 1/2)/2 and a(n) <= n*(n+1)*(log(n) + log(log(n))+ 1)/2. Thus a(n) = n^2 * log(n) / 2 + O(n^2*log(log(n))). It is more precise than in Fares's comment. - Vladimir Shevelev, Aug 01 2013
a(n) = (n^2/2)*(log n + log log n - 3/2 + (log log n - 3)/log n + (2 (log log n)^2 - 14 log log n + 27)/(4 log^2 n) + O((log log n/log n)^3)) [Sinha]. - Charles R Greathouse IV, Jun 11 2015
MAPLE
s1:=[2]; for n from 2 to 1000 do s1:=[op(s1), s1[n-1]+ithprime(n)]; od: s1;
add(ithprime(i), i=1..n) ;
MATHEMATICA
Accumulate[Prime[Range[100]]] (* Zak Seidov, Apr 10 2011 *)
primeRunSum = 0; Table[primeRunSum = primeRunSum + Prime[k], {k, 100}] (* Zak Seidov, Apr 16 2011 *)
PROG
(Magma) [0] cat [&+[ NthPrime(k): k in [1..n]]: n in [1..50]]; // Bruno Berselli, Apr 11 2011 (adapted by Vincenzo Librandi, Nov 27 2015 after Hasler's change on Mar 05 2014)
(Haskell)
a007504 n = a007504_list !! n
a007504_list = scanl (+) 0 a000040_list
(GAP) P:=Filtered([1..250], IsPrime);;
a:=Concatenation([0], List([1..Length(P)], i->Sum([1..i], k->P[k]))); # Muniru A Asiru, Oct 07 2018
(Python)
from itertools import accumulate, count, islice
from sympy import prime
def A007504_gen(): return accumulate(prime(n) if n > 0 else 0 for n in count(0))
CROSSREFS
Cf. A000041, A034386, A111287, A013916, A013918 (primes), A045345, A050247, A050248, A068873, A073619, A034387, A014148, A014150, A178138, A254784, A254858.
See A122989 for the value of Sum_{n >= 1} 1/a(n).
a(n) = prime(n)-n, the number of nonprimes less than prime(n).
+10
72
1, 1, 2, 3, 6, 7, 10, 11, 14, 19, 20, 25, 28, 29, 32, 37, 42, 43, 48, 51, 52, 57, 60, 65, 72, 75, 76, 79, 80, 83, 96, 99, 104, 105, 114, 115, 120, 125, 128, 133, 138, 139, 148, 149, 152, 153, 164, 175, 178, 179, 182, 187, 188, 197, 202, 207, 212, 213, 218, 221, 222
COMMENTS
a(n) = A000040(n) - n. a(n) = inverse (frequency distribution) sequence of A073425(n), i.e., number of terms of sequence A073425(n) less than n. a(n) = A065890(n) + 1, for n >= 1. a(n) - 1 = A065890(n) = the number of composite numbers, i.e., ( A002808) less than n-th primes, (i.e., < A000040(n)). - Jaroslav Krizek, Jun 27 2009
Conjecture: Each residue class contains infinitely many terms of this sequence. Similarly, for any integers m > 0 and r, we have prime(n) + n == r (mod m) for infinitely many positive integers n. - Zhi-Wei Sun, Nov 25 2013
First differences are A046933 = differences minus one between successive primes. - Gus Wiseman, Jan 18 2020
PROG
(Haskell)
a014689 n = a000040 n - fromIntegral n
(Python)
from sympy import prime
CROSSREFS
The sum of prime factors of n is A001414(n).
The sum of prime indices of n is A056239(n).
EXTENSIONS
More terms from Vasiliy Danilov (danilovv(AT)usa.net), July 1998
a(n) = Sum_{j=1..n} j*prime(j).
+10
14
2, 8, 23, 51, 106, 184, 303, 455, 662, 952, 1293, 1737, 2270, 2872, 3577, 4425, 5428, 6526, 7799, 9219, 10752, 12490, 14399, 16535, 18960, 21586, 24367, 27363, 30524, 33914, 37851, 42043, 46564, 51290, 56505, 61941, 67750, 73944, 80457, 87377, 94716, 102318
COMMENTS
Two consecutive terms cannot both be divisible by 4. - Tamas Sandor Nagy, Aug 04 2024
MATHEMATICA
Accumulate[Table[i*Prime[i], {i, 40}]] (* Harvey P. Dale, Sep 10 2014 *)
PROG
(Magma) [&+[k*NthPrime(k): k in [1..n]]: n in [1..40]]; // Bruno Berselli, Apr 30 2011
(PARI) {a(n) = sum(j=1, n, j*prime(j))}; \\ G. C. Greubel, Jun 18 2019
(Sage) [sum(j*nth_prime(j) for j in (1..n)) for n in (1..40)] # G. C. Greubel, Jun 18 2019
EXTENSIONS
Offset changed to 1 and six terms added by Bruno Berselli, Apr 30 2011
a(n) = n*prime(n) - Sum_{i=1..n} prime(i).
+10
12
0, 1, 5, 11, 27, 37, 61, 75, 107, 161, 181, 247, 295, 321, 377, 467, 563, 597, 705, 781, 821, 947, 1035, 1173, 1365, 1465, 1517, 1625, 1681, 1797, 2217, 2341, 2533, 2599, 2939, 3009, 3225, 3447, 3599, 3833, 4073, 4155, 4575, 4661
COMMENTS
a(n) is also the area under the curve of the function pi(x) from 0 to prime(n). - Omar E. Pol, Nov 13 2013
EXAMPLE
For n = 5 the 5th prime is 11 and the sum of first five primes is 2 + 3 + 5 + 7 + 11 = 28, so a(5) = 5*11 - 28 = 27.
Illustration of a(5) = 27:
Consider a diagram in the first quadrant of the square grid in which the number of cells in the n-th horizontal bar is equal to the n-th prime, as shown below:
. _ _ _ _ _ _ _ _ _ _ _
. 11 |_ _ _ _ _ _ _ _ _ _ _|
. 7 |_ _ _ _ _ _ _|* * * *
. 5 |_ _ _ _ _|* * * * * *
. 3 |_ _ _|* * * * * * * *
. 2 |_ _|* * * * * * * * *
.
a(5) is also the area (or the number of cells, or the number of *'s) under the bar's structure of prime numbers: a(5) = 1 + 4 + 6 + 16 = 27.
(End)
MATHEMATICA
nn = 100; p = Prime[Range[nn]]; Range[nn] p - Accumulate[p] (* T. D. Noe, May 02 2011 *)
PROG
(Sage) [n*nth_prime(n) - sum(nth_prime(j) for j in range(1, n+1)) for n in range(1, 45)] # Danny Rorabaugh, Apr 18 2015
(PARI) vector(80, n, n*prime(n) - sum(k=1, n, prime(k))) \\ Michel Marcus, Apr 20 2015
(Python)
from sympy import prime, primerange
CROSSREFS
Cf. A000040, A000720, A001223, A006093, A007504, A033286, A046992, A090942, A117495, A141042 (first differences), A189892, A230849, A230850, A247380.
a(1) = 1; a(n) = a(n-1)*prime(a(n-1)).
+10
10
1, 2, 6, 78, 30966, 11234495766, 3197149582479668022558
COMMENTS
Previous term * prime(previous term). Previous term + prime(previous term) is A074271.
Matula-Goebel numbers of the finite ordinal numbers; see also A007097. - Gus Wiseman, Aug 30 2016
Numbers k such that k*prime(k) is a palindrome.
+10
9
1, 2, 5, 12, 16, 3623, 4119, 618725, 708567, 1498739, 2762990591
EXAMPLE
4119 is in the sequence since the 4119th prime is 39119 and 4199*39119 = 161131161 is a palindrome.
MAPLE
ispal:= proc(n) local L;
L:= convert(n, base, 10);
L = ListTools:-Reverse(L);
end proc:
R:= NULL: count:= 0: p:= 1:
for k from 1 while count < 11 do
p:= nextprime(p);
if ispal(k*p) then R:= R, k; count:= count+1 fi
od:
MATHEMATICA
palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; t={}; Do[If[palQ[Prime[n]*n], AppendTo[t, n]], {n, 15*10^5}]; t (* Jayanta Basu, May 11 2013 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d); \\ A002113
(Python)
from sympy import sieve
def ok(n): return n and (s := str(n*sieve[n])) == s[::-1]
Numbers n such that n*prime(n)+(n+1)*prime(n+1)+(n+2)*prime(n+2) is prime.
+10
9
1, 6, 12, 20, 22, 24, 28, 30, 34, 56, 60, 142, 144, 148, 168, 192, 196, 230, 252, 260, 276, 282, 304, 322, 334, 344, 346, 352, 366, 374, 380, 386, 394, 404, 418, 424, 432, 440, 444, 470, 478, 484, 572, 590, 610, 612, 630, 642, 662, 684, 754, 766, 784, 790, 840, 842, 874, 886
EXAMPLE
n=1: 1*prime(1) + 2*prime(2) + 3*prime(3) = 1*2 + 2*3 + 3*5 = 23 prime,
n=6: 6*prime(6) + 7*prime(7) + 8*prime(8) = 6*13 + 7*17 + 8*19 = 349 prime. - Zak Seidov, Feb 18 2016
MATHEMATICA
bb={}; Do[If[PrimeQ[n Prime[n]+(n+1) Prime[n+1]+(n+2) Prime[n+2]], bb=Append[bb, n]], {n, 1, 400}]; bb
Select[Range@ 900, PrimeQ[# Prime[#] + (# + 1) Prime[# + 1] + (# + 2) Prime[# + 2]] &] (* Michael De Vlieger, Feb 05 2016 *)
PROG
(PARI) lista(nn) = {for(n=1, nn, if(ispseudoprime(n*prime(n)+(n+1)*prime(n+1)+(n+2)*prime(n+2)), print1(n, ", "))); } \\ Altug Alkan, Feb 05 2016
(Magma) [n: n in [1..1000] | IsPrime(n*NthPrime(n)+(n+1)*NthPrime(n+1)+(n+2)*NthPrime(n+2))]; // Vincenzo Librandi, Feb 06 2016
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
m, p, q, r = 1, 2, 3, 5
while True:
t = m*p + (m+1)*q + (m+2)*r
if isprime(t): yield m
m, p, q, r = m+1, q, r, nextprime(r)
a(n) = n*(n-th prime) + (n+1)*((n+1)-th prime).
+10
9
8, 21, 43, 83, 133, 197, 271, 359, 497, 631, 785, 977, 1135, 1307, 1553, 1851, 2101, 2371, 2693, 2953, 3271, 3647, 4045, 4561, 5051, 5407, 5777, 6157, 6551, 7327, 8129, 8713, 9247, 9941, 10651, 11245, 12003, 12707, 13433, 14259, 14941, 15815, 16705
EXAMPLE
5*(fifth prime) + 6*(sixth prime) = 5*11 + 6*13 = 55 + 78 = 133.
MATHEMATICA
Total/@Partition[Times@@@Table[{n, Prime[n]}, {n, 50}], 2, 1] (* Harvey P. Dale, Aug 13 2019 *)
PROG
(Magma) [ n*NthPrime(n)+(n+1)*NthPrime(n+1): n in [1..43] ];
(PARI) a(n) = n*prime(n) + (n+1)*prime(n+1); \\ Michel Marcus, Feb 05 2016
Search completed in 0.021 seconds
|