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

A034706 Numbers which are sums of consecutive triangular numbers.

Original entry on oeis.org

0, 1, 3, 4, 6, 9, 10, 15, 16, 19, 20, 21, 25, 28, 31, 34, 35, 36, 45, 46, 49, 52, 55, 56, 64, 66, 74, 78, 80, 81, 83, 84, 85, 91, 100, 105, 109, 110, 116, 119, 120, 121, 130, 136, 144, 145, 153, 155, 161, 164, 165, 166, 169, 171, 185, 190, 196, 199, 200, 202, 210
Offset: 1

Views

Author

Keywords

Crossrefs

Complement gives A050941.
Cf. A000217 (1 consec), A001110 (2 consec), A129803 (3 consec), A131557 (5 consec), A257711 (7 consec), A034705, A269414 (subsequence of primes).

Programs

  • Haskell
    -- import Data.Set (deleteFindMin, union, fromList); import Data.List (inits)
    a034706 n = a034706_list !! (n-1)
    a034706_list = f 0 (tail $ inits $ a000217_list) (fromList [0]) where
       f x vss'@(vs:vss) s
         | y < x = y : f x vss' s'
         | otherwise = f w vss (union s $ fromList $ scanl1 (+) ws)
         where ws@(w:_) = reverse vs
               (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 12 2015
  • Maple
    isA034706 := proc(n)
        local a,b;
        for a from 0 do
            if a*(a+1)/2 > n then
                return false;
            end if;
            for b from a do
                tab := (1+b-a)*(a^2+b*a+a+b^2+2*b)/6 ;
                if tab = n then
                    return true;
                elif tab > n then
                    break;
                end if;
            end do:
        end do:
    end proc:
    for n from 0 to 100 do
        if isA034706(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Dec 14 2015
  • Mathematica
    M = 1000; (* to get all terms <= M *)
    nmax = (Sqrt[8 M + 1] - 1)/2 // Ceiling;
    Table[Sum[n(n+1)/2, {n, j, k}], {j, 0, nmax}, {k, j, nmax}] // Flatten // Union // Select[#, # <= M&]& (* Jean-François Alcover, Mar 10 2019 *)

A131557 Triangular numbers that are the sums of five consecutive triangular numbers.

Original entry on oeis.org

55, 2485, 17020, 799480, 5479705, 257429395, 1764447310, 82891465030, 568146553435, 26690794309585, 182941425758080, 8594352876220660, 58906570947547645, 2767354935348742255, 18967732903684582930, 891079694829418784770, 6107551088415488155135
Offset: 1

Views

Author

Richard Choulet, Oct 06 2007

Keywords

Examples

			a(1) = 55 = 3+6+10+15+21.
		

Crossrefs

Cf. A129803.

Programs

  • Maple
    a:= n-> `if`(n<2, [0, 55][n+1], (<<0|1|0>, <0|0|1>, <1|-323|323>>^iquo(n-2, 2, 'r'). `if`(r=0, <<2485, 799480, 257429395>>, <<17020, 5479705, 1764447310>>))[1, 1]): seq(a(n), n=1..20); # Alois P. Heinz, Sep 25 2008, revised Dec 15 2011
  • Mathematica
    LinearRecurrence[{1, 322, -322, -1, 1}, {55, 2485, 17020, 799480, 5479705}, 20] (* Jean-François Alcover, Oct 05 2019 *)

Formula

The subsequences with odd indices and even indices satisfy the same recurrence relations: a(n+2) = 322*a(n+1) - a(n) - 680 and a(n+1) = 161*a(n) - 340 + 9*sqrt(320*a(n)^2 - 1360*a(n) - 175).
G.f.: -5*x*(11+486*x-635*x^2+2*x^4) / ( (x-1)*(x^2+18*x+1)*(x^2-18*x+1) ).
8*a(n) = 17 + 45*A007805(n) + 18*(-1)^n*A049629(n). - R. J. Mathar, Apr 28 2020

Extensions

More terms from Alois P. Heinz, Sep 25 2008
a(6) and a(8) corrected by Harvey P. Dale, Oct 02 2011
a(10), a(12), a(14) corrected at the suggestion of Harvey P. Dale by D. S. McNeil, Oct 02 2011

A257711 Triangular numbers (A000217) that are the sum of seven consecutive triangular numbers.

Original entry on oeis.org

210, 3486, 51681, 883785, 13125126, 224476266, 3333728685, 57016086141, 846753959226, 14481861401910, 215072171913081, 3678335779997361, 54627484911961710, 934282806257926146, 13875166095466359621, 237304154453733242085, 3524237560763543380386
Offset: 1

Views

Author

Colin Barker, May 05 2015

Keywords

Examples

			210 is in the sequence because T(20) = 210 = 10+15+21+28+36+45+55 = T(4)+ ... +T(10).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 254, -254, -1, 1}, {210, 3486, 51681, 883785, 13125126}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
  • PARI
    Vec(-21*x*(x^4-245*x^2+156*x+10) / ((x-1)*(x^2-16*x+1)*(x^2+16*x+1)) + O(x^100))

Formula

G.f.: -21*x*(x^4-245*x^2+156*x+10) / ((x-1)*(x^2-16*x+1)*(x^2+16*x+1)).
16*a(n) = 104 +225*A157456(n+1) +7*(-1)^n*A159678(n+1). - R. J. Mathar, Apr 28 2020

A257712 Triangular numbers (A000217) that are the sum of eight consecutive triangular numbers.

Original entry on oeis.org

120, 276, 1176, 28920, 126756, 306936, 1345620, 33362196, 146264856, 354192420, 1552832856, 38499933816, 168789505620, 408737734296, 1791967758756, 44428890250020, 194782943209176, 471682991173716, 2067929240760120, 51270900848577816, 224779347673872036
Offset: 1

Views

Author

Colin Barker, May 05 2015

Keywords

Examples

			120 is in the sequence because T(15) = 120 = 1+3+6+10+15+21+28+36 = T(1)+ ... +T(8).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 1154, -1154, 0, 0, -1, 1}, {120, 276, 1176, 28920, 126756, 306936, 1345620, 33362196, 146264856}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
    Select[Total/@Partition[Accumulate[Range[5*10^6]],8,1],OddQ[ Sqrt[ 1+8#]]&] (* The program generates the first 16 terms of the sequence *) (* Harvey P. Dale, Feb 27 2022 *)
  • PARI
    Vec(-12*x*(3*x^8+7*x^6+13*x^5-3387*x^4+2312*x^3+75*x^2+13*x+10) / ((x-1)*(x^2-6*x+1)*(x^2+6*x+1)*(x^4+34*x^2+1)) + O(x^100))

Formula

G.f.: -12*x*(3*x^8+7*x^6+13*x^5-3387*x^4+2312*x^3+75*x^2+13*x+10) / ((x-1)*(x^2-6*x+1)*(x^2+6*x+1)*(x^4+34*x^2+1)).

A257713 Triangular numbers (A000217) that are the sum of ten consecutive triangular numbers.

Original entry on oeis.org

1485, 7260, 28920, 142845, 2112540, 10440165, 41673885, 205953660, 3046252485, 15054681960, 60093684540, 296985006165, 4392693942120, 21708840917445, 86655051404085, 428252172907560, 6334261618255845, 31304133548245020, 124956524030977320, 617539336347666645
Offset: 1

Views

Author

Colin Barker, May 05 2015

Keywords

Examples

			1485 is in the sequence because T(54) = 1485 = 78+91+105+120+136+153+171+190+210+231 = T(12)+ ... +T(21).
		

Crossrefs

Programs

  • Mathematica
     LinearRecurrence[{1, 0, 0, 1442, -1442, 0, 0, -1, 1}, {1485, 7260, 28920, 142845, 2112540, 10440165, 41673885, 205953660, 3046252485}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
  • PARI
    Vec(-15*x*(8*x^8-5*x^7+5*x^5-11445*x^4+7595*x^3+1444*x^2+385*x+99) / ((x-1)*(x^2-6*x-1)*(x^2+6*x-1)*(x^4+38*x^2+1)) + O(x^100))

Formula

G.f.: -15*x*(8*x^8-5*x^7+5*x^5-11445*x^4+7595*x^3+1444*x^2+385*x+99) / ((x-1)*(x^2-6*x-1)*(x^2+6*x-1)*(x^4+38*x^2+1)).

A259413 Triangular numbers (A000217) that are the sum of eleven consecutive triangular numbers.

Original entry on oeis.org

2145, 3916, 7381, 13530, 843051, 1547920, 2926990, 5374281, 335521560, 616057651, 1164924046, 2138939715, 133536727236, 245189386585, 463636832725, 851292621696, 53147281907775, 97584759792586, 184526294489911, 338812324484700, 21152484662556621
Offset: 1

Views

Author

Colin Barker, Jun 26 2015

Keywords

Examples

			2145 is in the sequence because T(65) = 2145 = 105 + 120 + 136 + 153 + 171 + 190 + 210 + 231 + 253 + 276 + 300 = T(14) + ... + T(24).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 398, -398, 0, 0, -1, 1}, {2145, 3916, 7381, 13530, 843051, 1547920, 2926990, 5374281, 335521560}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
  • PARI
    Vec(-11*x*(6*x^8-x^7+x^5-2199*x^4+559*x^3+315*x^2+161*x+195)/((x-1)*(x^4-20*x^2+1)*(x^4+20*x^2+1)) + O(x^30))

Formula

G.f.: -11*x*(6*x^8-x^7+x^5-2199*x^4+559*x^3+315*x^2+161*x+195) / ((x-1)*(x^4-20*x^2+1)*(x^4+20*x^2+1)).

A259414 Triangular numbers (A000217) that are the sum of thirteen consecutive triangular numbers.

Original entry on oeis.org

2080, 414505, 28815436, 49317346, 3428789455, 698283666730, 48548229019381, 83089887991201, 5776831256176630, 1176469718198438755, 81794153348207147926, 139990009467226925656, 9732816854065394603605, 1982118534159467652450580, 137806953149317550935817071
Offset: 1

Views

Author

Colin Barker, Jun 26 2015

Keywords

Examples

			2080 is in the sequence because T(64) = 2080 = 66 + 78 + 91 + 105 + 120 + 136 + 153 + 171 + 190 + 210 + 231 + 253 + 276 = T(11) + ... + T(23).
		

Crossrefs

Programs

  • Mathematica
     LinearRecurrence[{1, 0, 0, 1684802, -1684802, 0, 0, -1, 1}, {2080, 414505, 28815436, 49317346, 3428789455, 698283666730, 48548229019381, 83089887991201, 5776831256176630}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
  • PARI
    Vec(-13*x*(7*x^8 +153*x^6 +31725*x^5 -9608927*x^4 +1577070*x^3 +2184687*x^2 +31725*x +160) / ((x -1)*(x^2 -36*x -1)*(x^2 +36*x -1)*(x^4 +1298*x^2 +1)) + O(x^20))

Formula

G.f.: -13*x*(7*x^8 +153*x^6 +31725*x^5 -9608927*x^4 +1577070*x^3 +2184687*x^2 +31725*x +160) / ((x -1)*(x^2 -36*x -1)*(x^2 +36*x -1)*(x^4 +1298*x^2 +1)).

A259415 Triangular numbers (A000217) that are the sum of seventeen consecutive triangular numbers.

Original entry on oeis.org

1326, 9180, 24531, 1979055, 5325216, 39529386, 106368405, 8616365901, 23185550130, 172110498456, 463127571831, 37515654714891, 100949879501796, 749369070309030, 2016457340944761, 163343152011830505, 439535752164830646, 3262752760014579156
Offset: 1

Views

Author

Colin Barker, Jun 26 2015

Keywords

Examples

			1326 is in the sequence because T(51) = 1326 = 6 + 10 + 15 + 21 + 28 + 36 + 45 + 55 + 66 + 78 + 91 + 105 + 120 + 136 + 153 + 171 + 190 = T(3) + ... + T(19).
		

Crossrefs

Programs

  • Mathematica
     LinearRecurrence[{1, 0, 0, 4354, -4354, 0, 0, -1, 1}, {1326, 9180, 24531, 1979055, 5325216, 39529386, 106368405, 8616365901, 23185550130}, 30] (* Vincenzo Librandi, Jun 27 2015 *)
    Module[{nn=10^6},Select[Total/@Partition[Accumulate[Range[nn]],17,1],OddQ[ Sqrt[8#+1]]&]] (* Harvey P. Dale, Mar 19 2023 *)
  • PARI
    Vec(-51*x*(11*x^8 +15*x^6 +154*x^5 -47593*x^4 +38324*x^3 +301*x^2 +154*x +26) / ((x -1)*(x^2 -8*x -1)*(x^2 +8*x -1)*(x^4 +66*x^2 +1)) + O(x^30))

Formula

G.f.: -51*x*(11*x^8 +15*x^6 +154*x^5 -47593*x^4 +38324*x^3 +301*x^2 +154*x +26) / ((x -1)*(x^2 -8*x -1)*(x^2 +8*x -1)*(x^4 +66*x^2 +1)).

A082840 a(n) = 4*a(n-1) - a(n-2) + 3, with a(0) = -1, a(1) = 1.

Original entry on oeis.org

-1, 1, 8, 34, 131, 493, 1844, 6886, 25703, 95929, 358016, 1336138, 4986539, 18610021, 69453548, 259204174, 967363151, 3610248433, 13473630584, 50284273906, 187663465043, 700369586269, 2613814880036, 9754889933878, 36405744855479, 135868089488041
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 14 2003

Keywords

Comments

Apart from the initial -1, these are the numbers k such that the triangular number k*(k + 1)/2 is the sum of three consecutive triangular numbers - see A129803. - Brian Nowell, Nov 03 2009

Crossrefs

Programs

  • GAP
    a:=[-1,1,8];; for n in [4..30] do a[n]:=5*a[n-1]-5*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Feb 25 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( -(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2)) )); // G. C. Greubel, Feb 25 2019
    
  • Mathematica
    CoefficientList[Series[(-1+6x-2x^2)/((1-x)(1-4x+x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 15 2014 *)
    LinearRecurrence[{5,-5,1}, {-1,1,8}, 30] (* G. C. Greubel, Feb 25 2019 *)
  • PARI
    is(n)=ispolygonal(3/2*n*(n+1)+4,3) || n==-1 \\ Charles R Greathouse IV, Apr 14 2014
    
  • PARI
    my(x='x+O('x^30)); Vec(-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
    
  • Sage
    (-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
    

Formula

a(n) = A001571(n) - 1. - N. J. A. Sloane, Nov 03 2009
G.f.: -(1 -6*x +2*x^2)/((1 - x)*(1 - 4*x + x^2)).
a(n) = -3/2 + (1/12)*( (a -2*b +5)*a^n + (b -2*a +5)*b^n ), with a = 2 + sqrt(3), b = 2 - sqrt(3):.
a(n) = -3/2 + (3/4)*A003500(n) - (1/4)*A003500(n-1).
a(n) = (1/2)*(A001834(n) - 3).
E.g.f.: ((1 + sqrt(3))*exp((2 + sqrt(3))*x) + (1 - sqrt(3))*exp((2 - sqrt(3))*x) - 6*exp(x))/4. - Franck Maminirina Ramaharo, Nov 12 2018

A129863 Sums of three consecutive pentagonal numbers.

Original entry on oeis.org

6, 18, 39, 69, 108, 156, 213, 279, 354, 438, 531, 633, 744, 864, 993, 1131, 1278, 1434, 1599, 1773, 1956, 2148, 2349, 2559, 2778, 3006, 3243, 3489, 3744, 4008, 4281, 4563, 4854, 5154, 5463, 5781, 6108, 6444, 6789, 7143, 7506, 7878, 8259, 8649, 9048, 9456, 9873
Offset: 0

Views

Author

Jonathan Vos Post, May 23 2007, May 24 2007

Keywords

Comments

Arises in pentagonal number analog to A129803, Triangular numbers that are the sum of three consecutive triangular numbers. What are the pentagonal numbers which are the sum of three consecutive pentagonal numbers?

Examples

			a(0) = 6 = A000326(0) + A000326(1) + A000326(2) = 0 + 1 + 5.
a(1) = 18 = A000326(1) + A000326(2) + A000326(3) = 1 + 5 + 12.
		

Crossrefs

Programs

  • Magma
    [(9/2)*(n^2)+(15/2)*n+6: n in [0..50]]; // Vincenzo Librandi, Aug 16 2017
  • Mathematica
    Table[(3/2)*(4 + 5*n + 3*n^2), {n, 0, 100}] (* Stefan Steinerberger, May 27 2007 *)
    CoefficientList[Series[3 (2 + x^2) / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Aug 16 2017 *)
    Total/@Partition[PolygonalNumber[5,Range[0,50]],3,1] (* Requires Mathematica version 10 or later *) (* or *) LinearRecurrence[{3,-3,1},{6,18,39},50] (* Harvey P. Dale, Nov 22 2018 *)
  • PARI
    a(n)=n*(9*n+15)/2+6 \\ Charles R Greathouse IV, Jun 17 2017
    

Formula

a(n) = P(n) + P(n+1) + P(n+2) where P(n) = A000326(n) = n*(3*n-1)/2.
a(n) = (9/2)*(n^2) + (15/2)*n + 6.
a(n) = (3*n^2 + 5*n + 4)*(3/2). - Stefan Steinerberger, May 27 2007
G.f.: 3*(2+x^2)/(1-x)^3. - Colin Barker, Feb 13 2012
From Elmo R. Oliveira, Nov 16 2024: (Start)
E.g.f.: 3*exp(x)*(3*x^2 + 8*x + 4)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

Extensions

Offset corrected by Eric Rowland, Aug 15 2017
Showing 1-10 of 18 results. Next