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-7 of 7 results.

A153257 a(n) = n^3 - (n+1)^2.

Original entry on oeis.org

-1, -3, -1, 11, 39, 89, 167, 279, 431, 629, 879, 1187, 1559, 2001, 2519, 3119, 3807, 4589, 5471, 6459, 7559, 8777, 10119, 11591, 13199, 14949, 16847, 18899, 21111, 23489, 26039, 28767, 31679, 34781, 38079, 41579, 45287, 49209, 53351, 57719, 62319, 67157, 72239
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n^3-(n+1)^2,{n,0,40}] (* Harvey P. Dale, Oct 05 2022 *)
  • PARI
    my(x='x+O('x^43)); Vec((x^3+5*x^2+x-1)/(x-1)^4) \\ Elmo R. Oliveira, Aug 27 2025

Formula

From Elmo R. Oliveira, Aug 27 2025: (Start)
G.f.: (-1 + x + 5*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-1 + x)*(1 + 3*x + x^2)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

Extensions

More terms from Elmo R. Oliveira, Aug 27 2025

A154111 Numbers n such that (n+1)^2 - n^3 is a (positive or negative) prime.

Original entry on oeis.org

1, 3, 5, 6, 8, 11, 12, 15, 18, 20, 27, 33, 35, 39, 41, 45, 48, 50, 54, 65, 66, 68, 86, 87, 92, 96, 99, 107, 116, 122, 123, 126, 138, 140, 149, 150, 156, 159, 161, 164, 165, 167, 170, 177, 182, 185, 188, 191, 192, 198, 200, 207, 209, 219, 228, 237, 239, 240, 242, 252
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

A154112 Numbers k such that (k+1)^3 - k^2 is prime.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 16, 19, 20, 32, 34, 37, 42, 44, 45, 49, 51, 52, 56, 60, 62, 70, 72, 74, 75, 77, 79, 81, 89, 90, 95, 96, 97, 100, 101, 104, 105, 111, 114, 115, 121, 126, 131, 136, 145, 151, 154, 156, 161, 171, 174, 175, 180, 182, 191, 199, 200, 202, 207
Offset: 1

Views

Author

Keywords

Examples

			2^3-1^2 = 7, 3^3-2^2 = 23, ...
		

