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.

Previous Showing 31-40 of 69 results. Next

A075114 Perfect powers n such that 2n + 1 is a perfect power; the value of y^b in the solution of the Diophantine equation x^a - 2y^b = 1.

Original entry on oeis.org

4, 121, 144, 4900, 166464, 5654884, 192099600, 6525731524, 221682772224, 7530688524100, 255821727047184, 8690408031080164, 295218051329678400, 10028723337177985444, 340681375412721826704
Offset: 1

Views

Author

Zak Seidov, Oct 11 2002

Keywords

Comments

Note that the first ten numbers in this sequence are all squares. Except for 121, these squares are the y^2 in the Pell equation x^2 - 2y^2 = 1, whose solutions (x,y) are in sequences A001541 and A001542. The equation x^a - 2y^b = 1 is very similar to Catalan's equation x^a - y^b = 1, which has only one solution. Bennett shows that the equation x^2 - 2y^b = 1 has no solutions for b>2. Hence all the terms in this sequence are squares and solutions other than the Pell solutions must satisfy x^a - 2y^2 = 1 for a>2. The one known solution is 3^5 - 2*11^2 = 1. Are there any others? - T. D. Noe, Mar 29 2006

Crossrefs

Cf. A001597.
Cf. A117547 (square root of terms).

Programs

  • Mathematica
    pp = Select[ Range[10^8], Apply[ GCD, Last[ Transpose[ FactorInteger[ # ]]]] > 1 & ]; Select[pp, Apply[GCD, Last[ Transpose[ FactorInteger[2# + 1]]]] > 1 & ]
    lim=10^14; lst={}; k=2; While[n=Floor[lim^(1/k)]; n>1, lst=Join[lst,Range[2,n]^k]; k++ ]; lst=Union[lst]; Intersection[lst,(lst-1)/2] (*T. D. Noe, Mar 29 2006 *)

Formula

Empirical G.f.: x*(117*x^4-4091*x^3+3951*x^2+19*x-4) / ((x-1)*(x^2-34*x+1)). - Colin Barker, Dec 21 2012

Extensions

Extended by Robert G. Wilson v, Oct 15 2002
More terms from T. D. Noe, Mar 29 2006
More terms from T. D. Noe, Nov 19 2006

A120861 Fixed-k dispersion for Q = 8: Square array D(g,h) (g, h >= 1), read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 7, 3, 12, 41, 4, 19, 70, 239, 5, 24, 111, 408, 1393, 6, 31, 140, 647, 2378, 8119, 8, 36, 181, 816, 3771, 13860, 47321, 9, 48, 210, 1055, 4756, 21979, 80782, 275807, 10, 53, 280, 1224, 6149, 27720, 128103, 470832, 1607521, 11, 60, 309, 1632, 7134
Offset: 1

Views

Author

Clark Kimberling, Jul 09 2006

Keywords

Comments

For each positive integer n, there exists a unique pair (j,k) of positive integers such that (j + k + 1)^2 - 4*k = 8*n^2; in fact, j(n) = A087056(n) and k(n) = A087059(n).
Suppose g >= 1 and let k = k(g). The numbers in row g of array D are among those n for which (j + k + 1)^2 - 4*k = 8*n^2 for some j; that is, k stays fixed and j and n vary - hence the name "fixed-k dispersion". (The fixed-j dispersion for Q = 8 is A120860.)
Every positive integer occurs exactly once in array D and every pair of rows are mutually interspersed. That is, beginning at the first term of any row having greater initial term than that of another row, all the following terms individually separate the individual terms of the other row.

Examples

			Northwest corner:
  1,  7,  41,  239, 1393,  8119,  47321, ...
  2, 12,  70,  408, 2378, 13860,  80782, ...
  3, 19, 111,  647, 3771, 21979, 128103, ...
  4, 24, 140,  816, 4756, 27720, 161564, ...
  5, 31, 181, 1055, 6149, 35839, 208885, ...
  6, 36, 210, 1224, 7134, 41580, 242346, ...
... [Edited by _Petros Hadjicostas_, Jul 07 2020]
		

Crossrefs

Cf. A087056, A087059, A120858, A120859, A120860, A120862, A120863, A336109 (first column), A002315 (first row), A001542 (2nd row), A253811 (3rd row).

Programs

  • PARI
    f(n) = 3*n + 2*sqrtint(2*n^2) + 2;
    unused(listus) = {my(v=vecsort(Vec(listus))); for (i=1, vecmax(v), if (!vecsearch(v, i), return (i)););};
    D(nb) = {my(m = matrix(nb, nb), t); my(listus = List); for (g=1, nb, if (g==1, t = 1, t = unused(listus)); m[g,1]=t; listput(listus, t); t = f(t); m[g,2]=t; listput(listus, t); for (h=3, nb, t = 6*m[g,h-1] - m[g,h-2]; m[g, h] = t; listput(listus, t););); m;}; \\ Michel Marcus, Jul 08 2020

Formula

Define f(n) = 3*n + 2*floor(n*sqrt(2)) + 2. Let D(g,h) be the term in row g and column h of the array to be defined:
D(1,1) = 1; D(1,2) = f(1); and D(1,h) = 6*D(1,h-1) - D(1,h-2) for h >= 3.
For arbitrary g >= 1, once row g is defined, define D(g+1,1) = least positive integer not in rows 1,2,...,g; D(g+1,2) = f(D(g+1,1)); and D(g+1,h) = 6*D(g+1,h-1) - D(g+1,h-2) for h >= 3. All rows after row 1 are thus inductively defined. [Corrected by Petros Hadjicostas, Jul 07 2020]

Extensions

Name edited by Petros Hadjicostas, Jul 07 2020

A182189 a(n) = 6*a(n-1) - a(n-2) - 4 with n > 1, a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 13, 71, 409, 2379, 13861, 80783, 470833, 2744211, 15994429, 93222359, 543339721, 3166815963, 18457556053, 107578520351, 627013566049, 3654502875939, 21300003689581, 124145519261543, 723573111879673, 4217293152016491, 24580185800219269, 143263821649299119
Offset: 0

Views

Author

Kenneth J Ramsey, Apr 17 2012

Keywords

Comments

If p is a prime of the form 8*n +- 1 then a(p) == 3 (mod p); if p is a prime of the form 8*n +- 3 then a(p) == -1 (mod p).
The terms a(n) > 1 satisfy a(n)^5 + b(n)^5 = c(n)^5 + d(n)^5 where b(n) = a(n) - 2, c(n) = (a(n)-1) + i*ceiling((a(n)-1)*sqrt(2)), and d(n) is the conjugate of c(n), where i is the imaginary unit. Note that Re(c(n)) is A001542(n) and Im(d(n)) is A001541(n). - Pedro Caceres, Dec 30 2017

Crossrefs

Programs

  • Magma
    I:=[1,3]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2)-4: n in [1..41]]; // Bruno Berselli, Jun 07 2012
    
  • Mathematica
    m = -11;n = -1; c = 0;
    list3 = Reap[While[c < 22, t = 6 n - m - 4; Sow[t];m = n; n = t;c++]][[2,1]]
    CoefficientList[Series[(1-4*x-x^2)/((1-x)*(1-6*x+x^2)),{x,0,40}],x] (* Vincenzo Librandi, Jul 26 2012 *)
    1 + Fibonacci[2*Range[0, 40], 2] (* G. C. Greubel, May 24 2021 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-4*x-x^2)/((1-x)*(1-6*x+x^2))) \\ Altug Alkan, Dec 30 2017
    
  • Sage
    [1 + lucas_number1(2*n,2,-1) for n in (0..40)] # G. C. Greubel, May 24 2021

Formula

G.f.: (1-4*x-x^2)/((1-x)*(1-6*x+x^2)). - Bruno Berselli, Jun 07 2012
a(n) = 1 + A000129(2*n). - G. C. Greubel, May 24 2021

A098602 a(n) = A001652(n) * A046090(n).

Original entry on oeis.org

0, 12, 420, 14280, 485112, 16479540, 559819260, 19017375312, 646030941360, 21946034630940, 745519146510612, 25325704946729880, 860328449042305320, 29225841562491651012, 992818284675673829100, 33726595837410418538400, 1145711440187278556476512
Offset: 0

Views

Author

Charlie Marion, Oct 26 2004

Keywords

Comments

From Ron Knott, Nov 25 2013: (Start)
a(n) = 2*r*(r+1) which is also of form s(s+1) where the s is in A053141.
a(n) is an oblong number (A002378) which is twice another oblong number. (End)
2*a(n)+1 and 4*a(n)+1 are both square. - Paul Cleary, Jun 23 2014

Examples

			a(1) = 12 = 2(2*3) = 3*4, a(2) = 420 = 2(14*15) = 20*21.
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(12*x/((1-x)*(x^2-34*x+1)))); // G. C. Greubel, Jul 15 2018
  • Mathematica
    2*Table[ Floor[(Sqrt[2] + 1)^(4n + 2)/32], {n, 0, 20} ] (* Ray Chandler, Nov 10 2004, copied incorrect program from A029549, revised Jul 09 2015 *)
    RecurrenceTable[{a[n+3] == 35 a[n+2] - 35 a[n+1] + a[n], a[1] == 0, a[2] == 12, a[3] == 420}, a, {n, 1, 10}] (* Ron Knott, Nov 25 2013 *)
    LinearRecurrence[{35, -35, 1}, {0, 12, 420}, 25] (* T. D. Noe, Nov 25 2013 *)
    Table[(LucasL[4*n+2, 2] - 6)/16, {n,0,30}] (* G. C. Greubel, Jul 15 2018 *)
  • PARI
    concat(0, Vec(12*x/((1-x)*(1-34*x+x^2)) + O(x^20))) \\ Colin Barker, Mar 02 2016
    
  • PARI
    {a=1+sqrt(2); b=1-sqrt(2); Q(n) = a^n + b^n};
    for(n=0, 30, print1(round((Q(4*n+2) - 6)/16), ", ")) \\ G. C. Greubel, Jul 15 2018
    

Formula

a(n) = 2*A029549(n) = 2*A001109(n)*A001109(n+1).
a(n) = (A001653(n)^2 - 1)/2.
a(n) = A053141(n)^2 + A011900(n)^2 - 1.
For n>0, a(n) = A053141(2n) - 2*A001109(n-1)^2.
For n>0, a(n) = 3*(A001542(n)^2 - A001542(n-1)^2).
For n>0, a(n) = A053141(2n-1) + 2*(A001653(2n-1) - A001109(n-1)^2).
a(n+1) + a(n) = 3*A001542(n+1)^2.
a(n+1) - a(n) = A001542(2*n).
a(n+1)*a(n) = 4*(A001109(n)^4 - A001109(n)^2) = 4*A001110(n)*(A001110(n) - 1).
From Ron Knott, Nov 25 2013: (Start)
a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3).
G.f.: 12*x / ((1-x)*(x^2-34*x+1)). (End)
a(n) = (-6 + (3-2*sqrt(2))*(17+12*sqrt(2))^(-n)+(3+2*sqrt(2))*(17+12*sqrt(2))^n)/16. - Colin Barker, Mar 02 2016

