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-6 of 6 results.

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 *)

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)).
Showing 1-6 of 6 results.