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.

A160830 Integer part of the product of two consecutive primes divided by their sum.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, May 27 2009

Keywords

Comments

The differences a(n+1) - a(n) appear to grow without bound while the difference 2 appears to occur infinitely often.

Examples

			a(5) = floor(prime(5)*prime(6)/(prime(5)+prime(6))) = 5.
		

Crossrefs

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(.).
a(n) = floor( A006094(n)/A001043(n) ). - R. J. Mathar, May 29 2009.

Extensions

Inserted "two" in definition - R. J. Mathar, May 29 2009