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 286 results. Next

A113530 Semiprimes in A003215.

Original entry on oeis.org

91, 169, 217, 469, 721, 817, 1027, 1141, 1261, 1387, 2611, 2977, 3781, 3997, 4681, 5677, 5941, 6487, 6769, 7651, 7957, 8587, 9577, 10981, 11347, 12481, 12871, 14077, 14491, 15769, 16207, 17557, 18019, 18961, 20419, 20917, 21421, 22969, 24031
Offset: 1

Views

Author

Jonathan Vos Post, Jan 12 2006

Keywords

Comments

Intersection of A003215 and A001358.

Examples

			a(1) = 91 because A003215(5) = (5+1)^3 - 5^3 = 91 = 7 * 13 is semiprime.
a(7) = 121 because A003215(7) = (7+1)^3 - 7^3 = 169 = 13^2 is semiprime; the two prime factors need not be distinct.
		

Crossrefs

Programs

  • Mathematica
    Select[Array[3 #^2 + 3 # + 1 &, 90], PrimeOmega[#] == 2 &] (* Michael De Vlieger, Mar 17 2021 *)

A001922 Numbers k such that 3*k^2 - 3*k + 1 is both a square (A000290) and a centered hexagonal number (A003215).

Original entry on oeis.org

1, 8, 105, 1456, 20273, 282360, 3932761, 54776288, 762935265, 10626317416, 148005508553, 2061450802320, 28712305723921, 399910829332568, 5570039304932025, 77580639439715776, 1080558912851088833, 15050244140475527880, 209622859053806301481
Offset: 0

Views

Author

Keywords

Comments

Also larger of two consecutive integers whose cubes differ by a square. Defined by a(n)^3 - (a(n) - 1)^3 = square.
Let m be the n-th ratio 2/1, 7/4, 26/15, 97/56, 362/209, ... Then a(n) = m*(2-m)/(m^2-3). The numerators 2, 7, 26, ... of m are A001075. The denominators 1, 4, 15, ... of m are A001353.
From Colin Barker, Jan 06 2015: (Start)
Also indices of centered triangular numbers (A005448) which are also centered square numbers (A001844).
Also indices of centered hexagonal numbers (A003215) which are also centered octagonal numbers (A016754).
Also positive integers x in the solutions to 3*x^2 - 4*y^2 - 3*x + 4*y = 0, the corresponding values of y being A156712.
(End)

Examples

			8 is in the sequence because 3*8^2 - 3*8 + 1 = 169 is a square and also a centered hexagonal number. - _Colin Barker_, Jan 07 2015
		

References

  • 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

Programs

  • Magma
    I:=[1, 8, 105]; [n le 3 select I[n] else 15*Self(n-1)-15*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Apr 16 2012
    
  • Maple
    seq(simplify((1 +ChebyshevU(n,7) +ChebyshevU(n-1,7))/2), n=0..30); # G. C. Greubel, Oct 07 2022
  • Mathematica
    With[{s1=3+2Sqrt[3],s2=3-2Sqrt[3],t1=7+4Sqrt[3],t2=7-4Sqrt[3]}, Simplify[ Table[(s1 t1^n+s2 t2^n+6)/12,{n,0,20}]]] (* or *) LinearRecurrence[ {15,-15,1},{1,8,105},21] (* Harvey P. Dale, Aug 14 2011 *)
    CoefficientList[Series[(1-7*x)/(1-15*x+15*x^2-x^3),{x,0,30}],x] (* Vincenzo Librandi, Apr 16 2012 *)
  • PARI
    Vec((1-7*x)/(1-15*x+15*x^2-x^3) + O(x^100)) \\ Colin Barker, Jan 06 2015
    
  • SageMath
    [(1+chebyshev_U(n,7) +chebyshev_U(n-1,7))/2 for n in range(30)] # G. C. Greubel, Oct 07 2022

Formula

a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3).
a(n) = (s1*t1^n + s2*t2^n + 6)/12 where s1 = 3 + 2*sqrt(3), s2 = 3 - 2*sqrt(3), t1 = 7 + 4*sqrt(3), t2 = 7 - 4*sqrt(3).
a(n) = A001075(n)*A001353(n+1).
G.f.: (1-7*x)/((1-x)*(1-14*x+x^2)). - Simon Plouffe (in his 1992 dissertation) and Colin Barker, Jan 01 2012
a(n) = A076139(n+1) - 7*A076139(n). - R. J. Mathar, Jul 14 2015
a(n) = (1/2)*(1 + ChebyshevU(n, 7) + ChebyshevU(n-1, 7)). G. C. Greubel, Oct 07 2022
a(n) = 1 - a(-1-n) = 1 + A001921(n) for all integers n. - Michael Somos, Jul 10 2025

Extensions

Additional comments from James R. Buddenhagen, Mar 04 2001
Name improved by Colin Barker, Jan 07 2015
Edited by Robert Israel, Feb 20 2017

A253175 Indices of hexagonal numbers (A000384) which are also centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 7, 67, 661, 6541, 64747, 640927, 6344521, 62804281, 621698287, 6154178587, 60920087581, 603046697221, 5969546884627, 59092422149047, 584954674605841, 5790454323909361, 57319588564487767, 567405431320968307, 5616734724645195301, 55599941815130984701
Offset: 1

Views

Author

Colin Barker, Jan 08 2015

Keywords

Comments

Also positive integers x in the solutions to 4*x^2-6*y^2-2*x+6*y-2 = 0, the corresponding values of y being A253475.

Examples

			7 is in the sequence because the 7th hexagonal number is 91, which is also the 6th centered hexagonal number.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11, -11, 1}, {1, 7, 67}, 25] (* Paolo Xausa, May 30 2025 *)
  • PARI
    Vec(-x*(x^2-4*x+1)/((x-1)*(x^2-10*x+1)) + O(x^100))

