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

A143689 a(n) = (3*n^2 - n + 2)/2.

Original entry on oeis.org

1, 2, 6, 13, 23, 36, 52, 71, 93, 118, 146, 177, 211, 248, 288, 331, 377, 426, 478, 533, 591, 652, 716, 783, 853, 926, 1002, 1081, 1163, 1248, 1336, 1427, 1521, 1618, 1718, 1821, 1927, 2036, 2148, 2263, 2381, 2502, 2626, 2753, 2883, 3016, 3152, 3291
Offset: 0

Views

Author

Gary W. Adamson, Aug 29 2008

Keywords

Comments

Equals left border of triangle A033292.
Equals binomial transform of [1, 1, 3, 0, 0, 0, ...].
A242357(a(n)) = 1. - Reinhard Zumkeller, May 11 2014
These might be called "trisected pentagonal numbers": A figurate pentagonal number is composed of three triangles, of which the central one is the largest, and the removal of the triangular frame (3*n) of the central triangle trisects the figure. This is reflected in the formula a(n) = A000326(n+1) - 3*n. See illustration in links. - John Elias, May 27 2022

Crossrefs

a(n) = A000326(n+1) - 3n. Third column of A107111.

Programs

Formula

a(n) = A000326(n+1) - 3*n. (A000326 are the pentagonal numbers.)
a(n) = (3*n^2 - n + 2)/2 = A027599(n+1)/2. - R. J. Mathar, Sep 03 2008
a(n) = a(n-1) + 3*n - 2 (with a(0)=1). - Vincenzo Librandi, Nov 25 2010
a(n) = 2*a(n-1) - a(n-2) + 3.
O.g.f.: (1-x+3*x^2)/((1-x)^3). - Eric Werley, Jun 27 2011
a(n) = A104249(-n). - Bruno Berselli, Jul 08 2015
a(n) = binomial(n,2) + n^2 + 1 = A152947(n+1) + A000290(n). - Franck Maminirina Ramaharo, Mar 01 2018
E.g.f.: exp(x)*(2 + 2*x + 3*x^2)/2. - Stefano Spezia, Apr 19 2025

Extensions

Index of A000326 in definition, formula and example corrected by R. J. Mathar, Sep 03 2008

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

A033291 A Connell-like sequence: take the first multiple of 1, the next 2 multiples of 2, the next 3 multiples of 3, etc.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 28, 30, 35, 40, 45, 50, 54, 60, 66, 72, 78, 84, 91, 98, 105, 112, 119, 126, 133, 136, 144, 152, 160, 168, 176, 184, 192, 198, 207, 216, 225, 234, 243, 252, 261, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 374, 385, 396, 407, 418, 429, 440, 451, 462
Offset: 1

Views

Author

Keywords

Comments

Row sums are 0, 1, 6, 27, 88, 200, ... with g.f. -x*(1 + 4*x + 16*x^2 + 37*x^3 + 39*x^4 + 54*x^5 + 39*x^6 + 17*x^7 + 8*x^8 + x^9) / ( (1 + x + x^2)^3*(x-1)^5 ). - R. J. Mathar, Aug 10 2017

Examples

			Triangle begins
   1;
   2,  4;
   6,  9,  12;
  16, 20,  24,  28;
  30, 35,  40,  45,  50;
  54, 60,  66,  72,  78,  84;
  91, 98, 105, 112, 119, 126, 133; ...
		

Crossrefs

Cf. A192735 (left edge), A192736 (right edge).