Extensions

More terms from Ray Chandler, Nov 10 2004
Corrected by Bill Lam (bill_lam(AT)myrealbox.com), Feb 27 2006

A228564 Largest odd divisor of n^2 + 1.

Original entry on oeis.org

1, 1, 5, 5, 17, 13, 37, 25, 65, 41, 101, 61, 145, 85, 197, 113, 257, 145, 325, 181, 401, 221, 485, 265, 577, 313, 677, 365, 785, 421, 901, 481, 1025, 545, 1157, 613, 1297, 685, 1445, 761, 1601, 841, 1765, 925, 1937, 1013, 2117, 1105, 2305, 1201, 2501, 1301, 2705
Offset: 0

Views

Author

Jeremy Gardiner, Aug 25 2013

Keywords

Comments

From Lamine Ngom, Jan 04 2023: (Start)
For n>2, a(n) = hypotenuse c of the primitive Pythagorean triple (a, b, c) such that n*a = b + c.
Terms that appear twice (1, 5, 145, 4901, ...) are the positive terms of A076218. Equivalently, the products of two consecutive terms of A001653, or one more than the squares of A001542.
These duplicated terms appear at indices i and j (i>j) such that (i^2-1)/2 = j^2 (A001541). In addition, they are hypotenuse in two primitive Pythagorean triples: (i, j^2, a(i)) and (2*j, j^2-1, a(i)). (End)

