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.

A258233 Number of ways to represent the n-th prime as arithmetic mean of three other primes.

Original entry on oeis.org

0, 1, 1, 3, 6, 7, 11, 15, 16, 25, 30, 32, 42, 40, 44, 52, 63, 71, 76, 87, 82, 97, 102, 113, 127, 137, 136, 143, 154, 154, 186, 200, 204, 215, 234, 249, 251, 262, 272, 284, 309, 324, 345, 334, 349, 359, 406, 414, 431, 447, 441, 489, 487, 511, 508
Offset: 1

Views

Author

Zak Seidov, May 24 2015

Keywords

Comments

Differs from A071704: for n>1, if 3*prime(n)-4 is prime then a(n)=1+A071704(n), otherwise a(n)=A071704(n).

Examples

			a(5)=6 as A000040(5)=11 and  11 has 6 representations  as arithmetic mean of three other (not equal to 11) primes:
11 = (2+2+29)/3=(3+7+23)/3 = (3+13+17)/3 = (5+5+23)/3 = (7+7+19)/3 = (7+13+13)/3.
		

Crossrefs

Programs

  • PARI
    a(n,p=prime(n))=my(s=0); forprime(q=p+2,3*p-4, my(t=3*p-q); forprime(r=max(t-q, 2),(3*p-q)\2, if(t!=p+r && isprime(t-r), s++))); s \\ Charles R Greathouse IV, Jun 04 2015

A071703 Number of ways to represent the n-th prime as arithmetic mean of three odd primes.

Original entry on oeis.org

0, 1, 2, 4, 8, 10, 14, 16, 20, 28, 32, 36, 47, 45, 48, 58, 68, 74, 81, 95, 88, 101, 108, 119, 134, 146, 143, 150, 161, 161, 195, 208, 215, 222, 244, 257, 259, 269, 283, 293, 319, 332, 354, 346, 359, 365, 417, 426, 442, 455, 454, 500, 497, 526
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 03 2002

Keywords

Examples

			a(4)=4 as A000040(4)=7 and there are no more representations than 7 = (3+5+13)/3 = (3+7+11)/3 = (5+5+11)/3 = (7+7+7)/3.
		

Crossrefs

Programs

  • Haskell
    a071703 = z a065091_list 0 . (* 3) . a000040 where
       z _ 3 m = fromEnum (m == 0)
       z ps'@(p:ps) i m = if m < p then 0 else z ps' (i+1) (m - p) + z ps i m
    -- Reinhard Zumkeller, May 24 2015

Extensions

Definition, initial term and example corrected. Thanks to Zak Seidov, who found the mistake. - Reinhard Zumkeller, May 24 2015

A258261 Primes p such that 3p - 4 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 29, 31, 37, 47, 59, 61, 67, 79, 89, 107, 131, 149, 151, 157, 191, 197, 199, 227, 229, 241, 271, 277, 281, 311, 317, 367, 389, 397, 409, 421, 431, 457, 479, 499, 509, 521, 541, 547, 557, 571, 617, 631, 659, 661, 677, 691, 701, 719
Offset: 1

Views

Author

Zak Seidov, May 24 2015

Keywords

Comments

This sequence is interesting because of the comments in A258233: for n > 1, if 3 * prime(n) - 4 is prime then A258233(n) = 1 + A071704(n), otherwise A258233 (n) = A071704(n). - Zak Seidov, Jun 04 2015
Subsequence of primes of A228121. - Michel Marcus, May 30 2015

Examples

			3 * 2 - 4 = 2, 3 * 3 - 4 = 5, 3 * 5 - 4 = 11, 3 * 7 - 4 = 17, 3 * 11 - 4 = 29 are all prime, so 2, 3, 5, 7, 11 are all in the sequence.
3 * 13 - 4 = 35 = 5 * 7, so 13 is not in the sequence.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(3*p-4)]; // Vincenzo Librandi, May 25 2015
    
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[3# - 4] &]
  • PARI
    forprime(p=1,10^3,if(isprime(3*p-4),print1(p,", "))) \\ Derek Orr, May 27 2015
Showing 1-3 of 3 results.