OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Simon Strandgaard, Jul 20 2021
STATUS
approved