Examples

			A002522(3) = 3^2+1 = 10 => a(3) = 10/2 = 5.
		

Crossrefs

Programs

  • BASIC
    for n = 0 to 45 : t=n^2+1
    x: if not t mod 2 then t=t/2 : goto x
    print str$(t);", "; : next n
    print
    end
    
  • GAP
    List([0..60],n->NumeratorRat((n^2+1)/(n+1))); # Muniru A Asiru, Feb 20 2019
    
  • Magma
    [(n^2+1)*(3+(-1)^n)/4: n in [0..60]]; // Bruno Berselli, Aug 26 2013
    
  • Magma
    [Denominator(2*n^2/(n^2+1)): n in [0..60]]; // Vincenzo Librandi, Aug 19 2014
    
  • Maple
    lod:= t -> t/2^padic:-ordp(t,2):
    seq(lod(n^2+1),n=0..60); # Robert Israel, Aug 19 2014
  • Mathematica
    Table[(n^2 + 1) (3 + (-1)^n)/4, {n, 0, 60}] (* Bruno Berselli, Aug 26 2013 *)
  • PARI
    a(n)=if(n<2,n>0,m=n\4;[4*a(2*m)-3,2*a(2*m)+4*m-1,4*a(2*m)+16*m+1,2*a(2*m)+12*m+3][(n%4)+1]) \\ Ralf Stephan, Aug 26 2013
    
  • PARI
    a(n)=(n^2+1)/2^valuation(n^2+1,2) \\ Ralf Stephan, Aug 26 2013
    
  • Sage
    [(n^2+1)*(3+(-1)^n)/4 for n in (0..60)] # G. C. Greubel, Feb 20 2019

