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-3 of 3 results.

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

Views

Author

Ya-Ping Lu, Jun 07 2023

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Python
    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 = ", ")

Formula

a(n) = Sum_{i=1..A097961(n)} prime(i)/n.

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

Views

Author

G. L. Honaker, Jr., Aug 24 2016

Keywords

Comments

Primes in A097961. - Altug Alkan, Aug 24 2016
a(5) > 10^10. - Dana Jacobsen, Sep 29 2016

Examples

			a(2) = 3 since 3+5+7 = 15 is divisible by the prime number 3.
		

Crossrefs

Programs

  • PARI
    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
    
  • Perl
    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

Views

Author

Ya-Ping Lu, Dec 25 2023

Keywords

Comments

a(5) > 8*10^10.

Crossrefs

Prime terms of A363477.

Programs

  • Python
    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.