A363477
Numbers that are integer averages of first k odd primes for some k.
Original entry on oeis.org
3, 4, 5, 133, 169, 1117, 2406, 3564, 6141, 7429, 8220, 8475, 14193, 33543, 121049, 211785, 877650, 5948070, 8494543, 27820975, 41428418, 130490020, 139053727, 200325407, 291720414, 893706168, 977748014, 2103851425, 2173904606, 5996888467, 15790305181
Offset: 1
5 is a term because 5 is the average of the first 3 odd primes, 3, 5 and 7.
133 is a term because 133 is the average of the first 60 odd primes, 3, 5, 7, 11, ..., 281 and 283.
-
from sympy import sieve
L = sieve.primerange(3, 4*10**10); s, k = 0, 0
for p in L:
s += p; k += 1
if s%k == 0: print(s//k, end = ", ")
A276197
Prime numbers p such that the sum of the first p odd primes is divisible by p.
Original entry on oeis.org
2, 3, 73, 3420839
Offset: 1
a(2) = 3 since 3+5+7 = 15 is divisible by the prime number 3.
-
a071148(n) = sum(k=2, n+1, prime(k))
isdivisible(n) = Mod(a071148(n), n)==0
terms(n) = my(i=0, p=2); while(i < n, if(isdivisible(p), print1(p, ", "); i++); p=nextprime(p+1))
/* The following function call prints the initial four terms */
terms(4) \\ Felix Fröhlich, Aug 24 2016
-
use ntheory ":all"; my($s,$l,$pr)=(0,0,prime_iterator(3)); forprimes { $s += $pr->() for $l+1 .. $; $l=$; say unless $s % $; } 1e7; # _Dana Jacobsen, Sep 23 2016
A368462
Prime averages of first k odd primes for some k.
Original entry on oeis.org
3, 5, 1117, 200325407
Offset: 1
-
from sympy import nextprime, isprime
p, s, k = 2, 0, 0
while k < 3*10**7:
p = nextprime(p); s += p; k += 1; r = divmod(s, k)
if r[1] == 0 and isprime(r[0]): print(r[0], end = ", ")
Showing 1-3 of 3 results.
Comments