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

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

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
    				

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

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

Original entry on oeis.org

2, 5, 89, 53, 157, 173, 1597, 15233, 8803, 106753, 1570927, 5296771
Offset: 1

Views

Author

Naohiro Nomoto, May 11 2003

Keywords

Examples

			a(4) = 53 because there are exactly four sets of consecutive primes which have means of 53: {53}, {47,53,59}, {41,...,67} and {31,...,73},
		

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=nextprime(m+1); 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
Showing 1-4 of 4 results.