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.

A023515 a(n) = prime(n)*prime(n-1) - 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(1) = 1 assumes the not generally accepted convention prime(0) = 1. - Klaus Brockhaus, Dec 23 2010

Crossrefs

Cf. A120875 (a subsequence).

Programs

  • Magma
    [ NthPrime(n-1)*NthPrime(n)-1: n in [1..50] ]; // Vincenzo Librandi, Dec 23 2010; simplified by Klaus Brockhaus, Dec 23 2010
    
  • 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 *)
  • PARI
    a(n) = if(n==1, 1, prime(n)*prime(n-1)-1) \\ Altug Alkan, Nov 10 2015

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)