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-10 of 14 results. Next

A050221 a(n) = number of sets of consecutive primes whose arithmetic mean is A060863(n).

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, May 08 2003

Keywords

Comments

Essentially A122821 with the 0's removed.

Examples

			For n=4; A060863(4) = 5. the two sets are 5/1 = 5, (3+5+7)/3 = 5. so a(4)=2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Block[{i=1,j,c=0,m},While[Prime[i]<=n, j=1; While[m=Sum[Prime[k],{k,i,i+j-1}]/j; If[m==n,c++ ]; m0&] (* Ray Chandler, Oct 03 2006 *)

Formula

a(n) = A122821(A060863(n)).

Extensions

Extended by Ray Chandler, Oct 03 2006

A082596 a(n) is the number of values of k such that A077389(k) = A060863(n).

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Naohiro Nomoto, May 14 2003

Keywords

Crossrefs

A082653 For smallest numbers k such that A082596(k) = n, sequence gives A060863(k).

Original entry on oeis.org

2, 30, 910, 15203
Offset: 1

Views

Author

Naohiro Nomoto, May 17 2003

Keywords

Examples

			For n=2; smallest number k = 20, A082596(20) = 2. so a(2) = A060863(20) = 30.
		

Crossrefs

A082661 Numbers n such that A082596(n) = A050221(n), sequence gives A060863(n).

Original entry on oeis.org

2, 4, 52, 70, 95, 100, 124, 153, 169, 177, 201, 230, 252, 261, 272, 273, 275, 314, 316, 322, 377, 378, 384, 434, 450, 451, 507, 517, 527, 657, 702, 711, 720, 833, 884, 896, 904, 910, 930, 1005, 1025, 1047, 1081, 1137, 1189, 1202, 1228, 1351, 1358, 1415
Offset: 1

Views

Author

Naohiro Nomoto, May 18 2003

Keywords

A346399 a(n) is the number of symmetrically distributed consecutive primes centered at n (including n itself if n is prime).

Original entry on oeis.org

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

Views

Author

Ya-Ping Lu, Sep 18 2021

Keywords

Comments

a(n) is the number of consecutive primes in Goldbach pairs of 2n centered at n.
a(n) is odd if n is prime; otherwise, a(n) is even.
n is prime if a(n) = 1 and n is composite if a(n) = 0.
a(n) = 14 is not seen until n = 8021811 (with none higher through 4*10^7). - Bill McEachen, Jul 26 2024

Examples

			a(1) = 0 because no prime is <= 1.
a(2) = 1 because no prime is < 2 and {2} is the only symmetrically distributed prime centered at 2.
a(30) = 10 because there are 10 symmetrically distributed consecutive primes, {13, 17, 19, 23, 29, 31, 37, 41, 43, 47}, centered at 30.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    for n in range(1, 100):
        d = 1 if n%2 == 0 else 2
        ct = 1 if isprime(n) else 0
        while n - d > 2:
            k = isprime(n+d) + isprime(n-d)
            if k == 2: ct += 2
            elif k == 1: break
            d += 2
        print(ct)

A122821 Number of ways n can be represented as the arithmetic mean of consecutive primes.

Original entry on oeis.org

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

Views

Author

Ray Chandler, Sep 28 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Block[{i=1,j,c=0,m},While[Prime[i]<=n, j=1; While[m=Sum[Prime[k],{k,i,i+j-1}]/j; If[m==n,c++ ]; m
    				

A050237 a(n) = the smallest number m such that there are exactly n sets of consecutive primes, each of which has an arithmetic mean of m.

Original entry on oeis.org

1, 2, 5, 12, 38, 30, 173, 165, 12259, 8803, 36735, 67263, 5296771, 32975, 1147233
Offset: 0

Views

Author

Naohiro Nomoto, May 08 2003

Keywords

Comments

First appearance of n in A122821.

Examples

			a(4) = 38 because there are exactly four sets of consecutive primes which have means of 38: {31,37,41,43}, {29,...,47}, {23,...,53} and {2,...,83},
		

Crossrefs

Programs

  • PARI
    {a(n)= m=2; starting_index=1; k=starting_index; sum_of_primes=0; prime_count=0; sets=0; until( (prime(starting_index)>m) && (sets==n), if( (prime(starting_index)> m) || (sets>n), m++; sets=0; starting_index=1; k=starting_index); sum_of_primes=sum_of_primes+prime(k); prime_count++; mean=sum_of_primes/ prime_count; if(meanRick L. Shepherd, Jun 14 2004

Extensions

Edited by Don Reble, Jun 17 2003

A060864 Positive integers that are not an average of consecutive primes.

Original entry on oeis.org

1, 8, 10, 14, 16, 20, 24, 25, 27, 28, 32, 33, 35, 36, 40, 44, 48, 54, 57, 58, 62, 63, 65, 66, 74, 75, 80, 84, 85, 88, 90, 94, 98, 104, 118, 119, 121, 128, 136, 140, 141, 142, 146, 147, 148, 152, 156, 158, 159, 161, 162, 164, 168, 171, 172, 174, 178, 182, 184, 188
Offset: 1

Views

Author

David W. Wilson, May 04 2001

Keywords

Crossrefs

Complement of A060863.

Formula

A122821(a(n)) = 0.

A082370 a(n) = number of sets of consecutive primes whose arithmetic mean is A000040(n).

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, May 11 2003

Keywords

Examples

			For n=3; A000040(3) = 5. the two sets are 5/1 = 5, (3+5+7)/3 = 5. so a(3)=2.
		

Crossrefs

Programs

  • Maple
    N:= 300:
    P:= [0,seq(ithprime(i),i=1..N)]:
    S:= ListTools:-PartialSums(P):
    mmax:= numtheory:-pi(floor(S[N]/N)):
    V:= Vector(1..mmax,1):
    for i from 1 to N+1 do
      for j from i+2 to N+1 do
        r:= (S[j]-S[i])/(j-i);
        if r::integer and isprime(r) then
          k:= numtheory:-pi(r);
          if k <= mmax then
            V[k]:= V[k]+1
          fi
        fi
    od od:
    convert(V,list); # Robert Israel, Mar 18 2018

Formula

a(n) = A122821(A000040(n)).

Extensions

Extended by Ray Chandler, Oct 03 2006

A082592 A077389 sorted and duplicates removed.

Original entry on oeis.org

2, 4, 5, 9, 12, 17, 23, 29, 30, 31, 37, 38, 39, 49, 51, 52, 56, 70, 71, 79, 89, 95, 100, 105, 110, 111, 113, 124, 125, 133, 137, 139, 149, 151, 153, 155, 157, 169, 177, 179, 185, 187, 199, 200, 201, 214, 227, 230, 242, 251, 252, 261, 272, 273, 274, 275, 280, 281
Offset: 1

Views

Author

Naohiro Nomoto, May 13 2003

Keywords

Crossrefs

Cf. A060863.
Showing 1-10 of 14 results. Next