A160830 Integer part of the product of two consecutive primes divided by their sum.
1, 1, 2, 4, 5, 7, 8, 10, 12, 14, 16, 19, 20, 22, 24, 27, 29, 31, 34, 35, 37, 40, 42, 46, 49, 50, 52, 53, 55, 59, 64, 66, 68, 71, 74, 76, 79, 82, 84, 87, 89, 92, 95, 97, 98, 102, 108, 112, 113, 115, 117, 119, 122, 126, 129, 132, 134, 136, 139, 140, 143, 149, 154, 155, 157
Offset: 1
Keywords
Examples
a(5) = floor(prime(5)*prime(6)/(prime(5)+prime(6))) = 5.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[Floor(NthPrime(n)*NthPrime(n+1)/(NthPrime(n)+NthPrime(n+1))): n in [1..100]]; // G. C. Greubel, Apr 30 2018
-
Maple
a:= n-> (l-> floor(mul(i,i=l)/add(i,i=l)))([ithprime(n+i)$i=0..1]): seq(a(n), n=1..65); # Alois P. Heinz, Sep 20 2024
-
Mathematica
Table[Floor[Prime[n]*Prime[n+1]/(Prime[n] +Prime[n+1])], {n, 1, 100}] (* G. C. Greubel, Apr 30 2018 *) Floor[Times@@#/Total[#]&/@Partition[Prime[Range[100]],2,1]] (* Harvey P. Dale, Sep 20 2024 *)
-
PARI
g(x) = p1=prime(x);p2=prime(x+1);y=p1*p2/(p1+p2);floor(y); g1(n) = for(j=1,n,print1(g(j)","))
Formula
a(n) = floor(prime(n)*prime(n+1)/(prime(n)+prime(n+1))) where prime(.) = A000040(.).
Extensions
Inserted "two" in definition - R. J. Mathar, May 29 2009
Comments