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.

A123134 a(n) = prime(n)*(prime(n+1) + 1).

Original entry on oeis.org

8, 18, 40, 84, 154, 234, 340, 456, 690, 928, 1178, 1554, 1804, 2064, 2538, 3180, 3658, 4148, 4824, 5254, 5840, 6636, 7470, 8722, 9894, 10504, 11124, 11770, 12426, 14464, 16764, 18078, 19180, 20850, 22648, 23858, 25748, 27384, 29058, 31140, 32578
Offset: 1

Views

Author

Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 30 2006

Keywords

Comments

All terms are even. - Michel Marcus, Apr 02 2017

Examples

			a(1) = 2*(3+1) = 8, a(2) = 3*(5+1) = 18, a(3) = 5*(7+1) = 40, ...
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)*(NthPrime(n+1) +1): n in [1..40]]; // G. C. Greubel, Aug 04 2021
  • Mathematica
    a[n_]:=Prime[n](Prime[n+1]+1); Array[a, 80] (* Giovanni Resta, Apr 02 2017 *)
    #[[1]](#[[2]]+1)&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Jan 06 2019 *)
  • PARI
    for(n=1,100,print1(prime(n)*(prime(n+1)+1),","))
    
  • Python
    from sympy import prime
    def a(n): return prime(n) * (prime(n + 1) + 1) # Indranil Ghosh, Apr 02 2017
    

Formula

a(n) = A000040(n)*A008864(n+1). - Zak Seidov, Apr 02 2017
a(n) = A286624(n) - 1. - Antti Karttunen, Jul 06 2017