Formula

a(n) = A000265(A002522(n)).
From Ralf Stephan, Aug 26 2013: (Start)
a(4n) = 4*a(2n) - 3.
a(4n+1) = 2*a(2n) + 4*n - 1.
a(4n+2) = 4*a(2n) + 16*n + 1.
a(4n+3) = 2*a(2n) + 12*n + 3. (End)
From Bruno Berselli, Aug 26 2013: (Start)
G.f.: (1 + x + 2*x^2 + 2*x^3 + 5*x^4 + x^5) / (1-x^2)^3.
a(n) = 3*a(n-2) -3*a(n-4) +a(n-6).
a(n) = (n^2+1)*(3+(-1)^n)/4. (End)
From Peter Bala, Feb 14 2019: (Start)
a(n) = numerator((n^2 + 1)/(n + 1)).
a(n) is a quasi-polynomial in n: a(2*n) = 4*n^2 + 1; a(2*n + 1) = 2*n^2 + 2*n + 1. (End)
From Amiram Eldar, Aug 09 2022: (Start)
a(n) = numerator((n^2+1)/2).
Sum_{n>=0} 1/a(n) = (1 + coth(Pi/2)*Pi/2 + tanh(Pi/2)*Pi)/2. (End)
E.g.f.: ((2 + x + 2*x^2)*cosh(x) + (1 + x)^2*sinh(x))/2. - Stefano Spezia, Aug 04 2025

