OFFSET
1,2
COMMENTS
a(1) = 1 assumes the not generally accepted convention prime(0) = 1. - Klaus Brockhaus, Dec 23 2010
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
FORMULA
MAPLE
1, seq(ithprime(n)*ithprime(n-1)-1, n=2..40); # Muniru A Asiru, Apr 27 2019
MATHEMATICA
Prepend[Table[Prime@ n Prime[n - 1] - 1, {n, 2, 12}], 1] (* Michael De Vlieger, Nov 10 2015 *)
Join[{1}, Times@@#-1&/@Partition[Prime[Range[40]], 2, 1]] (* Harvey P. Dale, Jul 06 2024 *)
PROG
(Magma) [ NthPrime(n-1)*NthPrime(n)-1: n in [1..50] ]; // Vincenzo Librandi, Dec 23 2010; simplified by Klaus Brockhaus, Dec 23 2010
(PARI) a(n) = if(n==1, 1, prime(n)*prime(n-1)-1) \\ Altug Alkan, Nov 10 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved