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

A011918 a(n) = A011916(n) + A011922(n) - 1.

Original entry on oeis.org

5, 76, 1065, 14840, 206701, 2878980, 40099025, 558507376, 7779004245, 108347552060, 1509086724601, 21018866592360, 292755045568445, 4077551771365876, 56792969753553825, 791024024778387680, 11017543377143873701, 153454583255235844140, 2137346622196157944265
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

Comments

Also integers n such that n^2+(n+1)^2 is equal to the sum of two consecutive octagonal numbers. - Colin Barker, Dec 20 2014

References

  • Mario Velucchi, "Seeing couples", Recreational and Educational Computing, to appear 1997. [apparently never materialized, Joerg Arndt, Aug 14 2013]

Crossrefs

Cf. A011916.

Programs

  • Mathematica
    CoefficientList[Series[-(5 + x) / ((x - 1) (x^2 - 14 x + 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 13 2013 *)
  • PARI
    Vec(-x*(5+x)/((x-1)*(x^2-14*x+1)) + O(x^100)) \\ Colin Barker, Dec 20 2014

Formula

a(n) = +15*a(n-1) -15*a(n-2) +a(n-3). G.f.: -x*(5+x)/ ((x-1) * (x^2-14*x+1)). - R. J. Mathar, Apr 15 2010
a(n) = (A007655(n+2) - 3*A007655(n+1) - 1)/2. - Ralf Stephan, Aug 13 2013
a(n) = (-6-(7-4*sqrt(3))^n*(-3+sqrt(3))+(3+sqrt(3))*(7+4*sqrt(3))^n)/12. - Colin Barker, Mar 05 2016

Extensions

More terms from R. J. Mathar, Apr 15 2010

A011920 a(n) = b(n)*(b(n)+1) = b(n) + ... + c(n), where b(n) = A011916(n), c(n) = A011918(n).

Original entry on oeis.org

12, 1980, 378840, 73419192, 14241916260, 2762844014580, 535977297450672, 103976830083273840, 20170969020163148220, 3913064012542622257452, 759114247456742016195720, 147264250942490855924510760
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

References

  • Mario Velucchi "Seeing couples" in Recreational and Educational Computing, to appear 1997.

Programs

  • Maple
    A011922 := proc(n) (2+sqrt(1+((((2+sqrt(3))^(2*n)-(2-sqrt(3))^(2*n))^2)/4)))/3 ; expand(%) ; simplify(%) ; end proc:
    A011916 := proc(n) ((A011922(n)-1)+sqrt(3*A011922(n)^2-4*A011922(n)+1))/2 ; end proc:
    A011920 := proc(n) A011916(n)*(A011916(n)+1) ; end proc:
    seq(A011920(n),n=1..20) ; # R. J. Mathar, Apr 15 2010
  • Mathematica
    LinearRecurrence[{209,-2926,2926,-209,1},{12,1980,378840,73419192,14241916260},20] (* Harvey P. Dale, Jan 01 2021 *)

Formula

From R. J. Mathar, Apr 15 2010: (Start)
a(n) = +209*a(n-1) -2926*a(n-2) +2926*a(n-3) -209*a(n-4) +a(n-5).
G.f.: -12*x*(1-44*x+11*x^2)/ ((x-1) * (x^2-14*x+1) * (x^2-194*x+1)). (End)

Extensions

More terms from R. J. Mathar, Apr 15 2010

A011922 a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3) with a(0)=1, a(1)=3, and a(2)=33.

Original entry on oeis.org

1, 3, 33, 451, 6273, 87363, 1216801, 16947843, 236052993, 3287794051, 45793063713, 637815097923, 8883618307201, 123732841202883, 1723376158533153, 24003533378261251, 334326091137124353, 4656561742541479683, 64857538304443591201, 903348974519668797123, 12582028104970919568513
Offset: 0

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

References

  • Mario Velucchi, Seeing couples, in Recreational and Educational Computing, to appear 1997.

Crossrefs

Programs

  • Magma
    I:=[1,3,33]; [n le 3 select I[n] else 15*Self(n-1)-15*Self(n-2)+Self(n-3): n in [1..17]]; // Bruno Berselli, Jul 09 2011
    
  • Maple
    a:= gfun:-rectoproc({a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3), a(0)=1,a(1)=3,a(2)=33},a(n),remember):
    map(a,[$0..100]); # Robert Israel, Jul 02 2015
  • Mathematica
    RecurrenceTable[{a[n] == 15 a[n - 1] - 15 a[n - 2] + a[n - 3], a[0] == 1, a[1] == 3, a[2] == 33}, a, {n, 0, 15}] (* Michael De Vlieger, Jul 02 2015 *)
    LinearRecurrence[{15,-15,1},{1,3,33},30] (* Harvey P. Dale, Dec 04 2018 *)
  • Maxima
    a[0]:1$ a[1]:3$ a[2]:33$ a[n]:=15*a[n-1]-15*a[n-2]+a[n-3]$ makelist(a[n], n, 0, 16); /* Bruno Berselli, Jul 09 2011 */
    
  • PARI
    a(n)=([0,1,0; 0,0,1; 1,-15,15]^n*[1;3;33])[1,1] \\ Charles R Greathouse IV, Jul 02 2015

Formula

a(n) = (2+sqrt(1+((((2+sqrt(3))^(2*n)-(2-sqrt(3))^(2*n))^2)/4)))/3. [corrected by Francisco Salinas (franciscodesalinas(AT)hotmail.com), Dec 30 2001]
a(n) = ((7+4*sqrt(3))^n+(7-4*sqrt(3))^n+4)/6. - Bruno Berselli, Jul 09 2011
G.f.: (1-12*x+3*x^2)/ ((1-x) * (x^2-14*x+1)). - R. J. Mathar, Apr 15 2010
Sqrt(3) = 1 + Sum_{n>=1} 2/a(n) = 1 + 2/3 + 2/33 + ... - Gary W. Adamson, Jun 12 2003
a(n)^2 = A103974(n+1)^2 - (4*A007655(n+1))^2. - Paul D. Hanna, Mar 06 2005
a(n) = (A011943(n+1) + 2)/3. - Ralf Stephan, Aug 13 2013
a(n) = A001075(n)^2 - A001353(n)^2. - Richard R. Forberg, Aug 24 2013
E.g.f.: exp(x)*(2 + exp(6*x)*cosh(4*sqrt(3)*x))/3. - Stefano Spezia, Dec 11 2022

Extensions

Recurrence in definition by R. J. Mathar, Apr 15 2010

A109437 a(-1) = a(0) = 0, a(1) = 1; a(n) = 5a(n-1) - 5a(n-2) + a(n-3) + 2*(-1)^(n+1), alternatively a(n) = 3a(n-1) + 3a(n-2) - a(n-3).

Original entry on oeis.org

0, 1, 3, 12, 44, 165, 615, 2296, 8568, 31977, 119339, 445380, 1662180, 6203341, 23151183, 86401392, 322454384, 1203416145, 4491210195, 16761424636, 62554488348, 233456528757, 871271626679, 3251629977960, 12135248285160, 45289363162681, 169022204365563, 630799454299572
Offset: 0

Views

Author

Creighton Dement, Jun 28 2005

Keywords

Comments

See A105968 for a similar sequence. Observe the four periodic sequences (1,1,1,1,); (-1,-1,-1,-1); (1,-1,1,-1,); (-1,1,-1,1,); (a(n)) is the (Type 1A) jbasejfor-transform of the periodic sequence (1,1,1,1) with respect to the floretion given in the program code. A109438 is the (Type 1A) jbasejfor-transform of the periodic sequence (-1,-1,-1,-1) with respect to the floretion given in the program code. A001834 is the (Type 1A) jbasejfor-transform of the periodic sequence (1,-1,1,-1) with respect to the floretion given in the program code. A102871 is the (Type 1A) jbasejfor-transform of the periodic sequence (-1,1,-1,1) with respect to the floretion given in the program code.
Floretion Algebra Multiplication Program, FAMP Code: (-1)^(n+1)jbasejfor[ + .5'ii' + .5'kk' + .5'ij' + .5'ji' + .5'jk' + .5'kj'] 1vesfor = (1,1,1,1,)

Crossrefs

Programs

  • Maple
    with(numtheory):a := cfrac (tan(Pi/3),60): > b := cfrac (tan(Pi/6),60): > seq(nthnumer (b,i)*nthdenom (a,i), i=0..24 ); # Zerinvary Lajos, Feb 08 2007
  • Mathematica
    LinearRecurrence[{3,3,-1},{0,1,3},40] (* Harvey P. Dale, Apr 21 2018 *)
  • PARI
    {a(n) = local(s=1); if( n<0, n = -1 - n; s=-1); s * polcoeff( x / ((x + 1) * (x^2 -4*x + 1)) + x * O(x^n), n)} /* Michael Somos, Jul 27 2012 */

Formula

G.f.: x/((x+1)*(x^2-4*x+1)).
a(n) = A002530(n)*A002530(n+1). - Zerinvary Lajos, Feb 08 2007
a(-1 - n) = -a(n). a(2*n) = A011916(n). a(2*n + 1) = -A011916(-1 -n). - Michael Somos, Jul 27 2012
6*a(n) = A001353(n)+A001353(n+1)-(-1)^n. - R. J. Mathar, Sep 07 2016
a(n) = ((1 + sqrt(3))*(2 + sqrt(3))^n + (1 - sqrt(3))*(2 - sqrt(3))^n - 2*(-1)^n)/12. - Stefano Spezia, Sep 19 2023
a(n)+a(n+1) = A001353(n+1). - R. J. Mathar, Aug 31 2025

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 2, 4, 3, 3, 7, 15, 0, 6, 12, 26, 56, 9, 9, 21, 45, 97, 209, 0, 18, 36, 78, 168, 362, 780, 27, 27, 63, 135, 291, 627, 1351, 2911, 0, 54, 108, 234, 504, 1086, 2340, 5042, 10864, 81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545
Offset: 0

Views

Author

Richard R. Forberg, Sep 02 2013

Keywords

Comments

Array is analogous to A228405 in goal and structure, with key differences.
Left column is A001353. Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
Either or both may be used as initializing values. See Formula section.
The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc. The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
Several ways of combining the first few columns give OEIS sequences:
A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
The main diagonal (without initial 0) = 2*A090018. The first subdiagonal = abs(A099842). First superdiagonal = A141041.
A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k. For any other initial values only even iterations (at k = 2, 4, ...) produce integers.

Examples

			The array, A(n, k), begins as:
    0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
    1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
    4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
   15,   26,   45,   78,  135,   234,   405,   702, ...
   56,   97,  168,  291,  504,   873,  1512,  2619, ...
  209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
  780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
Antidiagonal triangle, T(n, k), begins as:
   0;
   1,  1;
   0,  2,   4;
   3,  3,   7,  15;
   0,  6,  12,  26,  56;
   9,  9,  21,  45,  97,  209;
   0, 18,  36,  78, 168,  362,  780;
  27, 27,  63, 135, 291,  627, 1351, 2911;
   0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
  81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
		

Crossrefs

Programs

  • Magma
    function A(n,k)
      if k lt 0 then return 0;
      elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
      elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
      else return 2*A(n, k-1) - A(n-1, k-1);
      end if; return A;
    end function;
    A227418:= func< n,k | A(k, n-k) >;
    [A227418(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 09 2022
    
  • Mathematica
    A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
    T[n_, k_]:= A[k, n-k];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 09 2022 *)
  • SageMath
    def A(n,k):
        if (k<0): return 0
        elif (k==0): return chebyshev_U(n-1,2)
        else: return 2*A(n, k-1) - A(n-1, k-1)
    def A227418(n, k): return A(k, n-k)
    flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 09 2022

Formula

If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
A(n, 0) = A001353(n).
A(n, 1) = A001075(n).
A(n, 2) = A005320(n).
A(n, 3) = A151961(n).
A(1, k) = A038754(k).
A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
A(n, n+1) = A141041(n-1) (superdiagonal).
A(n+1, n) = abs(A099842(n)) (subdiagonal).
From G. C. Greubel, Oct 09 2022: (Start)
T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
T(n, 1) = A038754(n-1).
T(n, 2) = A228879(n-2).
T(2*n-1, n-1) = A141041(n-1).
T(2*n, n) = 2*A090018(n-1), n > 0.
T(n, n-4) = 3*A005320(n-4).
T(n, n-3) = 3*A001075(n-3).
T(n, n-2) = 3*A001353(n-2).
T(n, n-1) = A001075(n-1).
T(n, n) = A001353(n).
Sum_{k=0..n-1} T(n, k) = A084156(n).
Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)

Extensions

Offset corrected by G. C. Greubel, Oct 09 2022

A220186 Numbers n >= 0 such that n^2 + n*(n+1)/2 is a square.

Original entry on oeis.org

0, 8, 800, 78408, 7683200, 752875208, 73774087200, 7229107670408, 708378777612800, 69413891098384008, 6801852948864020000, 666512175097575576008, 65311391306613542428800, 6399849835873029582446408, 627119972524250285537319200
Offset: 1

Views

Author

Alex Ratushnyak, Apr 12 2013

Keywords

Comments

Equivalently, numbers n such that triangular(2*n) - triangular(n) is a square.

Crossrefs

Cf. A005449 (n^2 + n(n+1)/2).
Cf. A011916 (numbers n such that n^2 + n(n+1)/2 is a triangular number).
Cf. A014105 (n^2 + n(n+1)).
Cf. A084703 (numbers n such that n^2 + n(n+1) is a square).
Cf. A220185 (numbers n such that n^2 + n(n+1) is an oblong number).

Programs

  • C
    #include 
    #include 
    int main() {
      unsigned long long a, i, t;
      for (i=0; i < (1L<<32); ++i) {
          a = (i*i) + ((i+1)*i/2);
          t = sqrt(a);
          if (a == t*t)  printf("%llu\n", i);
      }
      return 0;
    }
    
  • Mathematica
    a[n_]:=Floor[(1/12)*(49 + 20*Sqrt[6])^n]; Table[a[n],{n,0,10}] (* Giovanni Resta, Apr 12 2013 *)
    LinearRecurrence[{99,-99,1},{0,8,800},20] (* Harvey P. Dale, Nov 01 2022 *)
  • PARI
    lista(nn) = for(n=0, nn, if(issquare(n^2 + n*(n+1)/2), print1(n, ", "))); \\ Altug Alkan, Mar 05 2016

Formula

a(n) = A098308(2*n-2).
a(1) = 0, a(2) = 8, a(3) = 800 and a(n) = 99*a(n-1)-99*a(n-2)+a(n-3) for n>3. - Giovanni Resta, Apr 12 2013
G.f.: -8*x^2*(x+1) / ((x-1)*(x^2-98*x+1)). - Colin Barker, May 31 2013
a(n) = (49+20*sqrt(6))^(-n)*(49+20*sqrt(6)-2*(49+20*sqrt(6))^n+(49-20*sqrt(6))*(49+20*sqrt(6))^(2*n))/12. - Colin Barker, Mar 05 2016
a(n) = 8*A108741(n). - R. J. Mathar, Feb 19 2017

A122770 Numbers k such that A056109(k) is a square.

Original entry on oeis.org

0, 6, 88, 1230, 17136, 238678, 3324360, 46302366, 644908768, 8982420390, 125108976696, 1742543253358, 24270496570320, 338044408731126, 4708351225665448, 65578872750585150, 913395867282526656, 12721963269204788038, 177194089901584505880
Offset: 0

Views

Author

Zak Seidov, Oct 21 2006

Keywords

Comments

All terms are even. Sequence is infinite. Corresponding squares are s^2 with s = 1, 11, 153, 2131, 29681, 413403, 5757961, 80198051, 1117014753, 15558008491, 216695104121, 3018173449203, 42037733184721, ... (see A122769).
Numbers m such that the distance from (0,0,-1) to (m,m,m) in R^3 is an integer. - James R. Buddenhagen, Jun 15 2013
Also n such that the sum of the pentagonal numbers P(n) and P(n+1) is equal to the sum of two consecutive triangular numbers. - Colin Barker, Dec 07 2014

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{15, -15, 1}, {0, 6, 88}, 25] (* Paolo Xausa, Jul 19 2024 *)
  • PARI
    concat(0, Vec(2*x*(x-3) / ((x-1)*(x^2-14*x+1)) + O(x^100))) \\ Colin Barker, Dec 07 2014

