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.

Showing 1-6 of 6 results.

A111071 Difference between the product of two consecutive primes and the next prime.

Original entry on oeis.org

1, 8, 24, 64, 126, 202, 300, 408, 636, 862, 1106, 1474, 1716, 1968, 2432, 3066, 3532, 4016, 4684, 5104, 5684, 6468, 7290, 8532, 9694, 10296, 10912, 11550, 12190, 14220, 16500, 17808, 18894, 20560, 22342, 23544, 25424, 27048, 28712, 30786, 32208
Offset: 1

Views

Author

Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Oct 09 2005

Keywords

Examples

			a(4)= prime(4)*prime(5)-prime(6) = 7*11-13=64.
		

Crossrefs

Cf. A000040.

Programs

  • Magma
    [NthPrime(n)*NthPrime(n+1)-NthPrime(n+2): n in [1..50]]; // Vincenzo Librandi, Jul 18 2015
  • Maple
    seq(ithprime(n)*ithprime(n+1)-ithprime(n+2), n=1..50); # Emeric Deutsch, Oct 10 2005
  • Mathematica
    f[n_] := Prime[n]Prime[n + 1] - Prime[n + 2]; Table[ f[n], {n, 41}] (* Robert G. Wilson v, Oct 10 2005  *)
    #[[1]]*#[[2]]-#[[3]]&/@Partition[Prime[Range[50]],3,1] (* Harvey P. Dale, Aug 06 2015 *)
  • PARI
    main(size)=my(n);vector(size,n,prime(n)*prime(n+1)-prime(n+2)) /* Anders Hellström, Jul 16 2015 */
    

Formula

a(n) = prime(n)*prime(n+1)-prime(n+2) = A006094(n)-A000040(n+2) = 2*A152527(n-1).

Extensions

More terms from Robert G. Wilson v and Emeric Deutsch, Oct 10 2005

A152528 a(n) = p(n)*p(n+2) - 3*p(n+1), where p(n) is the n-th prime.

Original entry on oeis.org

1, 6, 34, 58, 148, 196, 334, 482, 626, 980, 1160, 1468, 1798, 2138, 2614, 3056, 3770, 4130, 4678, 5390, 5822, 6782, 7784, 8698, 9688, 10498, 10906, 11764, 13504, 14422, 17006, 17798, 19996, 20542, 22940, 24142, 25730, 27698
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Crossrefs

Programs

  • Maple
    A152528 := proc(n)
        ithprime(n)*ithprime(n+2)-3*ithprime(n+1) ;
    end proc: # R. J. Mathar, Jul 28 2015
  • Mathematica
    #[[1]]*#[[3]]-3*#[[2]]&/@Partition[Prime[Range[50]],3,1] (* Harvey P. Dale, Jul 14 2014 *)

A152529 a(n) = (p(n)*p(n+2) - 3*p(n+1))/2, where p(n) is the n-th odd prime.

Original entry on oeis.org

3, 17, 29, 74, 98, 167, 241, 313, 490, 580, 734, 899, 1069, 1307, 1528, 1885, 2065, 2339, 2695, 2911, 3391, 3892, 4349, 4844, 5249, 5453, 5882, 6752, 7211, 8503, 8899, 9998, 10271, 11470, 12071, 12865, 13849, 14687, 15388, 16823
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Crossrefs

Programs

  • Maple
    A152529 := proc(n)
        j := n+1 ;
        ithprime(j)*ithprime(j+2)-3*ithprime(j+1) ;
        %/2 ;
    end proc: # R. J. Mathar, Jul 28 2015

Formula

a(n) = A152528(n+1)/2.

A152530 a(n) = p(n)*p(n+2)-p(n+1), where p(n) is the n-th prime.

Original entry on oeis.org

7, 16, 48, 80, 174, 230, 372, 528, 684, 1042, 1234, 1550, 1884, 2232, 2720, 3174, 3892, 4264, 4820, 5536, 5980, 6948, 7962, 8892, 9890, 10704, 11120, 11982, 13730, 14676, 17268, 18072, 20274, 20840, 23242, 24456, 26056, 28032
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Crossrefs

