A111410 Erroneous version of A073131.
2, 6, 6, 18, 6, 18, 10, 18, 24, 18, 32, 18, 12, 30, 28, 30, 12
Offset: 1
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.
[GCD(NthPrime(n+1) - NthPrime(n), NthPrime(NthPrime(n+1)) - NthPrime(NthPrime(n))): n in [1..120]]; // G. C. Greubel, Oct 20 2019
seq(gcd(ithprime(n+1) - ithprime(n), ithprime(ithprime(n+1)) - ithprime(ithprime(n))), n=1..120); # G. C. Greubel, Oct 20 2019
Table[GCD[Prime[n+1]-Prime[n], Prime[Prime[n+1]]-Prime[Prime[n]]], {n, 120}]
vector(120, n, gcd(prime(n+1) - prime(n), prime(prime(n+1)) - prime(prime(n))) ) \\ G. C. Greubel, Oct 20 2019
[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
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.
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
prime(prime(3)) - prime(prime(2)) = 6. 6/2 = 3 = first term. prime(prime(4)) - prime(prime(3)) = 6. 6/2 = 3 = second term.
With[{t = Table[Prime[Prime[n]], {n, 1, 400}]}, Select[(Rest[t] - Most[t])/2, PrimeQ]] (* Amiram Eldar, Jul 08 2024 *)
lista(n) = for(x=1,n,y=prime(prime(x+1)) - prime(prime(x)); if(y%2==0&isprime(y/2),print1(y\2",")))
[NthPrime(NthPrime(n+1))+NthPrime(NthPrime(n)):n in [1..50]];
Table[Prime[Prime[n + 1]] + Prime[Prime[n]], {n, 1, 50}]
a(n) = prime(prime(n+1)) + prime(prime(n)); \\ Michel Marcus, Mar 20 2018
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.
Module[{n = 0}, DeleteDuplicates[NestList[If[PrimeQ[++n], # + Prime[n], -#] &, 0, 200]]] (* Paolo Xausa, Dec 06 2024 *)
Comments