Formula

a(n) = ((b+1)*(7+4*b)^n - (b-1)*(7-4*b)^n - 2)/6, where b = sqrt(3).
a(n) = 14*a(n-1) - a(n-2) + 4, with a(0)=0, a(1)=6.
a(n) = 2*A011916(n) = (A001353(n+1)^2 - A001075(n)^2)/2. - Richard R. Forberg, Aug 26 2013
a(n) = 15*a(n-1)-15*a(n-2)+a(n-3). - Colin Barker, Dec 07 2014
G.f.: 2*x*(x-3) / ((x-1)*(x^2-14*x+1)). - Colin Barker, Dec 07 2014

Extensions

More terms from Colin Barker, Dec 07 2014

A225785 Numbers n such that triangular(n) + triangular(2*n) is a triangular number.

Original entry on oeis.org

0, 12, 84, 3960, 27144, 1275204, 8740380, 410611824, 2814375312, 132215732220, 906220110180, 42573055163112, 291800061102744, 13708391546789940, 93958713454973484, 4414059505011197664, 30254413932440359200, 1421313452222058857964
Offset: 1

Views

Author

Alex Ratushnyak, May 16 2013

Keywords

Comments

Equivalently, numbers n such that oblong(n) + oblong(2*n) is an oblong number, where oblong(n) = A002378(n) = n*(n+1).
Also, x values in the equation A147875(x) = A000217(y) - see Ralf Stephan in Program lines. - Bruno Berselli, May 18 2013
Also, numbers m such that 2*m+1 and 10*m+1 are both squares. - Bruno Berselli, Mar 03 2016

