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.

Previous Showing 11-14 of 14 results.

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

A109921 a(2n) = prime(n). a(2n+1) = sum of composite numbers between prime(n) and prime(n+1). We define a(1) = 1.

Original entry on oeis.org

1, 2, 0, 3, 4, 5, 6, 7, 27, 11, 12, 13, 45, 17, 18, 19, 63, 23, 130, 29, 30, 31, 170, 37, 117, 41, 42, 43, 135, 47, 250, 53, 280, 59, 60, 61, 320, 67, 207, 71, 72, 73, 380, 79, 243, 83, 430, 89, 651, 97, 297, 101, 102, 103, 315, 107, 108, 109, 333, 113, 1560, 127, 387, 131
Offset: 1

Views

Author

Amarnath Murthy, Jul 16 2005

Keywords

Comments

1 together with the sum of consecutive composites between primes interleaved with the primes. - Omar E. Pol, Oct 01 2012

Examples

			Contribution from _Omar E. Pol_, Oct 06 2012 (Start):
a(1) = 1, by definition. Also 1 is the first nonprime.
a(2) = 2, the first prime.
a(3) = 0, the sum of composite numbers between 2 and 3.
a(4) = 3, the second prime.
a(5) = 4, the sum of the composite numbers between 3 and 5.
a(6) = 5, the third prime.
a(7) = 6, the sum of the composite numbers between 5 and 7.
a(8) = 7, the fourth prime.
a(9) = 27, the sum of the composite numbers between 7 and 11, since 8+9+10 = 27.
a(10) = 11, the fifth prime.
(End)
		

Crossrefs

Programs

  • Mathematica
    Join[{1},With[{nn=40},Riffle[Prime[Range[nn]],Table[Total[Range[Prime[n]+1,Prime[n+1]-1]],{n,nn}]]]] (* Harvey P. Dale, Jul 16 2023 *)

Extensions

More terms from David Wasserman, Aug 15 2005

A115984 Positive n which are the average of a run of at least 2 consecutive primes.

Original entry on oeis.org

4, 5, 6, 9, 12, 15, 17, 18, 21, 22, 23, 26, 29, 30, 31, 34, 37, 38, 39, 42, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 60, 64, 68, 69, 70, 71, 72, 76, 77, 78, 79, 81, 82, 86, 87, 89, 91, 92, 93, 95, 96, 97, 99, 100, 101, 102, 105, 106, 107, 108, 110, 111, 112, 113, 114
Offset: 1

Views

Author

Giovanni Resta, Feb 10 2006

Keywords

Examples

			4=(3+5)/2.
		

Crossrefs

A115985 Positive n which are not the average of a run of at least 2 consecutive primes.

Original entry on oeis.org

1, 2, 3, 7, 8, 10, 11, 13, 14, 16, 19, 20, 24, 25, 27, 28, 32, 33, 35, 36, 40, 41, 44, 48, 54, 57, 58, 59, 61, 62, 63, 65, 66, 67, 73, 74, 75, 80, 83, 84, 85, 88, 90, 94, 98, 103, 104, 109, 118, 119, 121, 128, 131, 136, 140, 141, 142, 146, 147, 148, 152, 156, 158
Offset: 1

Views

Author

Giovanni Resta, Feb 10 2006

Keywords

Examples

			4=(3+5)/2, so 4 does not belong.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=400},Select[Complement[Range[nn],Union[Flatten[ Table[ Select[Mean/@Partition[ Prime[Range[PrimePi[nn]]],n,1],IntegerQ],{n,2,PrimePi[nn]}]]]],#Harvey P. Dale, Apr 08 2012 *)
Previous Showing 11-14 of 14 results.