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.

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

Original entry on oeis.org

9, 20, 42, 88, 156, 238, 342, 460, 696, 930, 1184, 1558, 1806, 2068, 2544, 3186, 3660, 4154, 4828, 5256, 5846, 6640, 7476, 8730, 9898, 10506, 11128, 11772, 12430, 14478, 16768, 18084, 19182, 20860, 22650, 23864, 25754, 27388, 29064, 31146, 32580, 34762
Offset: 1

Views

Author

Simon Strandgaard, Jul 20 2021

Keywords

Examples

			a(1) = (prime(1)+1) * prime(2) = 3 *  3 =  9,
a(2) = (prime(2)+1) * prime(3) = 4 *  5 = 20,
a(3) = (prime(3)+1) * prime(4) = 6 *  7 = 42,
a(4) = (prime(4)+1) * prime(5) = 8 * 11 = 88.
		

Crossrefs

Programs

  • Maple
    A345727 := proc(n)
        (ithprime(n)+1)*ithprime(n+1) ;
    end proc:
    seq(A345727(n),n=1..10) ; # R. J. Mathar, Aug 16 2021
  • Mathematica
    (Prime@#+1)Prime[#+1]&/@Range@50 (* Giorgos Kalogeropoulos, Jul 23 2021 *)
    (#[[1]]+1)#[[2]]&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Jan 08 2023 *)
  • PARI
    for(n=1, 100, print1((prime(n)+1)*prime(n+1), ", "))
    
  • Ruby
    require 'prime'
    values = []
    primes = Prime.first(20)
    primes.each_index do |n|
        next if n < 1
        values << (primes[n - 1] + 1) * primes[n]
    end
    p values

Formula

a(n) = A008864(n)*A000040(n+1).
a(n) = A180617(n)-A008864(n).
a(n) = A006094(n)+A000040(n+1).