Examples

			12*13/2 + 24*25/2 = 27*28/2, so 12 is in the sequence.
		

Crossrefs

Cf. A224419 (numbers n such that triangular(n) + triangular(2*n) is a square).
Cf. A011916 (numbers n such that triangular(2*n) - triangular(n) is a triangular number).
Cf. A225786 (numbers n such that oblong(2*n) + oblong(n) is a square).
Cf. A225839 (triangular numbers of the form triangular(x) + triangular(2*x)).

Programs

  • C
    #include 
    #include 
    int main() {
      unsigned long long i, s, t;
      for (i = 0; i< (1ULL<<31); i++) {
        s = 2*i*(2*i+1) + i*(i+1);
        t = sqrt(s);
        if (s==t*(t+1)) printf("%llu, ", i);
      }
      return 0;
    }
    
  • Mathematica
    CoefficientList[Series[12 x (1 + 6 x + x^2)/((1 - x) (1 - 18 x + x^2) (1 + 18 x + x^2)), {x, 0, 20}], x] (* Bruno Berselli, May 18 2013 *)
    LinearRecurrence[{1,322,-322,-1,1},{0,12,84,3960,27144},20] (* Harvey P. Dale, Apr 08 2021 *)
  • PARI
    for(n=1,10^9,t=n*(5*n+3)/2;x=sqrtint(2*t);if(t==x*(x+1)/2,print(n))) /* Ralf Stephan, May 17 2013 */