A082639 Numbers k such that 2*k*(k+2) is a square.

Original entry on oeis.org

0, 2, 16, 98, 576, 3362, 19600, 114242, 665856, 3880898, 22619536, 131836322, 768398400, 4478554082, 26102926096, 152139002498, 886731088896, 5168247530882, 30122754096400, 175568277047522, 1023286908188736
Offset: 1

Views

Author

James R. Buddenhagen, May 15 2003

Keywords

Comments

Even-indexed terms are squares. Their square roots form sequence A005319. Odd-indexed terms divided by 2 are squares. Their square roots form the sequence A002315. (Index starts at 0.)
Lower of two terms with difference 2 in A088827. - Ophir Spector, Nov 06 2024

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 2; a[n_] := a[n] = 6a[n - 1] - a[n - 2] + 4; Table[ a[n], {n, 0, 20}]
    LinearRecurrence[{7,-7,1},{0,2,16},30] (* Harvey P. Dale, Nov 21 2015 *)

Formula

a(n) = A001541(n) - 1.
a(n) = (1/2)*(s^n + t^n) - 1, where s = 3 + 2*sqrt(2), t = 3 - 2*sqrt(2). Note: s=1/t. a(n) = 6*a(n-1) - a(n-2) + 4, a(0)=0, a(1)=2.
a(n) = 1/kappa(sqrt(2)/A001542(n)); a(n) = 1/kappa(sqrt(8)/A005319(n)) where kappa(x) is the sum of successive remainders by computing the Euclidean algorithm for (1, x). - Thomas Baruchel, Nov 29 2003
G.f.: -2*x^2*(x+1)/((x-1)*(x^2-6*x+1)). - Colin Barker, Nov 22 2012

Extensions

More terms from Robert G. Wilson v, May 15 2003

A125651 Numbers k such that A125650(k) is a perfect square.

Original entry on oeis.org

1, 3, 24, 147, 864, 5043, 29400, 171363, 998784, 5821347, 33929304, 197754483, 1152597600, 6717831123, 39154389144, 228208503747, 1330096633344, 7752371296323, 45184131144600, 263352415571283, 1534930362283104, 8946229758127347, 52142448186480984
Offset: 1

Views

Author

Alexander Adamchuk, Nov 29 2006

Keywords

Comments

Corresponding numbers m such that m^2 = A125650(a(n)) are listed in A125652.
3 divides a(n) for n>1. For n>1 a(n) = 3*A001108(n-1), where A001108(k) = {0, 1, 8, 49, 288, 1681, ...}, A001108(k)-th triangular number is a square. - Alexander Adamchuk, Jan 19 2007
Disregarding the term 1, numbers k such that A071910(k) is a nonzero square; i.e., numbers k such that A000096(k) = k*(k+3)/2 is a nonzero square. - Rick L. Shepherd, Jul 13 2012

Examples

			a(2)=3 because A125650(3)=9=3^2; a(3)=24 because A125650(24)=81=9^2.
		

Crossrefs