Programs

  • Maple
    A152530 := proc(n)
        ithprime(n)*ithprime(n+2)-ithprime(n+1) ;
    end proc: # R. J. Mathar, Jul 28 2015
  • Mathematica
    #[[1]]#[[3]]-#[[2]]&/@Partition[Prime[Range[50]],3,1] (* Harvey P. Dale, Dec 19 2012 *)

A152531 a(n) = (p(n)*p(n+2) - p(n+1))/2, where p(n) is the n-th odd prime.

Original entry on oeis.org

8, 24, 40, 87, 115, 186, 264, 342, 521, 617, 775, 942, 1116, 1360, 1587, 1946, 2132, 2410, 2768, 2990, 3474, 3981, 4446, 4945, 5352, 5560, 5991, 6865, 7338, 8634, 9036, 10137, 10420, 11621, 12228, 13028, 14016, 14860, 15567, 17004
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Comments

This is A111071 without its first term. - R. J. Mathar, Jul 27 2015

Crossrefs

Programs

  • Maple
    A152531 := proc(n)
        j := n+1 ;
        ithprime(j)*ithprime(j+2)-ithprime(j+1) ;
        %/2 ;
    end proc: # R. J. Mathar, Jul 28 2015
  • Mathematica
    (First[#]*Last[#]-#[[2]])/2&/@Partition[Prime[Range[2,50]],3,1] (* Harvey P. Dale, Oct 09 2014 *)

Formula

a(n) = A152530(n+1)/2.

A152532 a(n) = prime(n) * prime(n+2) - 2 * prime(n+1).

Original entry on oeis.org

4, 11, 41, 69, 161, 213, 353, 505, 655, 1011, 1197, 1509, 1841, 2185, 2667, 3115, 3831, 4197, 4749, 5463, 5901, 6865, 7873, 8795, 9789, 10601, 11013, 11873, 13617, 14549, 17137, 17935, 20135, 20691, 23091, 24299, 25893, 27865
Offset: 1

Views

Author

Omar E. Pol, Dec 06 2008

Keywords

Comments

Before this sequence, a(24) = 8795 was an uninteresting number, see References and Links. For example: 8795 was mentioned in Sloane's Gap paper, pages 4-5: Which numbers do not appear in Sloane's encyclopedia? At the time of an initial calculation conducted in August 2008 by Philippe Guglielmetti, the smallest absent number tracked down was 8795.

Examples

			For n = 2, prime(2) = 3, prime(2+1) = 5 and prime(2+2) = 7, so a(2) = 3*7 - 2*5 = 21 - 10 = 11.
For n = 24, prime(24) = 89, prime(24+1) = 97 and prime(24+2) = 101, so a(24) = 89*101 - 2*97 = 8989 - 194 = 8795.
		

References

  • Bartolo Luque, La brecha de Sloane: Tras la huella sociológica de las matemáticas, Investigación y Ciencia, Edición española de Scientific American, julio de 2014, p. 90-91.

Crossrefs

Programs

  • Maple
    seq(ithprime(n)*ithprime(n+2)-2*ithprime(n+1), n=1..1000); # Robert Israel, Dec 21 2014
  • Mathematica
    First[#]Last[#]-2#[[2]]&/@Partition[Prime[Range[100]],3,1] (* Harvey P. Dale, Jun 16 2011 *)
  • PARI
    a(n,p=prime(n))=my(q=nextprime(p+1)); p*nextprime(q+1) - 2*q
    apply(p->a(0,p), primes(100)) \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = A000040(n)*A000040(n+2) - 2*A000040(n+1) = A090076(n) - A100484(n+1).
a(n) ~ n^2 log^2 n. - Charles R Greathouse IV, Sep 14 2015
Showing 1-6 of 6 results.