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 11-20 of 37 results. Next

A074147 (2n-1) odd numbers followed by 2n even numbers.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Aug 28 2002

Keywords

Examples

			As a triangular array:
1,
2, 4,
3, 5, 7,
6, 8, 10, 12,
9, 11, 13, 15, 17,
14, 16, 18, 20, 22, 24,
...
		

Crossrefs

Cf. A074148, A074149 (row sums), A001614.

Programs

  • Maple
    A074147 := proc(n,k)
        ceil((n-1)^2/2)+1+2*k ;
    end proc:
    seq(seq( A074147(n,k),k=0..n-1) ,n=1..12) ; # R. J. Mathar, Nov 02 2023
  • Mathematica
    Flatten@Table[Ceiling[(n - 1)^2/2] + 2 k - 1, {n, 12}, {k, n}] (* Ivan Neretin, Dec 15 2016 *)

Formula

T(n,k) = A061925(n-1)+2k, 0<=kR. J. Mathar, Jul 17 2007, corrected Nov 02 2023
a(n) = A116941(n-1)+1. - Robert G. Wilson v, Mar 09 2017

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

A049039 Geometric Connell sequence: 1 odd, 2 even, 4 odd, 8 even, ...

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22, 24, 26, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 121, 123, 125
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A337300 (partial sums), A043529 (first differences).
Cf. A160464, A160465 and A160473. - Johannes W. Meijer, May 24 2009

Programs

  • Haskell
    a049039 n k = a049039_tabl !! (n-1) !! (k-1)
    a049039_row n = a049039_tabl !! (n-1)
    a049039_tabl = f 1 1 [1..] where
       f k p xs = ys : f (2 * k) (1 - p) (dropWhile (<= last ys) xs) where
         ys  = take k $ filter ((== p) . (`mod` 2)) xs
    -- Reinhard Zumkeller, Jan 18 2012, Jul 08 2011
    
  • Maple
    Digits := 100: [seq(2*n-1-floor(evalf(log(n)/log(2))), n=1..100)];
  • Mathematica
    a[0] = 0; a[n_?EvenQ] := a[n] = a[n/2]+n-1; a[n_?OddQ] := a[n] = a[(n-1)/2]+n; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 27 2011, after Ralf Stephan *)
  • PARI
    a(n) = n<<1 - 1 - logint(n,2); \\ Kevin Ryde, Feb 12 2022
    
  • Python
    def A049039(n): return (n<<1)-n.bit_length() # Chai Wah Wu, Aug 01 2022

Formula

a(n) = 2n - 1 - floor(log_2(n)).
a(2^n-1) = 2^(n+1) - (n+2) = A000295(n+1), the Eulerian numbers.
a(0)=0, a(2n) = a(n) + 2n - 1, a(2n+1) = a(n) + 2n + 1. - Ralf Stephan, Oct 11 2003

Extensions

Keyword tabf added by Reinhard Zumkeller, Jan 22 2012

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

A122800 A P_4-stuttered arithmetic progression with a(n+1)=a(n) if n is square, a(n+1)=a(n)+2 otherwise.

Original entry on oeis.org

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

Views

Author

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

Keywords

Comments

P_4(i) = the i-th square.

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[IntegerQ[Sqrt[n+1]],a,a+2]}; NestList[nxt,{0,1},100][[All,2]] (* Harvey P. Dale, Jan 01 2020 *)
  • PARI
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! issquare(i), aa = aa + 2););} \\ Michel Marcus, Apr 01 2013

Formula

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

A190717 Triplicated tetrahedral numbers A000292.

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 10, 10, 10, 20, 20, 20, 35, 35, 35, 56, 56, 56, 84, 84, 84, 120, 120, 120, 165, 165, 165, 220, 220, 220, 286, 286, 286, 364, 364, 364, 455, 455, 455, 560, 560, 560, 680, 680, 680, 816, 816, 816, 969, 969, 969
Offset: 0

Views

Author

Johannes W. Meijer, May 18 2011

Keywords

Comments

The Ca1 and Ze3 triangle sums, see A180662 for their definitions, of the triangle A159797 are linear sums of shifted versions of the triplicated tetrahedral numbers, e.g. Ca1(n) = a(n-1) + a(n-2) + 2*a(n-3) + a(n-6).
The Ca1, Ca2, Ze3 and Ze4 triangle sums of the Connell sequence A001614 as a triangle are also linear sums of shifted versions of the sequence given above.

Crossrefs

Cf. A000292 (tetrahedral numbers), A058187 (duplicated), this sequence (triplicated), A190718 (quadruplicated), A049347, A144677.

Programs

  • Maple
    A190717:= proc(n) option remember; A190717(n):= binomial(floor(n/3)+3,3) end: seq(A190717(n),n=0..50);
  • Mathematica
    LinearRecurrence[{1,0,3,-3,0,-3,3,0,1,-1},{1,1,1,4,4,4,10,10,10,20},60] (* Harvey P. Dale, Mar 09 2018 *)

Formula

a(n) = binomial(floor(n/3)+3,3).
a(n) + a(n-1) + a(n-2) = A144677(n).
a(n) = Sum_{k=0..n} (A144677(n-k)*A049347(k)).
G.f.: 1/((x-1)^4*(x^2+x+1)^3).
Sum_{n>=0} 1/a(n) = 9/2. - Amiram Eldar, Aug 18 2022

A190718 Quadruplicated tetrahedral numbers A000292.

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 4, 4, 10, 10, 10, 10, 20, 20, 20, 20, 35, 35, 35, 35, 56, 56, 56, 56, 84, 84, 84, 84, 120, 120, 120, 120, 165, 165, 165, 165, 220, 220, 220, 220, 286, 286, 286, 286, 364, 364, 364, 364, 455, 455, 455, 455
Offset: 0

Views

Author

Johannes W. Meijer, May 18 2011

Keywords

Comments

The Gi1 triangle sums, for the definitions of these and other triangle sums see A180662, of the triangle A159797 are linear sums of shifted versions of the quadruplicated tetrahedral numbers A000292, i.e., Gi1(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) + a(n-8).
The Gi1 and Gi2 triangle sums of the Connell sequence A001614 as a triangle are also linear sums of shifted versions of the sequence given above.

Crossrefs

Cf. A000292 (tetrahedral numbers), A058187 (duplicated), A190717 (triplicated).

Programs

  • Maple
    A190718:= proc(n) binomial(floor(n/4)+3,3) end:
    seq(A190718(n),n=0..52);
  • Mathematica
    LinearRecurrence[{1,0,0,3,-3,0,0,-3,3,0,0,1,-1},{1,1,1,1,4,4,4,4,10,10,10,10,20},60] (* Harvey P. Dale, Oct 20 2012 *)

Formula

a(n) = binomial(floor(n/4)+3,3).
a(n-3) + a(n-2) + a(n-1) + a(n) = A144678(n).
a(n) = +a(n-1) +3*a(n-4) -3*a(n-5) -3*a(n-8) +3*a(n-9) +a(n-12) -a(n-13).
G.f.: 1 / ( (1+x)^3*(1+x^2)^3*(x-1)^4 ).
Sum_{n>=0} 1/a(n) = 6. - Amiram Eldar, Aug 18 2022

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).
Previous Showing 11-20 of 37 results. Next