Programs

  • Magma
    I:=[1, 3, 24, 147]; [n le 4 select I[n] else 7*Self(n-1)-7*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, May 21 2012
  • Mathematica
    Join[{1},LinearRecurrence[{7,-7,1},{3,24,147},35]] (* or *) CoefficientList[Series[(-1+x(4+(-10+x)x))/((-1+x)(1+(-6+x) x)),{x,0,35}],x] (* Harvey P. Dale, May 15 2011 *)

Formula

For n>1, a(n+2) = 6*a(n+1) - a(n) + 6.
For n>1, a(n) = ((3+2*sqrt(2))^(n-1) + (3-2*sqrt(2))^(n-1))*3/4 - 3/2.
For n>0, a(2*n) = 3*A002315(n-1)^2; a(2*n+1) = 6*A001542(n)^2.
a(n) = 3*A001108(n-1) for n>1. - Alexander Adamchuk, Jan 19 2007
From Harvey P. Dale, May 15 2011: (Start)
For n>1, a(2)=3, a(3)=24, a(4)=147, a(n) = 7*a(n-1)-7*a(n-2)+a(n-3).
G.f.: x*(-1+x*(4+(-10+x)*x))/((-1+x)*(1+(-6+x)*x)). (End)

Extensions

Edited by Max Alekseyev, Jan 11 2007

A202299 y-values in the solution to x^2 - 18*y^2 = 1.

Original entry on oeis.org

0, 4, 136, 4620, 156944, 5331476, 181113240, 6152518684, 209004522016, 7100001229860, 241191037293224, 8193395266739756, 278334248031858480, 9455171037816448564, 321197481037727392696, 10911259184244914903100
Offset: 1

Views

Author

Vincenzo Librandi, Dec 18 2011

Keywords

Comments

The corresponding values of x of this Pell equation are in A056771.

Crossrefs

Programs

  • Magma
    I:=[0, 4]; [n le 2 select I[n] else 34*Self(n-1)-Self(n-2): n in [1..20]];
    
  • Mathematica
    LinearRecurrence[{34,-1},{0,4},30]
    With[{c=6*Sqrt[2]},Table[((17-2c)^n-(17+2c)^n)/-c,{n,0,20}]]//Simplify (* Harvey P. Dale, Dec 16 2024 *)
  • Maxima
    makelist(expand(((3+2*sqrt(2))^(2*n-2)-(3-2*sqrt(2))^(2*n-2))/(6*sqrt(2))), n, 1, 16); /* _Bruno Berselli, Dec 19 2011 */

Formula

a(n) = 34*a(n-1)-a(n-2) with a(1)=0, a(2)=4.
G.f.: 4*x^2/(1-34*x+x^2).
a(n) = (1/3)*A001542(2n-2). - Bruno Berselli, Dec 19 2011

A215936 a(n) = -2*a(n-1) + a(n-2) for n > 2, with a(0) = a(1) = 1, a(2) = 0.

Original entry on oeis.org

1, 1, 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149
Offset: 0

Views

Author

Michael Somos, Aug 28 2012

Keywords

Comments

BINOMIAL transform is A052955.
Essentially the same as A000129, A069306, A048624, A215928, A077985, and A176981. - R. J. Mathar, Sep 08 2013

Examples

			G.f. = 1 + x + x^3 - 2*x^4 + 5*x^5 - 12*x^6 + 29*x^7 - 70*x^8 + 169*x^9 - 408*x^10 + ...
		

Crossrefs

Programs

  • Magma
    [1,1] cat [n le 2 select (n-1) else -2*Self(n-1)+Self(n-2): n in [1..35] ]; // Vincenzo Librandi, Sep 09 2013
  • Mathematica
    CoefficientList[Series[(1 + 3 x + x^2)/(1 + 2 x - x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 09 2013 *)
    a[ n_] := With[ {m = If[ n < 1, 1 - n, n], s = If[ n < 1, (-1)^n, 1]}, s SeriesCoefficient[ x (1 + 2 x) / (1 + 2 x - x^2), {x, 0, m}]]; (* Michael Somos, Mar 19 2019 *)
  • PARI
    {a(n) = my(m=n, s=1); if(n<1, m=1-n; s=(-1)^n); s * polcoeff( x * (1 + 2*x) / (1 + 2*x - x^2) + x * O(x^m), m)}; /* Michael Somos, Mar 19 2019 */
    

Formula

G.f.: 1 / (1 - x / (1 + x / (1 + x / (1 + x)))) = (1 + 3*x + x^2) / (1 + 2*x - x^2).
a(n + 3) = A077985(n). a(n) * a(n+2) - a(n+1)^2 = -(-1)^n.
a(2*n + 1) = A001653(n). a(2*n + 2) = -A001542(n).
a(n) = Sum_{k=0..n} A147746(n,k)*(-1)^(n-k). - Philippe Deléham, Aug 30 2012
G.f.: 1 + x + x^2/(1-x) - G(0)*x^2 /(2-2*x), where G(k)= 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
a(n) = (-1)^n a(1-n) = A000129(-1-n) if n < 0. a(n-2) = 2*a(n-1) + a(n) if n<1 or n>2. - Michael Somos, Mar 19 2019
E.g.f.: exp(-x)*(4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x))/2 - 1. - Stefano Spezia, Oct 31 2024

A220185 Numbers n such that n^2 + n(n+1) is an oblong number (A002378).

Original entry on oeis.org

0, 10, 348, 11830, 401880, 13652098, 463769460, 15754509550, 535189555248, 18180690368890, 617608282987020, 20980500931189798, 712719423377466120, 24211479893902658290, 822477596969312915748, 27940026817062736477150, 949138434183163727307360
Offset: 1

Views

Author

Alex Ratushnyak, Apr 12 2013

Keywords

Comments

Also numbers n such that the sum of the hexagonal numbers H(n) and H(n+1) is equal to m^2 + (m+1)^2 for some m. - Colin Barker, Dec 10 2014
Also nonnegative integers x in the solutions to 4*x^2-2*y^2+2*x-2*y = 0, the corresponding values of y being A251867. - Colin Barker, Dec 10 2014

Examples

			a(3) = A089928(7) = 348.
		

Crossrefs

Cf. A002378, A014105 (n^2 + n(n+1)), A029546, A084703 (numbers n such that n^2 + n(n+1) is a square).

Programs

  • C
    #include 
    #include 
    typedef unsigned long long U64;
    U64 rootPronic(U64 a) {
        U64 sr = 1L<<31, s, b;
        if (a < sr*(sr+1)) {
              sr>>=1;
              while (a < sr*(sr+1))  sr>>=1;
        }
        for (b = sr>>1; b; b>>=1) {
                s = sr+b;
                if (a >= s*(s+1))  sr = s;
        }
        return sr;
    }
    int main() {
      U64 a, n, r, t;
      for (n=0; n < (1L<<31); n++) {
        a = (n*(n+1)) + n*n;
        t = rootPronic(a);
        if (a == t*(t+1))  printf("%llu\n", n);
      }
    }
    
  • Magma
    [Floor(((1+Sqrt(2))^(4*n-3)+(1-Sqrt(2))^(4*n-3)-2)/8): n in [1..20]]; // Vincenzo Librandi, Sep 08 2015
  • Maple
    f:= gfun:-rectoproc({a(n)=35*(a(n-1)-a(n-2))+a(n-3),a(1)=0,a(2)=10,a(3)=348},a(n),remember):
    map(f, [$1..50]); # Robert Israel, Sep 06 2015
  • Mathematica
    LinearRecurrence[{35, - 35, 1}, {0, 10, 348}, 20] (* Vincenzo Librandi, Sep 06 2015 *)
  • PARI
    concat(0, Vec(2*x^2*(5-x)/((1-x)*(1-34*x+x^2))+O(x^100))) \\ Colin Barker, Dec 10 2014
    

Formula

For n>1, a(n) = A089928(n*4-5).
From Bruno Berselli, Apr 12 2013: (Start)
G.f.: 2*x^2*(5-x)/((1-x)*(1-34*x+x^2)).
a(n) = ((1+sqrt(2))^(4n-3)+(1-sqrt(2))^(4n-3)-2)/8.
a(n+2) = 10*A029546(n)-2*A029546(n-1). (End)
a(n) = 35*a(n-1)-35*a(n-2)+a(n-3). - Colin Barker, Dec 10 2014
a(n) = A251867(n) - A001542(n-1)^2. - Alexander Samokrutov, Sep 05 2015

Extensions

More terms from Bruno Berselli, Apr 12 2013
Previous Showing 31-40 of 69 results. Next