Formula

G.f.: 12*x*(1+6*x+x^2)/((1-x)*(1-18*x+x^2)(1+18*x+x^2)). [Bruno Berselli, May 18 2013]
a(n) = (1/20)*((3+(-1)^n*sqrt(5))*(2-sqrt(5))^(4*floor(n/2))+(3-(-1)^n*sqrt(5))*(2+sqrt(5))^(4*floor(n/2))-6). [Bruno Berselli, May 18 2013]
a(2*n) = (Fibonacci(6*n-3)^2 + Lucas(6*n-3)*Fibonacci(6*n-1))/2. - Greg Dresden, Sep 24 2023

Extensions

More terms from Bruno Berselli, May 18 2013

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

Original entry on oeis.org

0, 1, 28, 117, 2760, 11481, 270468, 1125037, 26503120, 110242161, 2597035308, 10802606757, 254482957080, 1058545220041, 24936732758548, 103726628957277, 2443545327380640, 10164151092593121, 239442505350544188, 995983080445168597, 23462921979025949800
Offset: 1

Views

Author

Alex Ratushnyak, Apr 13 2013

Keywords

Comments

Numbers n such that 6*n^2 + 2*n + 1 is a square. - Joerg Arndt, Apr 14 2013
a(n+4) - a(n) is divisible by 40. (a(n+2) - a(n)) mod 10 = period 4: repeat 8, 6, 2, 4. See A000689. - Paul Curtz, Apr 15 2013
For this 5 consecutive terms recurrence,the main (or principal) sequence is: CRR(n)= 0, 0, 0, 0, 1, 1, 99, 99, 9702, 9702,... . - Paul Curtz, Apr 16 2013
Also numbers n such that the sum of the octagonal numbers N(n) and N(n+1) is equal to the sum of two consecutive triangular numbers. - Colin Barker, Dec 09 2014

