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-10 of 33 results. Next

A002504 Numbers x such that 1 + 3*x*(x-1) is a ("cuban") prime (cf. A002407).

Original entry on oeis.org

2, 3, 4, 5, 7, 10, 11, 12, 14, 15, 18, 24, 25, 26, 28, 29, 31, 33, 35, 38, 39, 42, 43, 46, 49, 50, 53, 56, 59, 63, 64, 67, 68, 75, 81, 82, 87, 89, 91, 92, 94, 96, 106, 109, 120, 124, 126, 129, 130, 137, 141, 143, 148, 154, 157, 158, 159, 165, 166, 171, 172
Offset: 1

Views

Author

Keywords

Comments

Equivalently, positive integers x such that x^3 - (x-1)^3 is prime. - Rémi Guillaume, Oct 24 2023

Examples

			From _Rémi Guillaume_, Dec 07 2023: (Start)
1 + 3*7*6 = 127 = A002407(5) is the 5th prime of this form, so a(5) = 7.
1 + 3*10*9 = 271 = A002407(6) is the 6th prime of this form, so a(6) = 10.
(End)
		

References

  • A. J. C. Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002407 (resulting primes), A111251, A121259.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[1 + 3 # (# - 1)] &] (* T. D. Noe, Jan 30 2013 *)
  • PARI
    for(k=1,999,isprime(3*k*(k-1)+1)&print1(k",")) \\ M. F. Hasler, Nov 28 2007

Formula

From Rémi Guillaume, Dec 07 2023: (Start)
a(n) = ceiling(sqrt(A002407(n)/3)).
a(n) = A111251(n) + 1.
a(n) = (A121259(n) + 1)/2. (End)

Extensions

Edited, updated (1 is no longer regarded as a prime) and extended by M. F. Hasler, Nov 28 2007

A221793 Partial sums of cuban primes A002407, that is, primes equal to the difference of two consecutive cubes.

Original entry on oeis.org

7, 26, 63, 124, 251, 522, 853, 1250, 1797, 2428, 3347, 5004, 6805, 8756, 11025, 13462, 16253, 19422, 22993, 27212, 31659, 36826, 42245, 48456, 55513, 62864, 71133, 80374, 90641, 102360, 114457, 127724, 141393, 158044, 177485, 197412, 219859, 243356, 267927, 293044
Offset: 1

Views

Author

Vladimir Pletser, Jan 25 2013

Keywords

Crossrefs

Cf. A002407.

Extensions

Edited by M. F. Hasler, Jan 26 2013

A145203 a(n) = pi(A002407(n)).

Original entry on oeis.org

4, 8, 12, 18, 31, 58, 67, 78, 101, 115, 157, 260, 279, 297, 337, 361, 406, 449, 500, 578, 604, 688, 716, 808, 907, 937, 1037, 1146, 1259, 1407, 1447, 1577, 1614, 1926, 2204, 2253, 2511, 2613, 2725, 2772, 2882, 2992, 3576, 3762, 4480
Offset: 1

Views

Author

Keywords

Examples

			From _Rémi Guillaume_, Dec 28 2023: (Start)
a(5) = pi(A002407(5)) = pi(127) = 31, i.e., A002407(5) = prime(31).
a(6) = pi(A002407(6)) = pi(271) = 58, i.e., A002407(6) = prime(58). (End)
		

Crossrefs

Cf. A002407, A000720 (pi), A000040 (prime).

Programs

  • PARI
    j=[];for(n=1,300,if(isprime(n^3-(n-1)^3),j=concat(j,primepi(n^3-(n-1)^3))));j
    
  • Python
    from sympy import isprime, primepi
    A145203_list = [primepi(3*n*(n+1)+1) for n in range(10**3) if isprime(3*n*(n+1)+1)] # Chai Wah Wu, Jun 02 2017

A286935 Number of partitions of n into primes which are the difference of two consecutive cubes (A002407).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 2, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 3, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 2, 3, 2, 3, 1, 3, 2, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, May 16 2017

Keywords

Examples

			a(56) = 2 because we have [37, 19] and [7, 7, 7, 7, 7, 7, 7, 7].
		

Crossrefs

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[Product[1/(1 - x^k), {k, Select[(Range[nmax] + 1)^3 - Range[nmax]^3, PrimeQ]}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} 1/(1 - x^A002407(k)).

A003215 Hex (or centered hexagonal) numbers: 3*n*(n+1)+1 (crystal ball sequence for hexagonal lattice).

Original entry on oeis.org

1, 7, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397, 469, 547, 631, 721, 817, 919, 1027, 1141, 1261, 1387, 1519, 1657, 1801, 1951, 2107, 2269, 2437, 2611, 2791, 2977, 3169, 3367, 3571, 3781, 3997, 4219, 4447, 4681, 4921, 5167, 5419, 5677, 5941, 6211, 6487, 6769
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
Crystal ball sequence for A_2 lattice. - Michael Somos, Jun 03 2012
Sixth spoke of hexagonal spiral (cf. A056105-A056109).
Number of ordered integer triples (a,b,c), -n <= a,b,c <= n, such that a+b+c=0. - Benoit Cloitre, Jun 14 2003
Also the number of partitions of 6n into at most 3 parts, A001399(6n). - R. K. Guy, Oct 20 2003
Also, a(n) is the number of partitions of 6(n+1) into exactly 3 distinct parts. - William J. Keith, Jul 01 2004
Number of dots in a centered hexagonal figure with n+1 dots on each side.
Values of second Bessel polynomial y_2(n) (see A001498).
First differences of cubes (A000578). - Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 15 2004
Final digits of Hex numbers (hex(n) mod 10) are periodic with palindromic period of length 5 {1, 7, 9, 7, 1}. Last two digits of Hex numbers (hex(n) mod 100) are periodic with palindromic period of length 100. - Alexander Adamchuk, Aug 11 2006
All divisors of a(n) are congruent to 1, modulo 6. Proof: If p is an odd prime different from 3 then 3n^2 + 3n + 1 = 0 (mod p) implies 9(2n + 1)^2 = -3 (mod p), whence p = 1 (mod 6). - Nick Hobson, Nov 13 2006
For n>=1, a(n) is the side of Outer Napoleon Triangle whose reference triangle is a right triangle with legs (3a(n))^(1/2) and 3n(a(n))^(1/2). - Tom Schicker (tschicke(AT)email.smith.edu), Apr 25 2007
Number of triples (a,b,c) where 0<=(a,b)<=n and c=n (at least once the term n). E.g., for n = 1: (0,0,1), (0,1,0), (1,0,0), (0,1,1), (1,0,1), (1,1,0), (1,1,1), so a(1)=7. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 20 2007
Equals the triangular numbers convolved with [1, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson and Alexander R. Povolotsky, May 29 2009
From Terry Stickels, Dec 07 2009: (Start)
Also the maximum number of viewable cubes from any one static point while viewing a cube stack of identical cubes of varying magnitude.
For example, viewing a 2 X 2 X 2 stack will yield 7 maximum viewable cubes.
If the stack is 3 X 3 X 3, the maximum number of viewable cubes from any one static position is 19, and so on.
The number of cubes in the stack must always be the same number for width, length, height (at true regular cubic stack) and the maximum number of visible cubes can always be found by taking any cubic number and subtracting the number of the cube that is one less.
Examples: 125 - 64 = 61, 64 - 27 = 37, 27 - 8 = 19. (End)
The sequence of digital roots of the a(n) is period 3: repeat [1,7,1]. - Ant King, Jun 17 2012
The average of the first n (n>0) centered hexagonal numbers is the n-th square. - Philippe Deléham, Feb 04 2013
A002024 is the following array A read along antidiagonals:
1, 2, 3, 4, 5, 6, ...
2, 3, 4, 5, 6, 7, ...
3, 4, 5, 6, 7, 8, ...
4, 5, 6, 7, 8, 9, ...
5, 6, 7, 8, 9, 10, ...
6, 7, 8, 9, 10, 11, ...
and a(n) is the hook sum Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). - R. J. Mathar, Jun 30 2013
a(n) is the sum of the terms in the n+1 X n+1 matrices minus those in n X n matrices in an array formed by considering A158405 an array (the beginning terms in each row are 1,3,5,7,9,11,...). - J. M. Bergot, Jul 05 2013
The formula also equals the product of the three distinct combinations of two consecutive numbers: n^2, (n+1)^2, and n*(n+1). - J. M. Bergot, Mar 28 2014
The sides of any triangle ABC are divided into 2n + 1 equal segments by 2n points: A_1, A_2, ..., A_2n in side a, and also on the sides b and c cyclically. If A'B'C' is the triangle delimited by AA_n, BB_n and CC_n cevians, we have (ABC)/(A'B'C') = a(n) (see Java applet link). - Ignacio Larrosa Cañestro, Jan 02 2015
a(n) is the maximal number of parts into which (n+1) triangles can intersect one another. - Ivan N. Ianakiev, Feb 18 2015
((2^m-1)n)^t mod a(n) = ((2^m-1)(n+1))^t mod a(n) = ((2^m-1)(2n+1))^t mod a(n), where m any positive integer, and t = 0(mod 6). - Alzhekeyev Ascar M, Oct 07 2016
((2^m-1)n)^t mod a(n) = ((2^m-1)(n+1))^t mod a(n) = a(n) - (((2^m-1)(2n+1))^t mod a(n)), where m any positive integer, and t = 3(mod 6). - Alzhekeyev Ascar M, Oct 07 2016
(3n+1)^(a(n)-1) mod a(n) = (3n+2)^(a(n)-1) mod a(n) = 1. If a(n) not prime, then always strong pseudoprime. - Alzhekeyev Ascar M, Oct 07 2016
Every positive integer is the sum of 8 hex numbers (zero included), at most 3 of which are greater than 1. - Mauro Fiorentini, Jan 01 2018
Area enclosed by the segment of Archimedean spiral between n*Pi/2 and (n+1)*Pi/2 in Pi^3/48 units. - Carmine Suriano, Apr 10 2018
This sequence contains all numbers k such that 12*k - 3 is a square. - Klaus Purath, Oct 19 2021
The continued fraction expansion of sqrt(3*a(n)) is [3n+1; {1, 1, 2n, 1, 1, 6n+2}]. For n = 0, this collapses to [1; {1, 2}]. - Magus K. Chu, Sep 12 2022

Examples

			G.f. = 1 + 7*x + 19*x^2 + 37*x^3 + 61*x^4 + 91*x^5 + 127*x^6 + 169*x^7 + 217*x^8 + ...
From _Omar E. Pol_, Aug 21 2011: (Start)
Illustration of initial terms:
.
.                                 o o o o
.                   o o o        o o o o o
.         o o      o o o o      o o o o o o
.   o    o o o    o o o o o    o o o o o o o
.         o o      o o o o      o o o o o o
.                   o o o        o o o o o
.                                 o o o o
.
.   1      7          19             37
.
(End)
From _Klaus Purath_, Dec 03 2021: (Start)
(1) a(19) is not a prime number, because besides a(19) = a(9) + P(29), a(19) = a(15) + P(20) = a(2) + P(33) is also true.
(2) a(25) is prime, because except for a(25) = a(12) + P(38) there is no other equation of this pattern. (End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 81.
  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=3 of A080853, and column k=2 of A047969.
See also A220083 for a list of numbers of the form n*P(s,n)-(n-1)*P(s,n-1), where P(s,n) is the n-th polygonal number with s sides.
Cf. A287326(A000124(n), 1).
Cf. A008292.
Cf. A154105.

Programs

Formula

a(n) = 3*n*(n+1) + 1, n >= 0 (see the name).
a(n) = (n+1)^3 - n^3 = a(-1-n).
G.f.: (1 + 4*x + x^2) / (1 - x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = 6*A000217(n) + 1.
a(n) = a(n-1) + 6*n = 2a(n-1) - a(n-2) + 6 = 3*a(n-1) - 3*a(n-2) + a(n-3) = A056105(n) + 5n = A056106(n) + 4*n = A056107(n) + 3*n = A056108(n) + 2*n = A056108(n) + n.
n-th partial arithmetic mean is n^2. - Amarnath Murthy, May 27 2003
a(n) = 1 + Sum_{j=0..n} (6*j). E.g., a(2)=19 because 1+ 6*0 + 6*1 + 6*2 = 19. - Xavier Acloque, Oct 06 2003
The sum of the first n hexagonal numbers is n^3. That is, Sum_{n>=1} (3*n*(n-1) + 1) = n^3. - Edward Weed (eweed(AT)gdrs.com), Oct 23 2003
a(n) = right term in M^n * [1 1 1], where M = the 3 X 3 matrix [1 0 0 / 2 1 0 / 3 3 1]. M^n * [1 1 1] = [1 2n+1 a(n)]. E.g., a(4) = 61, right term in M^4 * [1 1 1], since M^4 * [1 1 1] = [1 9 61] = [1 2n+1 a(4)]. - Gary W. Adamson, Dec 22 2004
Row sums of triangle A130298. - Gary W. Adamson, Jun 07 2007
a(n) = 3*n^2 + 3*n + 1. Proof: 1) If n occurs once, it may be in 3 positions; for the two other ones, n terms are independently possible, then we have 3*n^2 different triples. 2) If the term n occurs twice, the third one may be placed in 3 positions and have n possible values, then we have 3*n more different triples. 3) The term n may occurs 3 times in one way only that gives the formula. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 20 2007
Binomial transform of [1, 6, 6, 0, 0, 0, ...]; Narayana transform (A001263) of [1, 6, 0, 0, 0, ...]. - Gary W. Adamson, Dec 29 2007
a(n) = (n-1)*A000166(n) + (n-2)*A000166(n-1) = (n-1)floor(n!*e^(-1)+1) + (n-2)*floor((n-1)!*e^(-1)+1) (with offset 0). - Gary Detlefs, Dec 06 2009
a(n) = A028896(n) + 1. - Omar E. Pol, Oct 03 2011
a(n) = integral( (sin((n+1/2)x)/sin(x/2))^3, x=0..Pi)/Pi. - Yalcin Aktar, Dec 03 2011
Sum_{n>=0} 1/a(n) = Pi/sqrt(3)*tanh(Pi/(2*sqrt(3))) = 1.305284153013581... - Ant King, Jun 17 2012
a(n) = A000290(n) + A000217(2n+1). - Ivan N. Ianakiev, Sep 24 2013
a(n) = A002378(n+1) + A056220(n) = A005408(n) + 2*A005449(n) = 6*A000217(n) + 1. - Ivan N. Ianakiev, Sep 26 2013
a(n) = 6*A000124(n) - 5. - Ivan N. Ianakiev, Oct 13 2013
a(n) = A239426(n+1) / A239449(n+1) = A215630(2*n+1,n+1). - Reinhard Zumkeller, Mar 19 2014
a(n) = A243201(n) / A002061(n + 1). - Mathew Englander, Jun 03 2014
a(n) = A101321(6,n). - R. J. Mathar, Jul 28 2016
E.g.f.: (1 + 6*x + 3*x^2)*exp(x). - Ilya Gutkovskiy, Jul 28 2016
a(n) = (A001844(n) + A016754(n))/2. - Bruce J. Nicholson, Aug 06 2017
a(n) = A045943(2n+1). - Miquel Cerda, Jan 22 2018
a(n) = 3*Integral_{x=n..n+1} x^2 dx. - Carmine Suriano, Apr 10 2018
a(n) = A287326(A000124(n), 1). - Kolosov Petro, Oct 22 2018
From Amiram Eldar, Jun 20 2020: (Start)
Sum_{n>=0} a(n)/n! = 10*e.
Sum_{n>=0} (-1)^(n+1)*a(n)/n! = 2/e. (End)
G.f.: polylog(-3, x)*(1-x)/x. See the Simon Plouffe formula above, and the g.f. of the rows of A008292 by Vladeta Jovovic, Sep 02 2002. - Wolfdieter Lang, May 08 2021
a(n) = T(n-1)^2 - 2*T(n)^2 + T(n+1)^2, n >= 1, T = triangular number A000217. - Klaus Purath, Oct 11 2021
a(n) = 1 + 2*Sum_{j=n..2n} j. - Klaus Purath, Oct 19 2021
a(n) = A069099(n+1) - A000217(n). - Klaus Purath, Nov 03 2021
From Leo Tavares, Dec 03 2021: (Start)
a(n) = A005448(n) + A140091(n);
a(n) = A001844(n) + A002378(n);
a(n) = A005891(n) + A000217(n);
a(n) = A000290(n) + A000384(n+1);
a(n) = A060544(n-1) + 3*A000217(n);
a(n) = A060544(n-1) + A045943(n).
a(2*n+1) = A154105(n).
(End)

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A007645 Generalized cuban primes: primes of the form x^2 + xy + y^2; or primes of the form x^2 + 3*y^2; or primes == 0 or 1 (mod 3).

