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.

A126938 a(1) = 3, a(n) = the smallest prime p > a(n-1) such that (a(n-1)+p)/2 is prime.

Original entry on oeis.org

3, 7, 19, 43, 79, 127, 151, 163, 199, 223, 331, 367, 379, 439, 487, 607, 619, 643, 739, 883, 991, 1051, 1087, 1171, 1231, 1327, 1471, 1627, 1699, 1747, 1759, 1987, 1999, 2179, 2383, 2551, 2683, 2731, 2767, 3067, 3259, 3343, 3571, 3643, 3739, 3847, 3907
Offset: 1

Views

Author

Zak Seidov, Mar 18 2007

Keywords

Comments

Starting with a(2)=7 all terms are 7 mod 12. - Zak Seidov, Feb 26 2017

Examples

			(3+7)/2=5 prime, (7+19)/2=13 prime, (19+43)/2=31 prime, etc.
		

Crossrefs

Programs

  • Maple
    A[1]:= 3: A[2]:= 7:
    for n from 3 to 100 do A[n]:= f(A[n-1]) od:
    seq(A[i],i=1..100); # Robert Israel, Feb 27 2017
  • Mathematica
    s={3};pn=3;n=PrimePi[pn];Do[Do[p=Prime[i];If[PrimeQ[(pn+p)/2],AppendTo[s,p];pn=p;n=i;Break[]],{i,n+1,10000}],{112}];s
    sp[n_]:=Module[{p=NextPrime[n]},While[!PrimeQ[(n+p)/2],p=NextPrime[p]];p]; NestList[sp,3,50] (* Harvey P. Dale, Apr 12 2013 *)
  • PARI
    step(q)=forprime(p=q+1,, if(isprime((p+q)/2), return(p)))
    first(n)=my(v=vector(n)); v[1]=3; for(k=2,n, v[k]=step(v[k-1])); v \\ Charles R Greathouse IV, Feb 27 2017

A128653 Primes occurring in A084704 exactly twice.

Original entry on oeis.org

43, 53, 59, 79, 113, 151, 163, 167, 197, 229, 269, 313, 331, 359, 367, 397, 419, 421, 449, 541, 607, 617, 619, 683, 719, 739, 757, 857, 883, 887, 907, 911, 997, 1021, 1051, 1063, 1103, 1117, 1193, 1249, 1289, 1303, 1427, 1433, 1459, 1471, 1489, 1493, 1499
Offset: 1

Views

Author

Zak Seidov, Mar 18 2007

Keywords

Examples

			43 occurs as the 7th and 10th terms in A084704: (prime(8)+43)/2 = (19+43)/2 = 31 prime and (prime(11)+43)/2 = (31+43)/2 = 37 prime;
53 is 9th and 12th terms in A084704: (prime(10)+53)/2 = (29+53)/2 = 41 prime and (prime(13)+53)/2 = (41+53)/2 = 47 prime.
		

Crossrefs

For primes occurring in A084704 exactly 3 and 4 times see A128654, A128655. Cf. A084704 Smallest prime p > prime(n) such that (p+prime(n))/2 is prime.

A128654 Primes occurring in A084704 exactly thrice.

Original entry on oeis.org

263, 821, 953, 1049, 1597, 2143, 2273, 2677, 2683, 2699, 2749, 3251, 3389, 3709, 3739, 3761, 3929, 4013, 4243, 4409, 4519, 4603, 4621, 4639, 4657, 4943, 5009, 5387, 5449, 5483, 5783, 6173, 6311, 6373, 6703, 6737, 6869, 6983, 7517, 7603, 7717, 7993
Offset: 1

Views

Author

Zak Seidov, Mar 18 2007

Keywords

Examples

			263 occurs as the 42nd, 51st and 53rd terms: (prime(#)+263)/2/(AT){43,52,54}= {227,251,257} primes.
		

Crossrefs

Showing 1-3 of 3 results.