Formula

a(n) = 11*a(n-1)-11*a(n-2)+a(n-3).
G.f.: -x*(x^2-4*x+1) / ((x-1)*(x^2-10*x+1)).
a(n) = (2+(5-2*sqrt(6))^n*(3+sqrt(6))-(-3+sqrt(6))*(5+2*sqrt(6))^n)/8. - Colin Barker, Mar 05 2016
4*a(n) = 1+3*A072256(n). - R. J. Mathar, Feb 07 2022
a(n) = A350923(n)/2. - Paolo Xausa, May 30 2025

A253475 Indices of centered square numbers (A001844) which are also centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 6, 55, 540, 5341, 52866, 523315, 5180280, 51279481, 507614526, 5024865775, 49741043220, 492385566421, 4874114620986, 48248760643435, 477613491813360, 4727886157490161, 46801248083088246, 463284594673392295, 4586044698650834700, 45397162391834954701
Offset: 1

Views

Author

Colin Barker, Jan 02 2015

Keywords

Comments

Also positive integers x in the solutions to 4*x^2 - 6*y^2 - 4*x + 6*y = 0, the corresponding values of y being A054318.
Also indices of centered hexagonal numbers (A003215) which are also hexagonal numbers (A000384).
Also indices of terms in sequence A193218 which are the square root of a sum of 5th powers (A000539). - Daniel Poveda Parrilla, Jun 10 2017

Examples

			6 is in the sequence because the 6th centered square number is 61, which is also the 5th centered hexagonal number.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11, -11, 1}, {1, 6, 55}, 25] (* Paolo Xausa, May 30 2025 *)
  • PARI
    Vec(x*(5*x-1)/((x-1)*(x^2-10*x+1)) + O(x^100))

Formula

a(n) = 11*a(n-1)-11*a(n-2)+a(n-3).
G.f.: x*(5*x-1) / ((x-1)*(x^2-10*x+1)).
a(n) = sqrt((-2-(5-2*sqrt(6))^n-(5+2*sqrt(6))^n)*(2-(5-2*sqrt(6))^(1+n)-(5+2*sqrt(6))^(1+n)))/(4*sqrt(2)). - Gerry Martens, Jun 04 2015
2*a(n) = 1+A054320(n-1). - R. J. Mathar, Feb 07 2022