Original entry on oeis.org

3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613
Offset: 1

Views

Author

Keywords

Comments

Also, odd primes p such that -3 is a square mod p. - N. J. A. Sloane, Dec 25 2017
Equivalently, primes of the form p = (x^3 - y^3)/(x - y). If x=y+1 we get the cuban primes A002407, which is therefore a subsequence.
These are not to be confused with the Eisenstein primes, which are the primes in the ring of integers Z[w], where w = (-1+sqrt(-3))/2. The present sequence gives the rational primes which are also Eisenstein primes. - N. J. A. Sloane, Feb 06 2008
Also primes of the form x^2+3y^2 and, except for 3, x^2+xy+7y^2. See A140633. - T. D. Noe, May 19 2008
Conjecture: this sequence is Union(A002383,A162471). - Daniel Tisdale, Jul 04 2009
Primes p such that antiharmonic mean B(p) of the numbers k < p such that gcd(k, p) = 1 is not integer, where B(p) = A053818(p) / A023896(p) = A175505(p) / A175506(p) = (2p - 1) / 3. Primes p such that A175506(p) > 1. Subsequence of A179872. Union a(n) + A179891 = A179872. Example: a(6) = 37 because B(37) = A053818(37) / A023896(37) = A175505(37) / A175506(37) = 16206 / 666 = 73 / 3 (not integer). Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891, A003627, A034934. - Jaroslav Krizek, Aug 01 2010
Subsequence of Loeschian numbers, cf. A003136 and A024614; A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
Primes such that there exist a unique x, y, with 1 < x <= y < p, x + y == 1 (mod p) and x * y == 1 (mod p). - Jon Perry, Feb 02 2014
The prime factors of A002061. - Richard R. Forberg, Dec 10 2014
This sequence gives the primes p which solve s^2 == -3 (mod 4*p) (see Buell, Proposition 4.1., p. 50, for Delta = -3). p = 2 is not a solution. x^2 == -3 (mod 4) has solutions for all odd x. x^2 == -3 (mod p) has for odd primes p, not 3, the solutions of Legendre(-3|p) = +1 which are p == {1, 7} (mod 12). For p = 3 the representative solution is x = 0. Hence the solution of s^2 == -3 (mod 4*p) are the odd primes p = 3 and p == {1, 7} (mod 12) (or the primes p = 0, 1 (mod 3)). - Wolfdieter Lang, May 22 2021

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, p. 50.
  • Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 220-223, 1996.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 7.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Wagon, S. "Eisenstein Primes." Section 9.8 in Mathematica in Action. New York: W. H. Freeman, pp. 319-323, 1991.

