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

A122797 A P_3-stuttered arithmetic progression with a(n+1) = a(n) if n is a triangular number, a(n+1) = a(n) + 1 otherwise.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_3(i) = the i-th triangular number.
As a triangle [1; 1,2; 2,3,4; ...], row sums = A064808: (1, 3, 9, 22, 45, 81, ...). - Gary W. Adamson, Aug 10 2007
a(n) = n - A003056(n-1). - Reinhard Zumkeller, Feb 12 2012

Crossrefs

Programs

  • Haskell
    a122797 n = a122797_list !! (n-1)
    a122797_list  = 1 : zipWith (+) a122797_list (map ((1 -) . a010054) [1..])
    -- Reinhard Zumkeller, Feb 12 2012
    
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[Sqrt[8n+1]],a,a+1]}; NestList[nxt,{1,1},100][[All,2]] (* Harvey P. Dale, Oct 10 2018 *)
  • PARI
    isTriang(n) = {if (! issquare(8*n+1), return (0)); return (1);}
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! isTriang(i), aa = aa + 1););} \\ Michel Marcus, Apr 01 2013
    
  • Python
    from math import isqrt
    def A122797(n): return n+1-(k:=isqrt(m:=n<<1))-int((m<<2)>(k<<2)*(k+1)+1) # Chai Wah Wu, Jul 26 2022

Formula

a(n) = A001614(n) - n + 1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013

A122793 Connell sum sequence (partial sums of the Connell sequence).

Original entry on oeis.org

1, 3, 7, 12, 19, 28, 38, 50, 64, 80, 97, 116, 137, 160, 185, 211, 239, 269, 301, 335, 371, 408, 447, 488, 531, 576, 623, 672, 722, 774, 828, 884, 942, 1002, 1064, 1128, 1193, 1260, 1329, 1400, 1473, 1548, 1625, 1704, 1785, 1867, 1951, 2037, 2125, 2215, 2307, 2401, 2497, 2595, 2695, 2796, 2899, 3004, 3111, 3220
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

a(n) is the sum of the n highest entries in the projection of the n-th tetrahedron or tetrahedral number (e.g., a(7) = 7+6+6+5+5+5+4+4).
a(n) is a sharp upper bound for the value of a gamma-labeling of a graph with n edges (cf. Bullington).

Crossrefs

Cf. A337300 (geometric Connell sums).

Programs

  • Python
    from math import isqrt
    def A122793(n): return n*(n+1)-(r:=(k:=isqrt(m:=n<<1))+int((m<<2)>(k<<2)*(k+1)+1))*((6*n+1)-r**2)//6 # Chai Wah Wu, Jul 26 2022

Formula

a(n) = (n-th triangular number) - n + (n-th partial sum of A122797).
a(n) = n^2 + n - R*((6*n+1)-R^2)/6, where R = round(sqrt(2*n)). - Gerald Hillier, Nov 29 2009

A122798 A P_5-stuttered arithmetic progression with a(n+1) = a(n) if n is a pentagonal number, a(n+1) = a(n)+4 otherwise.

Original entry on oeis.org

1, 1, 5, 9, 13, 13, 17, 21, 25, 29, 33, 37, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 181, 185, 189, 193, 197, 201, 205, 209
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_5(i) = the i-th pentagonal number.

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[IntegerQ[(1+Sqrt[24n+25])/6],a,a+4]}; Join[{1}, Transpose[ NestList[nxt,{1,1},60]][[2]]] (* Harvey P. Dale, May 07 2015 *)
    nxt[{n_,a_}]:=With[{pn=PolygonalNumber[5,Range[0,30]]},{n+1,If[MemberQ[pn,n],a,a+4]}]; NestList[nxt,{1,1},100][[;;,2]] (* Harvey P. Dale, Sep 28 2023 *)
  • PARI
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! ispolygonal(i, 5), aa += 4););} \\ Michel Marcus, Apr 01 2013, May 02 2015

Formula

a(n) = A045929(n) - n + 1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013

A122794 Connell (3,2)-sum sequence (partial sums of the (3,2)-Connell sequence).

Original entry on oeis.org

1, 3, 8, 16, 25, 37, 52, 70, 91, 113, 138, 166, 197, 231, 268, 308, 349, 393, 440, 490, 543, 599, 658, 720, 785, 851, 920, 992, 1067, 1145, 1226, 1310, 1397, 1487, 1580, 1676, 1773, 1873, 1976, 2082, 2191, 2303, 2418, 2536, 2657, 2781, 2908, 3038, 3171, 3305, 3442, 3582, 3725, 3871, 4020, 4172, 4327, 4485, 4646, 4810, 4977, 5147, 5320, 5496, 5673, 5853, 6036, 6222, 6411, 6603
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122800).

A122795 Connell (5,3)-sum sequence (partial sums of the (5,3)-Connell sequence).

Original entry on oeis.org

1, 3, 10, 22, 39, 57, 80, 108, 141, 179, 222, 270, 319, 373, 432, 496, 565, 639, 718, 802, 891, 985, 1080, 1180, 1285, 1395, 1510, 1630, 1755, 1885, 2020, 2160, 2305, 2455, 2610, 2766, 2927, 3093, 3264, 3440, 3621, 3807, 3998, 4194, 4395, 4601, 4812, 5028, 5249, 5475, 5706, 5938, 6175, 6417, 6664, 6916, 7173, 7435, 7702, 7974, 8251, 8533, 8820, 9112, 9409, 9711, 10018, 10330, 10647, 10969
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122798).

A122796 Connell (3,5)-sum sequence (partial sums of the (3,5)-Connell sequence).

Original entry on oeis.org

1, 3, 8, 16, 27, 41, 58, 76, 97, 121, 148, 178, 211, 247, 286, 328, 373, 421, 470, 522, 577, 635, 696, 760, 827, 897, 970, 1046, 1125, 1207, 1292, 1380, 1471, 1565, 1660, 1758, 1859, 1963, 2070, 2180, 2293, 2409, 2528, 2650, 2775, 2903, 3034, 3168, 3305, 3445, 3588, 3734, 3883, 4035, 4190, 4346, 4505, 4667, 4832, 5000, 5171, 5345, 5522, 5702, 5885, 6071, 6260, 6452, 6647, 6845
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122799).

A122799 A P_7-stuttered arithmetic progression with a(n+1)=a(n) if n is not a heptagonal number, a(n+1)=a(n)+2 otherwise.

Original entry on oeis.org

1, 1, 3, 5, 7, 9, 11, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_7(i) = the i-th heptagonal number.

Crossrefs

Programs

  • PARI
    isHeptag(n) = {if (! issquare(40*n+9, &res), return (0)); if ((res + 3) % 10, return (0), return (1));}
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! isHeptag(i), aa += 2););} \\ Michel Marcus, Apr 01 2013

Formula

a(n) = A045930(n)-n+1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013
Showing 1-7 of 7 results.