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

A098042 Primes of the form (prime(prime(k)) + prime(prime(k+1)))/2.

Original entry on oeis.org

307, 593, 1459, 1511, 1609, 2399, 2447, 2579, 2903, 4409, 5953, 6317, 7151, 11083, 12491, 14753, 16067, 18199, 18223, 20929, 21787, 23893, 25667, 26317, 31051, 37139, 37573, 37871, 40283, 40471, 41201, 41479, 42013, 44537, 44741, 48409
Offset: 1

Views

Author

Cino Hilliard, Sep 10 2004

Keywords

Comments

Primes of the form A299644(k)/2. - Amiram Eldar, Jul 08 2024

Examples

			prime(prime(18)) = 283, prime(prime(19)) = 331. (283 + 331)/2 = 614/2 = 307.
		

Crossrefs

Programs

  • Mathematica
    With[{t = Table[Prime[Prime[n]], {n, 1, 400}]}, Select[(Most[t] + Rest[t])/2, PrimeQ]] (* Amiram Eldar, Jul 08 2024 *)
  • PARI
    lista(n) = for(x=1,n,y=prime(prime(x+1))+prime(prime(x)); if(y%2==0&isprime(y/2),print1(y\2",")))

Extensions

Offset corrected by Amiram Eldar, Jul 08 2024

A378677 a(n)=a(n-1) + prime(n) for n prime, and a(n)=-a(n-1) otherwise, with a(0)=0, with duplicates removed afterwards.

Original entry on oeis.org

0, 3, 8, -8, -3, 14, -14, 17, -17, 24, -24, 35, -35, 32, -32, 51, -51, 58, -58, 69, -69, 88, -88, 91, -91, 100, -100, 111, -111, 130, -130, 147, -147, 136, -136, 195, -195, 158, -158, 209, -209, 192, -192, 239, -239, 222, -222, 287, -287, 260, -260, 303, -303
Offset: 0

Views

Author

Bill McEachen, Dec 03 2024

Keywords

Comments

Let b = subset of positive terms for n>4. We have A073131= b(m+2)-b(m) , A006450= b(m+2)+b(m) and A299644= b(m+2)+2*b(m+1)+b(m).

Examples

			n=1 is not prime, so a(1)= -a(0)= 0. n=2 is prime, so a(2)=a(1)+prime(2)=0+3=3. n=5 is prime, so a(5)=3, but note that it duplicates a(2). n=6 is not prime, so a(6)= -a(5)=-3. After terms are computed, duplicates are only then removed, which will alter indices accordingly.
		

Crossrefs

Programs

  • Mathematica
    Module[{n = 0}, DeleteDuplicates[NestList[If[PrimeQ[++n], # + Prime[n], -#] &, 0, 200]]] (* Paolo Xausa, Dec 06 2024 *)

Formula

a(n) = a(n-1) + a prime for n odd >4.
a(n) = -a(n-1) for a(n-1)>0, n>1.
Showing 1-2 of 2 results.