Programs

  • Haskell
    a033291 n k = a033291_tabl !! (n-1) !! (k-1)
    a033291_row n = a033291_tabl !! (n-1)
    a033291_tabl = f 1 [1..] where
       f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where
         ys  = take k $ filter ((== 0) . (`mod` k)) xs
    a192735 n = head $ a033291_tabl !! (n-1)
    a192736 n = last $ a033291_tabl !! (n-1)
    -- Reinhard Zumkeller, Jan 18 2012, Jul 08 2011
    
  • Maple
    A033291 := proc(n,k)
        A192735(n)+(k-1)*n ;
    end proc:
    seq(seq(A033291(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Aug 10 2017
  • Mathematica
    Flatten[ Table[ n*(Floor[ (n-1)^2/3] + k), {n, 1, 12}, {k, 1, n}]] (* Jean-François Alcover, Sep 30 2011 *)
  • PARI
    a(n)=my(q=(sqrtint(8*n-7)+1)\2); q*n-q*(q+1)\6*q \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) = q(n)*n - q(n)*floor(q(n)*(q(n)+1)/6) with q(n) = ceiling((1/2)*(-1 + sqrt(1+8*(n)))).

Extensions

Corrected and formula added by Johannes W. Meijer, Oct 07 2010

A136392 a(n) = 6*n^2 - 10*n + 5.

Original entry on oeis.org

1, 9, 29, 61, 105, 161, 229, 309, 401, 505, 621, 749, 889, 1041, 1205, 1381, 1569, 1769, 1981, 2205, 2441, 2689, 2949, 3221, 3505, 3801, 4109, 4429, 4761, 5105, 5461, 5829, 6209, 6601, 7005, 7421, 7849, 8289, 8741, 9205, 9681, 10169, 10669, 11181, 11705, 12241
Offset: 1

Views

Author

Gary W. Adamson, Dec 28 2007

Keywords

Comments

Binomial transform of [1, 8, 12, 0, 0, 0, ...].
Numbers k such that 6*k - 5 is the square of a number of the form 6*k - 5, contained in A199859. - Eleonora Echeverri-Toro, Nov 29 2011
Central terms of the triangle A033292. - Reinhard Zumkeller, Feb 06 2012
Sequence found by reading the line from 1, in the direction 1, 9, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. - Omar E. Pol, Jul 18 2012

Crossrefs

Programs

Formula

a(n) = n*(3*n - 2) + (n-1)*(3*n - 5), n > 1.
a(n) = n*A016777(n-1) + (n-1)*A016777(n-2).
a(n) = a(n-1) + 12*n - 16 (with a(1)=1). - Vincenzo Librandi, Nov 24 2010
G.f.: x*(1+x)*(1+5*x)/(1-x)^3. - Colin Barker, Jan 09 2012
a(n) = 1 + A033580(n-1). - Omar E. Pol, Jul 18 2012
a(n) = A059722(n) - A059722(n-1). - J. M. Bergot, Nov 02 2012
a(n) = A000567(n-1) + A000567(n). - Charlie Marion, May 29 2024
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: exp(x)*(2*x*(3*x - 2) + 5) - 5.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

A143690 a(n) = A007318 * [1, 6, 14, 9, 0, 0, 0, ...].

Original entry on oeis.org

1, 7, 27, 70, 145, 261, 427, 652, 945, 1315, 1771, 2322, 2977, 3745, 4635, 5656, 6817, 8127, 9595, 11230, 13041, 15037, 17227, 19620, 22225, 25051, 28107, 31402, 34945, 38745, 42811, 47152, 51777, 56695, 61915, 67446, 73297, 79477, 85995, 92860, 100081, 107667
Offset: 0

Views

Author

Gary W. Adamson, Aug 29 2008

Keywords

Comments

Binomial transform of [1, 6, 14, 9, 0, 0, 0,...].
Row sums of triangle A033292.

Examples

			a(3) = 70 = (1, 3, 3, 1) dot (1, 6, 14, 9) = (1 + 18 + 42 + 9). a(3) = 70 = sum of row 3 terms of triangle A033292: (13 + 16 + 19, + 22).
		

Crossrefs

Cf. A226449. - Bruno Berselli, Jun 09 2013

Programs

  • Mathematica
    Table[(n+1)*(3*n^2+2*n+2)/2, {n,0,50}] (* G. C. Greubel, May 30 2021 *)
  • Sage
    [(n+1)*(3*n^2+2*n+2)/2 for n in (0..50)] # G. C. Greubel, May 30 2021

Formula

From R. J. Mathar, Aug 29 2008: (Start)
G.f.: (1 +3*x +5*x^2)/(1-x)^4.
a(n) = A002412(n+1) + 5*A000292(n-1). (End)
a(n) = A000326(n+1) + (n+1)*A000326(n). - Bruno Berselli, Jun 07 2013
From G. C. Greubel, May 30 2021: (Start)
a(n) = (n+1)*(3*n^2 +2*n +2)/2.
E.g.f.: (1/2)*(2 +12*x +14*x^2 +3*x^3)*exp(x). (End)

Extensions

Extended beyond a(14) by R. J. Mathar, Aug 29 2008
Showing 1-5 of 5 results.