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

A111410 Erroneous version of A073131.

Original entry on oeis.org

2, 6, 6, 18, 6, 18, 10, 18, 24, 18, 32, 18, 12, 30, 28, 30, 12
Offset: 1

Views

Author

Keywords

A073130 a(n) = gcd(p(n+1) - p(n), p(p(n+1)) - p(p(n))), where p(n) is the n-th prime.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 6, 2, 2, 4, 6, 6, 2, 6, 2, 2, 2, 2, 6, 8, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 4, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 4, 2, 2, 2, 6, 6, 6, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 6, 2, 2, 2, 6, 4, 6, 6, 2, 6, 4, 2, 2, 2, 2, 2, 2, 6, 2, 6, 4, 2, 2, 4, 4, 2, 4, 2, 2, 2, 12, 2, 6, 2, 2, 2, 6, 2
Offset: 1

Views

Author

Labos Elemer, Jul 16 2002

Keywords

Crossrefs

Programs

  • Magma
    [GCD(NthPrime(n+1) - NthPrime(n), NthPrime(NthPrime(n+1)) - NthPrime(NthPrime(n))): n in [1..120]]; // G. C. Greubel, Oct 20 2019
    
  • Maple
    seq(gcd(ithprime(n+1) - ithprime(n), ithprime(ithprime(n+1)) - ithprime(ithprime(n))), n=1..120); # G. C. Greubel, Oct 20 2019
  • Mathematica
    Table[GCD[Prime[n+1]-Prime[n], Prime[Prime[n+1]]-Prime[Prime[n]]], {n, 120}]
  • PARI
    vector(120, n, gcd(prime(n+1) - prime(n), prime(prime(n+1)) - prime(prime(n))) ) \\ G. C. Greubel, Oct 20 2019
    
  • Sage
    [gcd(nth_prime(n+1) - nth_prime(n), nth_prime(nth_prime(n+1)) - nth_prime(nth_prime(n))) for n in (1..120)] # G. C. Greubel, Oct 20 2019

A073132 Smallest subscript j such that d=p[p(j+1)]-p[p(j)]=2n, or 0 if j does not exist (at d=4).

Original entry on oeis.org

1, 0, 2, 7, 5, 13, 4, 8, 6, 14, 12, 27, 9, 51, 11, 40, 21, 16, 25, 39, 36, 96, 58, 18, 132, 134, 56, 106, 108, 72, 34, 102, 42, 158, 202, 68, 53, 118, 121, 46, 124, 101, 383, 91, 157, 30, 80, 97, 204, 126, 258, 139, 381, 145, 222, 47, 62, 240, 242, 363, 66, 177, 565
Offset: 1

Views

Author

Labos Elemer, Jul 16 2002

Keywords

Examples

			d=20 appears first at n=14, p(15)=47,p(14)=43, d=p(47)-p(43)=211-191=20, so a(20/2)=a(10)=14.
		

Crossrefs

Programs

  • Mathematica
    t=Table[0, {100}]; Do[s = Prime[ Prime[x+1]] - Prime[ Prime[x]]; If[ s < 202 && t[[s/2]]==0, t[[s/2]]=n], {n, 1, 1000}]; t

Formula

a(n)=Min{x : A073131[x]=2n}

Extensions

Edited by Robert G. Wilson v, Jul 17 2002

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

Original entry on oeis.org

3, 3, 7, 5, 13, 11, 3, 11, 7, 17, 19, 17, 31, 7, 37, 23, 61, 5, 19, 47, 31, 17, 29, 7, 5, 19, 41, 31, 41, 11, 79, 7, 7, 23, 37, 31, 13, 29, 47, 13, 83, 29, 13, 11, 59, 17, 23, 17, 11, 61, 5, 23, 83, 7, 7, 79, 5, 5, 31, 41, 61, 5, 29, 19, 19, 47, 67, 7, 13, 31, 29, 13, 137, 61, 53, 43
Offset: 1

Views

Author

Cino Hilliard, Sep 10 2004

Keywords

Comments

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

Examples

			prime(prime(3)) - prime(prime(2)) = 6. 6/2 = 3 = first term.
prime(prime(4)) - prime(prime(3)) = 6. 6/2 = 3 = second term.
		

Crossrefs

Programs

  • Mathematica
    With[{t = Table[Prime[Prime[n]], {n, 1, 400}]}, Select[(Rest[t] - Most[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

A299644 a(n) = prime(prime(n+1)) + prime(prime(n)).

Original entry on oeis.org

8, 16, 28, 48, 72, 100, 126, 150, 192, 236, 284, 336, 370, 402, 452, 518, 560, 614, 684, 720, 768, 832, 892, 970, 1056, 1110, 1150, 1186, 1216, 1326, 1448, 1512, 1570, 1656, 1736, 1796, 1886, 1958, 2022, 2094, 2150, 2240, 2324, 2372, 2418, 2514, 2706, 2842, 2880, 2918
Offset: 1

Views

Author

Vincenzo Librandi, Mar 20 2018

Keywords

Comments

All terms are even. - Michel Marcus, Mar 20 2018

Crossrefs

Programs

  • Magma
    [NthPrime(NthPrime(n+1))+NthPrime(NthPrime(n)):n in [1..50]];
    
  • Mathematica
    Table[Prime[Prime[n + 1]] + Prime[Prime[n]], {n, 1, 50}]
  • PARI
    a(n) = prime(prime(n+1)) + prime(prime(n)); \\ Michel Marcus, Mar 20 2018

Formula

a(n) = A006450(n+1) + A006450(n).

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