login
A023515
a(n) = prime(n)*prime(n-1) - 1.
9
1, 5, 14, 34, 76, 142, 220, 322, 436, 666, 898, 1146, 1516, 1762, 2020, 2490, 3126, 3598, 4086, 4756, 5182, 5766, 6556, 7386, 8632, 9796, 10402, 11020, 11662, 12316, 14350, 16636, 17946, 19042, 20710, 22498, 23706, 25590, 27220, 28890
OFFSET
1,2
COMMENTS
a(1) = 1 assumes the not generally accepted convention prime(0) = 1. - Klaus Brockhaus, Dec 23 2010
LINKS
FORMULA
From Jason Kimberley, Oct 23 2015: (Start)
a(n) = A006094(n-1) - 1 = A000040(n-1)*A000040(n)-1, for n>1.
a(n) = 2*A102770(n-2), for n>2.
(End)
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
Cf. A120875 (a subsequence).
Sequence in context: A182738 A192957 A094584 * A047860 A369887 A083332
KEYWORD
nonn
STATUS
approved