Crossrefs

Subsequence of A003136.
Subsequences include A002407, A002648, and A201477.
Apart from initial term, same as A045331.
Cf. A001479, A001480 (x and y such that a(n) = x^2 + 3y^2).
Primes in A003136 and A034017.

Programs

  • Haskell
    a007645 n = a007645_list !! (n-1)
    a007645_list = filter ((== 1) . a010051) $ tail a003136_list
    -- Reinhard Zumkeller, Jul 11 2013, Oct 30 2011
  • Maple
    select(isprime,[3, seq(6*k+1, k=1..1000)]); # Robert Israel, Dec 12 2014
  • Mathematica
    Join[{3},Select[Prime[Range[150]],Mod[#,3]==1&]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    forprime(p=2,1e3,if(p%3<2,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    

Formula

p == 0 or 1 (mod 3).
{3} UNION A002476. - R. J. Mathar, Oct 28 2008

Extensions

Entry revised by N. J. A. Sloane, Jan 29 2013

A181123 Numbers that are the differences of two positive cubes.

Original entry on oeis.org

0, 7, 19, 26, 37, 56, 61, 63, 91, 98, 117, 124, 127, 152, 169, 189, 208, 215, 217, 218, 271, 279, 296, 316, 331, 335, 342, 386, 387, 397, 448, 469, 485, 488, 504, 511, 513, 547, 602, 604, 631, 657, 665, 702, 721, 728, 784, 817, 819, 866, 875, 919, 936, 973
Offset: 1

Views

Author

T. D. Noe, Oct 06 2010

Keywords

Comments

Because x^3-y^3 = (x-y)(x^2+xy+y^2), the difference of two cubes is a prime number only if x=y+1, in which case all the primes are cuban, see A002407.
The difference can be a square (see A038597), but Fermat's Last Theorem prevents the difference from ever being a cube. Beal's Conjecture implies that there are no higher odd powers in this sequence.
If n is in the sequence, it must be x^3-y^3 where 0 < y <= x < n^(1/2). - Robert Israel, Dec 24 2017

Crossrefs

Cf. A024352 (squares), A147857 (4th powers), A181124-A181128 (5th to 9th powers).

Programs

  • Maple
    N:= 10^4: # to get all terms <= N
    sort(convert(select(`<=`, {0, seq(seq(x^3-y^3, y=1..x-1),x=1..floor(sqrt(N)))}, N),list)); # Robert Israel, Dec 24 2017
  • Mathematica
    nn=10^5; p=3; Union[Reap[Do[n=i^p-j^p; If[n<=nn, Sow[n]], {i,Ceiling[(nn/p)^(1/(p-1))]}, {j,i}]][[2,1]]]
    With[{nn=60},Take[Union[Abs[Flatten[Differences/@Tuples[ Range[ nn]^3,2]]]], nn]] (* Harvey P. Dale, May 11 2014 *)
  • PARI
    list(lim)=my(v=List([0]),a3); for(a=2,sqrtint(lim\3), a3=a^3; for(b=if(a3>lim,sqrtnint(a3-lim-1,3)+1,1), a-1, listput(v,a3-b^3))); Set(v) \\ Charles R Greathouse IV, Jan 25 2018

A007781 a(n) = (n+1)^(n+1) - n^n for n>0, a(0) = 1.

Original entry on oeis.org

1, 3, 23, 229, 2869, 43531, 776887, 15953673, 370643273, 9612579511, 275311670611, 8630788777645, 293959006143997, 10809131718965763, 426781883555301359, 18008850183328692241, 808793517812627212561
Offset: 0

Views

Author

Peter McCormack (peter.mccormack(AT)its.csiro.au)

Keywords

Comments

(12n^2 + 6n + 1)^2 divides a(6n+1), where (12n^2 + 6n + 1) = (2n+1)^3 - (2n)^3 = A127854(n) = A003215(2n) are the hex (or centered hexagonal) numbers. The prime numbers of the form 12n^2 + 6n + 1 belong to A002407. - Alexander Adamchuk, Apr 09 2007

Examples

			a(14) = 10809131718965763 = 3 * 61^2 * 968299894201.
		

References

  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see equation (6.7).

Crossrefs

Programs

Formula

a(n) = A000312(n+1) - A000312(n) for n>0, a(0) = 1.
a(n) = abs(discriminant(x^(n+1)-x+1)).
E.g.f.: W(-x)/(1+W(-x)) - W(-x)/((1+W(-x))^3*x) where W is the Lambert W function. - Robert Israel, Aug 19 2015
Limit_{n->oo} (a(n+2)/a(n+1) - a(n+1)/a(n)) = e (Cusumano, 2007). - Amiram Eldar, Jan 03 2022

A121616 Primes of form (k+1)^5 - k^5 = A022521(k).

Original entry on oeis.org

31, 211, 4651, 61051, 371281, 723901, 1803001, 2861461, 4329151, 4925281, 7086451, 7944301, 14835031, 19611901, 23382031, 44119351, 54664711, 86548801, 97792531, 162478501, 189882031, 267217051, 293109961, 306740281, 490099501
Offset: 1

Views

Author

Alexander Adamchuk, Aug 10 2006

Keywords

Comments

Might be called "Pentan primes" (in analogy with Cuban primes, of the form (n+1)^3-n^3), or "Nexus primes of order 5" (cf. link below).
Indices k such that Nexus number of order 5 (or A022521(k-1) = k^5 - (k-1)^5) is prime are listed in A121617 = {2, 3, 6, 11, 17, 20, 25, 28, 31, 32, 35, 36, 42, 45, 47, 55, 58, 65, 67, 76, 79, 86, 88, 89, 100,...}.
The last digit is always 1 because 5 is the Pythagorean prime A002144(1). a(1) = 31 is the Mersenne prime A000668(3).

Crossrefs

Programs

  • Magma
    [a: n in [0..110] | IsPrime(a) where a is (n+1)^5-n^5]; // Vincenzo Librandi, Jan 20 2020
  • Mathematica
    Select[Table[n^5 - (n-1)^5, {n,1,200}],PrimeQ]
    Select[Differences[Range[100]^5],PrimeQ] (* Harvey P. Dale, Nov 03 2021 *)

A121618 Nexus primes of order 7 or primes of form n^7 - (n-1)^7 = A022523(n-1).

Original entry on oeis.org

127, 14197, 543607, 1273609, 2685817, 5217031, 16344637, 141903217, 1928294551, 8258704609, 14024867221, 22815424087, 30914273881, 91154730577, 116160677851, 183510024391, 280667317267, 552932810431, 1517045588059
Offset: 1

Views

Author

Alexander Adamchuk, Aug 10 2006

Keywords

Comments

Indices n such that Nexus number of 7 order (or A022523(n-1) = n^7 - (n-1)^7) is prime are listed in A121619(n) = {2,4,7,8,9,10,12,17,26, 33,36,39,41,49,51,55,59,66,78,79,80,88,96,98,...}. a(1) = 127 is Mersenne prime A000668(4).

Crossrefs

Programs

  • Mathematica
    Select[Table[n^7 - (n-1)^7, {n,1,200}],PrimeQ]
    Select[Differences[Range[100]^7],PrimeQ] (* Harvey P. Dale, Mar 27 2025 *)
  • PARI
    select(isprime,vector(1000,n,n^7-(n-1)^7)) \\ Charles R Greathouse IV, May 15 2013
Showing 1-10 of 33 results. Next