[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a007504 -id:a007504
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers k such that k divides sum of first k primes A007504(k).
+20
126
1, 23, 53, 853, 11869, 117267, 339615, 3600489, 96643287, 2664167025, 43435512311, 501169672991, 745288471601, 12255356398093, 153713440932055, 6361476515268337
OFFSET
1,2
COMMENTS
a(10) and a(11) were found by Giovanni Resta (Nov 15 2004). He states that there are no other terms for primes p < 4011201392413. See link to Prime Puzzles, Puzzle 31 below. - Alexander Adamchuk, Aug 21 2006
a(13) > pi(2*10^13). - Donovan Johnson, Aug 23 2010
a(15) > 1.42*10^13. - Giovanni Resta, Jan 07 2020
a(16) > 1.55*10^14. - Bruce Garner, Mar 06 2021
a(17) > 6.5*10^15. - Paul W. Dyson, Sep 26 2022
Numbers k such that A090396(k) = 0. - Felix Fröhlich, May 05 2021
LINKS
Javier Cilleruelo and Florian Luca, On the sum of the first n primes, Q. J. Math. 59:4 (2008), 14 pp.
Karl-Heinz Hofmann, Listening to the terms of A090396, YouTube video, 2021.
Kaisa Matomäki, A note on the sum of the first n primes, Quart. J. Math. 61 (2010), pp. 109-115.
Carlos Rivera, Puzzle 31.- The Average Prime number, APN(k) = S(Pk)/k, The Prime Puzzles & Problems Connection.
Eric Weisstein's World of Mathematics, Prime Sums
FORMULA
Matomäki proves that a(n) >> n^(24/19). - Charles R Greathouse IV, Jun 13 2012
EXAMPLE
23 is in the sequence because the sum of the first 23 primes is 874 and that's 23 * 38.
53 is in the sequence because the sum of the first 53 primes is 5830 and that's 53 * 110.
83 is not in the sequence because the sum of the first 83 primes is 15968, which leaves a remainder of 32 when divided by 83.
The sum of the first a(14) primes is equal to a(14)*196523412770096.
MATHEMATICA
s = 0; t = {}; Do[s = s + Prime[n]; If[ Mod[s, n] == 0, AppendTo[t, n]], {n, 1000000}]; t (* Alexander Adamchuk, Aug 21 2006 *)
nn = 4000000; With[{acpr = Accumulate[Prime[Range[nn]]]}, Select[Range[nn], Divisible[acpr[[#]], #] &]] (* Harvey P. Dale, Sep 14 2012 *)
Select[Range[100], Mod[Sum[Prime[i], {i, #}], #] == 0 &] (* Alonso del Arte, Mar 22 2014 based on Bill McEachen's Wolfram Alpha example *)
A007504 = Cases[Import["https://oeis.org/A007504/b007504.txt", "Table"], {_, _}][[All, 2]]; Select[Range[10^5], Divisible[A007504[[# + 1]], #] &] (* Robert Price, Mar 13 2020 *)
PROG
(PARI) s=0; n=0; forprime(p=2, 1e7, s+=p; if(s%n++==0, print1(n", "))) \\ Charles R Greathouse IV, Jul 15 2011
(PARI) isok(n) = (vecsum(primes(n)) % n) == 0; \\ Michel Marcus, Nov 26 2020
(Python)
from itertools import accumulate, count, islice
from sympy import prime
def A045345_gen(): return (i+1 for i, m in enumerate(accumulate(prime(n) for n in count(1))) if m % (i+1) == 0)
A045345_list = list(islice(A045345_gen(), 5)) # Chai Wah Wu, Feb 23 2022
CROSSREFS
KEYWORD
nonn,nice,more
AUTHOR
EXTENSIONS
More terms from Alexander Adamchuk, Aug 21 2006
a(12) from Donovan Johnson, Aug 23 2010
a(13) from Robert Price, Mar 17 2013
a(14) from Giovanni Resta, Jan 07 2020
a(15) from Bruce Garner, Mar 06 2021
a(16) from Paul W. Dyson, Sep 26 2022
STATUS
approved
a(n) = A007504(A134126(n)).
+20
6
2, 5, 17, 58, 129, 5117, 43201, 329401, 1459228, 111461983, 269553485, 316504138, 734845192, 6185946407, 10731178047, 22691403557, 148086969623, 474635764987, 6777574922490, 30458710811303, 215730284567463, 761593685331414, 5875984396617486, 10893968395261326
OFFSET
1,1
COMMENTS
This is the prime partial sum just before the prime is added to achieve an integer mean as defined in A134125.
LINKS
EXAMPLE
The sequence begins with a(1) = 2 (to which 3 is added which leads to a sum 5 associated with A134125(1)).
a(4) = 58 (to which the prime 19 is added, a sum of 77, associated with A134125(4)).
PROG
(UBASIC) 10 'primes using counters 20 N=3:C=1:R=5:print 2; 3, 5 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then N=N+2:goto 30 60 A=A+2:O=A 70 if A<=sqrt(N) then 40 80 C=C+1 90 R=R+N:T=R/C:U=R-N 100 if T=int(T) then print C; U; N; R; T:stop 110 N=N+2:goto 30
(PARI) lista(pmax) = {my(k = 0, s = 2); forprime(p = 3, pmax, k++; s += p; if(!(s % k), print1(s-p, ", "))); } \\ Amiram Eldar, Apr 30 2024
CROSSREFS
KEYWORD
less,nonn
AUTHOR
Enoch Haga, Oct 09 2007
EXTENSIONS
Edited by R. J. Mathar, Apr 17 2009
a(21)-a(24) from Amiram Eldar, Apr 30 2024
STATUS
approved
Prime partial sums A007504(k+1) such that A007504(k+1)/k is integer.
+20
6
5, 10, 28, 77, 160, 5350, 43940, 331608, 1464099, 111509916, 269629588, 316586861, 734973855, 6186337680, 10731699088, 22692172980, 148089006456, 474639489984, 6777589645423, 30458742769120, 215730372141680, 761593852850347, 5875984874989879, 10893969051902225
OFFSET
1,1
COMMENTS
See A134125 and cross-references.
LINKS
FORMULA
a(n) = A007504(A134126(n+1)) .
EXAMPLE
A007504(2)/1 = 5/1 = 5 is integer, so 5 is added to the sequence.
A007504(3)/2 = 10/2 = 5 is integer, so 10 is added to the sequence.
A007504(4)/3 = 17/3 is not integer, so 17 is not added to the sequence.
PROG
(UBASIC) 10 'primes using counters 20 N=3:C=1:R=5:print 2; 3, 5 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then N=N+2:goto 30 60 A=A+2:O=A 70 if A<=sqrt(N) then 40 80 C=C+1 90 R=R+N:T=R/C:U=R-N 100 if T=int(T) then print C; U; N; R; T:stop 110 N=N+2:goto 30
(PARI) lista(pmax) = {my(k = 0, s = 2); forprime(p = 3, pmax, k++; s += p; if(!(s % k), print1(s, ", "))); } \\ Amiram Eldar, Apr 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Enoch Haga, Oct 09 2007
EXTENSIONS
Edited by R. J. Mathar, May 15 2009
a(21)-a(24) from Amiram Eldar, Apr 30 2024
STATUS
approved
Semiprimes in A007504 (the sum of first n primes).
+20
5
10, 58, 77, 129, 381, 501, 791, 1371, 1851, 2127, 2427, 2747, 3831, 4227, 4661, 6081, 6338, 7141, 7418, 9206, 9523, 11599, 12718, 15537, 20059, 20546, 21037, 26369, 27517, 29897, 34915, 36227, 45434, 47721, 48494, 49281, 50887, 51698, 52519, 54169, 57547
OFFSET
1,1
COMMENTS
a(n) = A007504(k(n)), values of k(n) = 3, 7, 8, 10, 16, 18, 22, 28, 32, 34, 36, 38, 44, 46, 48, 54, 55, 58, 59, 65, 66, 72, 75, 82, 92, 93, 94, 104, 106, 110, 118, 120, 133, 136, 137, 138, 140, 141, 142, 144, 148, 150, 154, 156, 164, 168, 170, 174, 190, 194, 202, 210, 212, 218, 224, 226, 232, 234, 236, 244, 246, 249, 250, 256, 264, 272, 276, 277, 286, 294, 298, 300.
Intersection of A007504 and A001358. - Robert Israel, Jun 23 2017
LINKS
EXAMPLE
10 = 2*5 = A007504(3), 58 = 2*29 = A007504(7), 77 = 7*11 = A007504(8).
MAPLE
PS:= ListTools:-PartialSums(select(isprime, [2, seq(i, i=3..10^4, 2)])):
select(numtheory:-bigomega = 2, PS); # Robert Israel, Jun 23 2017
MATHEMATICA
semiPrimeQ[n_Integer] := Total[FactorInteger[n]][[2]] == 2; Select[Accumulate[Prime[Range[100]]], semiPrimeQ] (* T. D. Noe, Apr 20 2011 *)
With[{nn=200}, Select[Accumulate[Prime[Range[nn]]], PrimeOmega[#]==2&]] (* Harvey P. Dale, Dec 22 2018 *)
PROG
(PARI) {a=0; s=[]; forprime(p=2, 10^4, 2==bigomega(a=a+p)&s=concat(s, a)); s}
CROSSREFS
Cf. A013918 (primes in A007504).
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 16 2011
STATUS
approved
Primes of the form A109724[n] = A007504[n^2] or the sum of the first n^2 primes.
+20
4
2, 17, 8893, 24133, 768373, 1583293, 2180741, 3875933, 6426919, 173472547, 289093219, 741938801, 2738357903, 2895147163, 3058653607, 17056871941, 24109439269, 26602406177, 29286422621, 62073696299, 65420584637, 68902997299
OFFSET
1,1
COMMENTS
Numbers n such that A109724[n] = A007504[n^2] is a prime are listed in A122208[n] = {1,2,8,10,22,26,28,32,36,78,88,110,150,152,154,...}.
LINKS
FORMULA
a(n) = A109724[ A122208[n] ] = A007504[ A122208[n]^2 ].
EXAMPLE
Prime 17 = 2 + 3 + 5 + 7 = a(2) is equal to the sum of the first 4 = 2^2 primes.
Prime 24133 = a(4) is equal to sum of the first 100 = 10^2 primes.
MATHEMATICA
s=0; Do[s=Sum[Prime[k], {k, 1, n^2}]; If[PrimeQ[s], Print[{n, n^2, s}]], {n, 1, 154}]
Select[Table[Total[Prime[Range[n^2]]], {n, 500}], PrimeQ] (* Harvey P. Dale, Jul 20 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Aug 25 2006
EXTENSIONS
More terms from Ray Chandler, Dec 02 2018
STATUS
approved
Numbers n such that the sum of the first n^2 primes A109724(n) = A007504(n^2) is a prime.
+20
4
1, 2, 8, 10, 22, 26, 28, 32, 36, 78, 88, 110, 150, 152, 154, 232, 252, 258, 264, 316, 320, 324, 368, 376, 426, 496, 516, 532, 608, 644, 666, 686, 764, 828, 832, 880, 932, 958, 1020, 1090, 1096, 1106, 1122, 1156, 1174, 1206, 1264, 1280, 1282, 1290, 1296, 1326
OFFSET
1,2
COMMENTS
Corresponding primes that are equal to the sum of the first a(n)^2 primes are listed in A122207(n) = {2, 17, 8893, 24133, 768373, 1583293, 2180741, 3875933, 6426919, 173472547, 289093219, 741938801, 2738357903, 2895147163, 3058653607, ...}. - Robert G. Wilson v, Sep 29 2006
LINKS
FORMULA
A122207(n) = A109724( a(n) ) = A007504( a(n)^2 ). - Robert G. Wilson v, Sep 29 2006
MATHEMATICA
s = 0; t = {}; Do[s = s + Sum[Prime@k, {k, (n - 1)^2 + 1, n^2}]; If[PrimeQ@s, AppendTo[t, n]], {n, 1341}]; t (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Aug 25 2006
EXTENSIONS
More terms from Robert G. Wilson v, Sep 29 2006
STATUS
approved
a(n) = gcd(A007504(n), A014285(n)).
+20
4
2, 1, 1, 17, 2, 1, 1, 7, 2, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 3, 8, 1, 1, 1, 20, 43, 1, 3, 4, 1, 1, 1, 28, 1, 1, 3, 2, 1, 1, 1, 2, 3, 107, 1, 4, 1, 1, 1, 2, 7, 1, 1, 10, 3, 1, 1, 30, 1, 1, 1, 2, 5, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 142, 1, 1, 3, 4, 1, 1, 11, 2, 1, 1, 1, 10
OFFSET
1,1
COMMENTS
a(n) is even if n == 1 (mod 4).
LINKS
FORMULA
a(n) = A007504(n)/A307716(n) = A014285(n)/A306834(n).
EXAMPLE
a(4) = gcd(2+3+5+7, 1*2+2*3+3*5+4*7) = gcd(17,51) = 17.
MAPLE
S1:= 0: S2:= 0:
for n from 1 to 100 do
p:= ithprime(n);
S1:= S1 + p;
S2:= S2 + n*p;
A[n]:= igcd(S1, S2);
od:
seq(A[i], i=1..100);
MATHEMATICA
GCD @@ # & /@ Rest@ Nest[Append[#1, {#1[[-1, 1]] + #3, #1[[-1, -1]] + #2 #3}] & @@ {#1, #2, Prime@ #2} & @@ {#, Length@ #} &, {{0, 0}}, 89] (* Michael De Vlieger, Jul 08 2019 *)
PROG
(PARI) a(n) = gcd(sum(k=1, n, prime(k)), sum(k=1, n, k*prime(k))); \\ Michel Marcus, Jul 09 2019
(Magma) p:=PrimesUpTo(1000); [Gcd(&+[p[j]:j in [1..m]], &+[j*p[j]:j in [1..m]]): m in [1..90]]; // Marius A. Burtea, Jul 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Jul 08 2019
STATUS
approved
Numerators of A007504 divided by A033955, starting from the second term of A033955.
+20
3
2, 5, 5, 17, 28, 41, 58, 77, 50, 129, 16, 197, 119, 281, 164, 127, 440, 501, 568, 71, 356, 791, 46, 321, 530, 1161, 1264, 457, 1480, 1593, 344, 1851, 284, 2127, 2276, 809, 2584, 2747, 1457, 441, 1633, 1149, 3638, 3831, 1007, 4227, 4438
OFFSET
1,1
COMMENTS
Conjecture: with the exception of the second term, 2 <= a(n)/A165660(n) < 3.
PROG
(PARI) a1(n)=sum(i=1, n, prime(i));
b1(n)=sum(i=1, n, prime(n+1)%prime(i));
a(n)=if(n<0, 0, numerator(a1(n)/b1(n)));
for(n=1, 50, print1(a(n) ", "))
KEYWORD
easy,nonn
AUTHOR
Creighton Dement, Sep 24 2009
EXTENSIONS
Typo in definition corrected by Creighton Dement, Oct 09 2009
STATUS
approved
Denominators of A007504 divided by A033955, starting from the second term of A033955.
+20
3
1, 3, 2, 8, 13, 18, 27, 29, 23, 56, 7, 74, 44, 98, 67, 49, 171, 200, 217, 28, 137, 309, 17, 116, 209, 448, 471, 174, 571, 629, 137, 739, 111, 793, 853, 318, 997, 1002, 560, 164, 610, 446, 1419, 1466, 385, 1615, 1573, 1633, 1707, 1825, 946, 662, 2221, 781, 1198
OFFSET
1,2
COMMENTS
Conjecture: with the exception of the second term, 2 <= A165659(n)/a(n) < 3.
PROG
(PARI) a1(n)=sum(i=1, n, prime(i)); b1(n)=sum(i=1, n, prime(n+1)%prime(i)); a(n)=if(n<0, 0, denominator(a1(n)/b1(n))); for(n=1, 50, print1(a(n) ", "))
KEYWORD
easy,nonn
AUTHOR
Creighton Dement, Sep 24 2009
EXTENSIONS
Terms corrected by Creighton Dement, Oct 03 2009
Removed a conjecture - R. J. Mathar, Oct 09 2009
Typo in definition corrected by Creighton Dement, Oct 09 2009
STATUS
approved
a(n) = ceiling(A007504(n)/n) - floor(A007504(n)/n); a(n) is 0 if n divides the sum of first n primes, 1 otherwise.
+20
3
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1
COMMENTS
a(n) = 0 for n=1, 23, 53, 853, ... see A045345.
It is conjectured that there are infinitely many zeros, but that their density is zero.
LINKS
Javier Cilleruelo and Florian Luca, On the sum of the first n primes, Q. J. Math. 59:4 (2008), 14 pp.
FORMULA
a(n) = A225804(n) - A060620(n).
MATHEMATICA
Table[Ceiling[(Plus@@Prime[Range[n]])/n]-Floor[(Plus@@Prime[Range[n]])/n], {n, 100}]
PROG
(PARI)
up_to = 105
v007504 = vector(up_to, i, prime(i));
for(i=2, up_to, v007504[i] = v007504[i-1]+v007504[i]); \\ Taking partial sums of primes here.
A007504(n) = v007504[n];
A267084(n) = if(!(A007504(n)%n), 0, 1); \\ Antti Karttunen, Sep 24 2017
(Scheme) (define (A267084 n) (if (zero? (modulo (A007504 n) n)) 0 1)) ;; Antti Karttunen, Sep 24 2017
CROSSREFS
Cf. A007504, A045345 (positions of zeros), A060620, A158682, A225804.
KEYWORD
nonn,easy
AUTHOR
Ctibor O. Zizka, Jan 10 2016
EXTENSIONS
More terms and the second description added to the name by Antti Karttunen, Sep 24 2017
STATUS
approved

Search completed in 0.157 seconds