A350090 a(n) is the number of indices i in the range 0 <= i <= n-1 such that A003215(n) - A003215(i) is an oblong number (A002378), where A003215 are the hex numbers.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 2, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 3, 3, 3, 3, 5, 1, 1, 1, 5, 1, 1, 3, 1, 3, 1, 7, 1, 3, 3, 1, 1, 3, 7, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 7, 1, 3, 7, 1, 7, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 7, 5, 3, 3, 1, 5, 3, 3, 7, 3, 1, 1, 3, 3, 3, 7, 1, 3, 1, 3, 1
Offset: 0

Views

Author

Klaus Purath and Michel Marcus, Dec 14 2021

Keywords

Comments

There are very few even terms in the data (3 up to 10000). They are obtained for indices coming from A001921. For odd terms see A350120.
a(n) = 1 for n in A111251.

Examples

			For n=5, the 5 numbers hex(5)-hex(i), for i=0 to 4, are (90, 84, 72, 54, 30) out of which 90, 72 and 30 are oblong, so a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    obQ[n_] := IntegerQ @ Sqrt[4*n + 1]; hex[n_] := 3*n*(n + 1) + 1; a[n_] := Module[{h = hex[n]}, Count[Range[0, n - 1], ?(obQ[h - hex[#]] &)]]; Array[a, 100, 0] (* _Amiram Eldar, Dec 14 2021 *)
  • PARI
    hex(n) = 3*n*(n+1)+1; \\ A003215
    isob(n) = my(m=sqrtint(n)); m*(m+1)==n; \\ A002378
    a(n) = my(h=hex(n)); sum(k=0, n-1, isob(h - hex(k)));
    
  • PARI
    a(n) = numdiv(3*n*n + 3*n + 1) - 1; \\ Jinyuan Wang, Dec 19 2021

Formula

a(n) = A000005(A003215(n)) - 1. - Jinyuan Wang, Dec 19 2021

Extensions

Edited by N. J. A. Sloane, Dec 25 2021

A006244 Hexagonal numbers (A000384) which are also centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 91, 8911, 873181, 85562821, 8384283271, 821574197731, 80505887094361, 7888755361049641, 773017519495770451, 75747828155224454551, 7422514141692500775541, 727330638057709851548461, 71270980015513872950973631, 6983828710882301839343867371, 684343942686450066382748028721
Offset: 1

Views

Author

Keywords

Comments

Equivalently, triangular hex numbers.

Examples

			a(1)=91 because 91 is the sixth centered hexagonal number and the seventh hexagonal number.
		

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 19.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    CP := n -> 1+1/2*6*(n^2-n): N:=10: u:=5: v:=1: x:=6: y:=1: k_pcp:=[1]: for i from 1 to N do tempx:=x; tempy:=y; x:=tempx*u+24*tempy*v: y:=tempx*v+tempy*u: s:=(y+1)/2: k_pcp:=[op(k_pcp),CP(s)]: end do: k_pcp; # Steven Schlicker, Apr 24 2007
    A006244:=-(1-8*z+z**2)/(z-1)/(z**2-98*z+1); # Conjectured (correctly) by Simon Plouffe in his 1992 dissertation.
    a := n -> (Matrix([[91,1,1]]). Matrix([[99,1,0],[ -99,0,1],[1,0,0]])^n)[1,3]; seq (a(n), n=1..20); # Alois P. Heinz, Aug 14 2008
  • Mathematica
    CoefficientList[Series[(1 - 8*x + x^2)/(1 - 99*x + 99*x^2 - x^3), {x, 0, 20}], x] (* Jean-François Alcover, Feb 26 2015 *)
  • PARI
    Vec(-x*(x^2-8*x+1)/((x-1)*(x^2-98*x+1)) + O(x^100)) \\ Colin Barker, Jan 08 2015

Formula

From Richard Choulet, Sep 19 2007: (Start)
We must solve 2*r^2-r=3*p^2-3*p+1, which gives X^2=6*Y^2+3 with X=4*r-1 and Y=2*p-1. We obtain at the same time the following sequences:
X is given by 3, 27, 267, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2-18)^0.5
Y is given by 1, 11, 109, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2+3)^0.5
p is given by 1, 6, 55, 540, ... sequence for which a(n+2)=10*a(n+1)-a(n)-4 and a(n+1)=5*a(n)-2+(24*a(n)^2-24*a(n)+9)^0.5
r is given by 1, 7, 67, 661, ... sequence for which a(n+2)=10*a(n+1)-a(n)-2 and a(n+1)=5*a(n)-1+(24*a(n)^2-12*a(n)-3)^0.5
a(n+2) = 98*a(n+1)-a(n)-6, a(n+1)=49*a(n)-3+5*(96*a(n)^2-12*a(n)-3)^0.5.
G.f.: z*(1-8*z+z^2)/((1-z)*(1-98*z+z^2)). (End)
Define x(n) + y(n)*sqrt(24) = (6+sqrt(24))*(5+sqrt(24))^n, s(n) = (y(n)+1)/2; then a(n) = (1/2)*(2+6*(s(n)^2-s(n))). - Steven Schlicker, Apr 24 2007
a(n) = (A007667(n+1)-1)/4. - Ralf Stephan, Mar 03 2004
a(n) = 99*a(n-1)-99*a(n-2)+a(n-3). - Colin Barker, Jan 08 2015

Extensions

Edited by N. J. A. Sloane, Sep 25 2007
More terms from Alois P. Heinz, Aug 14 2008
More terms from Jon E. Schoenfield, Dec 26 2008

A133141 Numbers which are both centered pentagonal (A005891) and centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 331, 159391, 76825981, 37029963301, 17848365484951, 8602875133782931, 4146567966117887641, 1998637156793688059881, 963338963006591526974851, 464327381532020322313818151, 223804834559470788763733373781
Offset: 1

Views

Author

Richard Choulet, Sep 21 2007

Keywords

Comments

The problem is to find p and r such that 6*(2*p-1)^2 = 5*(2*r+1)^2 + 1 equivalent to 3*p^2 - 3*p + 1 = (5*r^2 + 5*r + 2)/2. The Diophantine equation (6*X)^2 = 30*Y^2 + 6 is such that
X is given by 1, 21, 461, 10121, ... with a(n+2) = 22*a(n+1) - a(n) and also a(n+1) = 11*a(n) + sqrt(120*a(n)^2 - 20);
Y is given by 1, 23, 805, 11087, ... with a(n+2) = 22*a(n+1) - a(n) and also a(n+1) = 11*a(n) + sqrt(120*a(n)^2+24);
r is given by 0, 11, 252, 5543, 121704, ... with a(n+2) = 22*a(n+1) - a(n) + 10 and also a(n+1) = 11*a(n) + 5 + sqrt(120*a(n)^2 + 120*a(n) + 36);
p is given by 1, 11, 231, 5061, ... with a(n+2) = 22*a(n+1) - a(n) - 10 and also a(n+1) = 11*a(n) - 5 + sqrt(120*a(n)^2 - 120*a(n) + 25).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{483,-483,1},{1,331,159391},20] (* Paolo Xausa, Jan 07 2024 *)
  • PARI
    Vec(-x*(x^2-152*x+1)/((x-1)*(x^2-482*x+1)) + O(x^100)) \\ Colin Barker, Feb 07 2015

Formula

a(n+2) = 482*a(n+1) - a(n) - 150.
a(n+1) = 241*a(n) - 75 + 11*sqrt(480*a(n)^2 - 300*a(n) + 45).
G.f.: z*(1-152*z+z^2)/((1-z)*(1-482*z+z^2)).

Extensions

More terms from Paolo P. Lava, Sep 26 2008

A253457 Indices of centered hexagonal numbers (A003215) which are also centered heptagonal numbers (A069099).

Original entry on oeis.org

1, 14, 351, 9100, 236237, 6133050, 159223051, 4133666264, 107316099801, 2786084928550, 72330892042487, 1877817108176100, 48750913920536101, 1265645944825762514, 32858043651549289251, 853043488995455758000, 22146272670230300418737, 574950045936992355129150
Offset: 1

Views

Author

Colin Barker, Jan 01 2015

Keywords

Comments

Also positive integers x in the solutions to 6*x^2 - 7*y^2 - 6*x + 7*y = 0, the corresponding values of y being A253458.

Examples

			14 is in the sequence because the 14th centered hexagonal number is 547, which is also the 13th centered heptagonal number.
		

Crossrefs

Programs

  • PARI
    Vec(x*(13*x-1)/((x-1)*(x^2-26*x+1)) + O(x^100))

Formula

a(n) = 27*a(n-1)-27*a(n-2)+a(n-3).
G.f.: x*(13*x-1) / ((x-1)*(x^2-26*x+1)).
a(n) = sqrt((-2-(13-2*sqrt(42))^n-(13+2*sqrt(42))^n)*(2-(13-2*sqrt(42))^(1+n)-(13+2*sqrt(42))^(1+n)))/(4*sqrt(6)). - Gerry Martens, Jun 04 2015

A253458 Indices of centered heptagonal numbers (A069099) which are also centered hexagonal numbers (A003215).

Original entry on oeis.org

1, 13, 325, 8425, 218713, 5678101, 147411901, 3827031313, 99355402225, 2579413426525, 66965393687413, 1738520822446201, 45134575989913801, 1171760454915312613, 30420637251808214125, 789764808092098254625, 20503464373142746406113, 532300308893619308304301
Offset: 1

Views

Author

Colin Barker, Jan 01 2015

Keywords

Comments

Also positive integers y in the solutions to 6*x^2 - 7*y^2 - 6*x + 7*y = 0, the corresponding values of x being A253457.

Examples

			13 is in the sequence because the 13th centered heptagonal number is 547, which is also the 14th centered hexagonal number.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{27,-27,1},{1,13,325},20] (* Harvey P. Dale, Oct 13 2022 *)
  • PARI
    Vec(-x*(x^2-14*x+1)/((x-1)*(x^2-26*x+1)) + O(x^100))

Formula

a(n) = 27*a(n-1)-27*a(n-2)+a(n-3).
G.f.: -x*(x^2-14*x+1) / ((x-1)*(x^2-26*x+1)).
a(n) = 1/2+(13+2*sqrt(42))^(-n)*(7+sqrt(42)-(-7+sqrt(42))*(13+2*sqrt(42))^(2*n))/28. - Colin Barker, Mar 03 2016

A253546 Centered hexagonal numbers (A003215) which are also centered heptagonal numbers (A069099).

Original entry on oeis.org

1, 547, 368551, 248402701, 167423051797, 112842888508351, 76055939431576651, 51261590333994154297, 34550235829172628419401, 23286807687272017560521851, 15695273830985510663163308047, 10578591275276546914954509101701, 7129954824262561635168675971238301
Offset: 1

Views

Author

Colin Barker, Jan 03 2015

Keywords

Examples

			547 is in the sequence because it is the 14th centered hexagonal number and the 13th centered heptagonal number.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{675,-675,1},{1,547,368551},20] (* Harvey P. Dale, Aug 03 2021 *)
  • PARI
    Vec(-x*(x^2-128*x+1) / ((x-1)*(x^2-674*x+1)) + O(x^100))

Formula

a(n) = 675*a(n-1)-675*a(n-2)+a(n-3).
G.f.: -x*(x^2-128*x+1) / ((x-1)*(x^2-674*x+1)).
Showing 1-10 of 286 results. Next