Crossrefs

Cf. A000217, A005449 (n^2 + n(n+1)/2).
Cf. A011916 (numbers n>=0 such that n^2 + n(n+1)/2 is a triangular number).
Cf. A220186 (numbers n>=0 such that n^2 + n(n+1)/2 is a square).
Cf. A220185 (numbers n>=0 such that n^2 + n(n+1) is an oblong number).
(Example of a family of main sequences: A131577, A024495, A000749, A139761. )
Cf. A251793.

Programs

  • C
    #include 
    typedef unsigned long long U64;
    U64 rootPronic(U64 a) {
        U64 sr = 1L<<31, s, b;
        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 < 3L<<30; n++) {
        a = n*(n+1)/2 + n*n;
        t = rootPronic(a);
        if (a == t*(t+1)) {
            printf("%llu\n", n);
        }
      }
    }
    
  • Mathematica
    LinearRecurrence[{1, 98, -98, -1, 1}, {0, 1, 28, 117, 2760}, 30] (* Giovanni Resta, Apr 14 2013 *)
    CoefficientList[Series[x (1 + 27 x - 9 x^2 - 3 x^3)/((1 - x) (1 - 10 x + x^2) (1 + 10 x + x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 13 2014 *)
  • Maxima
    makelist(expand(((-(-1)^n+sqrt(6))*(5+2*sqrt(6))^(n-1)-((-1)^n+sqrt(6))*(5-2*sqrt(6))^(n-1)-2)/12), n, 1, 25); /* Bruno Berselli, Apr 14 2013 */
  • PARI
    concat([0], Vec( x * (1+27*x-9*x^2-3*x^3) / ( (1-x)*(1-10*x+x^2)*(1+10*x+x^2) ) + O(x^66) ) )  /* Joerg Arndt, Apr 14 2013 */
    

Formula

G.f.: x^2 * (1+27*x-9*x^2-3*x^3) / ( (1-x)*(1-10*x+x^2)*(1+10*x+x^2) ). - Giovanni Resta, Apr 14 2013, adapted by Vincenzo Librandi Aug 13 2014
a(n) = ((-(-1)^n+sqrt(6))*(5+2*sqrt(6))^(n-1)-((-1)^n+sqrt(6))*(5-2*sqrt(6))^(n-1)-2)/12. - Bruno Berselli, Apr 14 2013
a(n) = a(n-1) + 98*a(n-2) - 98*a(n-3) - a(n-4) + a(n-5).

Extensions

a(11)-a(21) from Giovanni Resta, Apr 14 2013

A239071 Numbers k such that k+x+y is a triangular number (A000217), where x and y are the two triangular numbers nearest to k.

Original entry on oeis.org

0, 2, 6, 11, 19, 39, 53, 84, 104, 122, 146, 195, 225, 285, 321, 352, 392, 434, 470, 516, 605, 657, 757, 815, 864, 926, 990, 1044, 1112, 1241, 1315, 1455, 1535, 1602, 1686, 1844, 1934, 2103, 2199, 2279, 2379, 2481, 2566, 2672, 2870, 2982, 3191, 3309, 3407, 3529
Offset: 1

Views

Author

Alex Ratushnyak, Mar 10 2014

Keywords

Comments

If k is a triangular number then y=k.
The sequence of terms that are triangular numbers begins: 0, 6, 990, 189420, 36709596, 7120958130, 1381422007290, 267988648725336, 51988415041636920, 10085484510081574110.
Those are the triangular numbers with indices from A011916. - Ivan Neretin, May 31 2015

Examples

			The two triangular numbers nearest to 11 are 10 and 15. Because 10+11+15=36 is a triangular number, 11 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=3600,trnos},trnos=Accumulate[Range[100]];Join[{0},Select[ Range[ nn],OddQ[Sqrt[8(Total[Nearest[trnos,#,2]]+#) +1]]&]]] (* Harvey P. Dale, Dec 19 2020 *)
  • PARI
    isok(k) = {my(x = k-1); while (! ispolygonal(x, 3), x--); my(y = k); while (! ispolygonal(y, 3), y++); ispolygonal(k+x+y, 3);} \\ Michel Marcus, May 31 2015
  • Python
    def isqrt(a):
        sr = 1 << (int.bit_length(int(a)) >> 1)
        while a < sr*sr:  sr>>=1
        b = sr>>1
        while b:
            s = sr + b
            if a >= s*s:  sr = s
            b>>=1
        return sr
    def isTriang(x):
        x+=x
        r = isqrt(x)
        return r*(r+1)==x
    print('0', end=', ')
    for n in range(777):
        tn = n*(n+1)//2
        tn1 = (n+1)*(n+2)//2
        for t in range(tn+1, tn1+1):
            if isTriang(tn+t+tn1): print(str(t), end=',')
    
Showing 1-10 of 10 results.