Crossrefs

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(((n+1)^3-n^2))]; // Vincenzo Librandi, Nov 26 2010
    
  • Mathematica
    a[n_]:=(n+1)^3-n^2;lst={};Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,6!}];lst
    Select[Range[210],PrimeQ[(#+1)^3-#^2]&] (* Harvey P. Dale, Sep 20 2011 *)
  • PARI
    is(n)=isprime((n+1)^3 - n^2) \\ Charles R Greathouse IV, Sep 02 2016

A154113 Primes of the form (n+1)^3 - n^2.

Original entry on oeis.org

7, 23, 109, 191, 307, 463, 919, 1231, 1607, 2053, 4657, 7639, 8861, 34913, 41719, 53503, 77743, 89189, 95311, 122599, 138007, 146173, 182057, 223381, 246203, 353011, 383833, 416399, 433351, 468623, 505759, 544807, 721079, 745471, 875711
Offset: 1

Views

Author

Keywords

Examples

			2^3-1^2=7, 3^3-2^2=23, ...
		

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is (n+1)^3 - n^2]; // Vincenzo Librandi, Sep 02 2016
    
  • Mathematica
    a[n_]:=(n+1)^3-n^2;lst={};Do[If[PrimeQ[a[n]],AppendTo[lst,a[n]]],{n,6!}];lst
    Select[(#+1)^3-#^2&/@Range[200],PrimeQ]  (* Harvey P. Dale, Mar 14 2011 *)
  • PARI
    for(n=1,1e3, if(isprime(t=(n+1)^3 - n^2), print1(t", "))) \\ Charles R Greathouse IV, Sep 02 2016

A154115 Numbers n such that n + 3 is prime.

Original entry on oeis.org

0, 2, 4, 8, 10, 14, 16, 20, 26, 28, 34, 38, 40, 44, 50, 56, 58, 64, 68, 70, 76, 80, 86, 94, 98, 100, 104, 106, 110, 124, 128, 134, 136, 146, 148, 154, 160, 164, 170, 176, 178, 188, 190, 194, 196, 208, 220, 224, 226, 230, 236, 238, 248, 254, 260, 266, 268, 274, 278
Offset: 1

Views

Author

Keywords

Examples

			a(2) = 2 since (2 + 2)^2 - (2 + 1)^2 - 2 = 5.
		

Crossrefs

Cf. A067076 (a(n-1)/2).

Programs

  • Magma
    [n: n in [0..500] | IsPrime((n+2)^2-(n+1)^2-n)]; // Vincenzo Librandi, Nov 26 2010
    
  • Maple
    A154115 := proc(n) ithprime(n+1)-3 ; end proc: # R. J. Mathar, May 09 2010
  • Mathematica
    a[n_]:=(n+2)^2-(n+1)^2-n;lst={};Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,6!}];lst
    Select[Range[0,300],PrimeQ[(#+2)^2-(#+1)^2-#]&] (* Harvey P. Dale, Nov 06 2013 *)
    Prime[Range[2,100]]-3 (* Harvey P. Dale, Jul 15 2017 *)
  • PARI
    is(n)=isprime(n+3) \\ Charles R Greathouse IV, Sep 02 2016

Formula

a(n) = A086801(n+1). - R. J. Mathar, May 09 2010

Extensions

New name based on a comment by Franklin T. Adams-Watters, Jan 30 2009

A171771 Primes of form n^6-(n+1)^5.

Original entry on oeis.org

971, 431441, 838949, 2614691, 6770161, 43845881, 570523321, 9244951889, 33640090481, 41402933641, 81303824909, 126165366289, 137240997911, 346860978491, 372445245449, 525200678549, 726938163649, 774170449439
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 18 2009

Keywords

Comments

(1) It is conjectured that sequence is infinite.
(2) p=97=prime(25) is the smallest prime such that (p-1)^6-p^5 and p^6-(p+1)^5 are primes.

Examples

			4^6-5^5=971 and 9^6-10^5=431441 are prime.
		

References

  • Leonard E. Dickson: History of the Theory of numbers, vol. I, Dover Publications 2005
  • Derrick H. Lehmer, Guide to Tables in the Theory of Numbers Washington, D.C. 1941

Crossrefs

Programs

  • Mathematica
    Select[Table[n^6-(n+1)^5,{n,3,100}],PrimeQ] (* Harvey P. Dale, Mar 06 2019 *)

Extensions

Edited by D. S. McNeil, Nov 21 2010

A172192 Numbers k such that k^6 - (k+1)^5 is prime.

Original entry on oeis.org

4, 9, 10, 12, 14, 19, 29, 46, 57, 59, 66, 71, 72, 84, 85, 90, 95, 96, 97, 114, 119, 122, 155, 157, 190, 191, 204, 207, 212, 221, 222, 244, 251, 256, 276, 285, 286, 289, 294, 300, 301, 307, 319, 320, 337, 344, 355, 359, 380, 382, 392, 400, 411, 422, 426, 441, 451
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Jan 29 2010

Keywords

Comments

Corresponding primes are in A171771. Negative values of primes are obtained for 1 and 2.

Examples

			4^6-(4+1)^5 = 971 is prime, so 4 is in the sequence.
5^6-(5+1)^5 = 7849 = 47*167 is composite, so 5 is not in the sequence.
9^6-(9+1)^5 = 431441 is prime, so 9 is in the sequence.
		

Crossrefs

Cf. A171771, A002327 (primes of form n^2-n-1), A140719 (primes of form n^3-(n+1)^2), A087191 (primes of form n^4-(n+1)^3).

Programs

  • Magma
    [ n: n in [1..460] | IsPrime(p) and p gt 0 where p is n^6-(n+1)^5 ];
    
  • Mathematica
    Select[Range[3,500],PrimeQ[#^6-(#+1)^5]&] (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    is(n)=isprime(n^6-(n+1)^5) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

Edited, extended, non-specific references removed and MAGMA program added by Associate Editors OEIS, Mar 05 2010
Showing 1-7 of 7 results.