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

A147874 a(n) = (5*n-7)*(n-1).

Original entry on oeis.org

0, 3, 16, 39, 72, 115, 168, 231, 304, 387, 480, 583, 696, 819, 952, 1095, 1248, 1411, 1584, 1767, 1960, 2163, 2376, 2599, 2832, 3075, 3328, 3591, 3864, 4147, 4440, 4743, 5056, 5379, 5712, 6055, 6408, 6771, 7144, 7527, 7920, 8323, 8736, 9159, 9592, 10035
Offset: 1

Views

Author

Keywords

Comments

Zero followed by partial sums of A017305.
Appears to be related to various other sequences: a(n) = A036666(2*n-2) for n>1; a(n) = A115006(2*n-3) for n>1; a(n) = A118015(5*n-6) for n>1; a(n) = A008738(5*n-7) for n>1.
Even dodecagonal numbers divided by 4. - Omar E. Pol, Aug 19 2011

Crossrefs

Cf. A017305 (10n+3), A036666, A115006, A118015 (floor(n^2/5)), A008738 (floor((n^2+1)/5)), A294830.
Cf. A051624, A193872. - Omar E. Pol, Aug 19 2011

Programs

  • GAP
    List([1..50], n-> (5*n-7)*(n-1)); # G. C. Greubel, Jul 30 2019
  • Magma
    [ 0 ] cat [ &+[ 10*k+3: k in [0..n-1] ]: n in [1..50] ]; // Klaus Brockhaus, Nov 17 2008
    
  • Magma
    [ 5*n^2-2*n: n in [0..50] ];
    
  • Mathematica
    s=0;lst={s};Do[s+=n++ +3;AppendTo[lst,s],{n,0,6!,10}];lst
    Table[5n^2-12n+7,{n,50}] (* or *) LinearRecurrence[{3,-3,1},{0,3,16},50] (* or *) PolygonalNumber[12,Range[0,100,2]]/4 (* Harvey P. Dale, Aug 08 2021 *)
  • PARI
    {m=50; a=7; for(n=0, m, print1(a=a+10*(n-1)+3, ","))} \\ Klaus Brockhaus, Nov 17 2008
    
  • Sage
    [(5*n-7)*(n-1) for n in (1..50)] # G. C. Greubel, Jul 30 2019
    

Formula

a(n) = Sum_{k=0..n-2} 10*k+3 = Sum_{k=0..n-2} A017305(k).
G.f.: x*(3 + 7*x)/(1-x)^3.
a(n) = 10*(n-2) + 3 + a(n-1).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A193872(n-1)/4. - Omar E. Pol, Aug 19 2011
a(n+1) = A131242(10n+2). - Philippe Deléham, Mar 27 2013
E.g.f.: -7 + (7 - 7*x + 5*x^2)*exp(x). - G. C. Greubel, Jul 30 2019
Sum_{n>=2} 1/a(n) = A294830. - Amiram Eldar, Nov 15 2020
a(n) = A014105(n-1) + 3*A002378(n-2). - Leo Tavares, Mar 31 2025

Extensions

Edited by R. J. Mathar and Klaus Brockhaus, Nov 17 2008, Nov 20 2008

A265667 Permutation of nonnegative integers: a(n) = n + floor(n/3)*(-1)^(n mod 3).

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 8, 5, 10, 12, 7, 14, 16, 9, 18, 20, 11, 22, 24, 13, 26, 28, 15, 30, 32, 17, 34, 36, 19, 38, 40, 21, 42, 44, 23, 46, 48, 25, 50, 52, 27, 54, 56, 29, 58, 60, 31, 62, 64, 33, 66, 68, 35, 70, 72, 37, 74, 76, 39, 78, 80, 41, 82, 84, 43, 86, 88, 45
Offset: 0

Views

Author

Bruno Berselli, Dec 12 2015 - based on an idea by Paul Curtz

Keywords

Comments

The inverse permutation is given by P(n) = A006368(n-1) + 1, for n >= 1, and P(0) = 0. - Wolfdieter Lang, Sep 21 2021
This permutation is given by A006369(n-1) + 1, with A006369(-1) = -1. Observed by Kevin Ryde. - Wolfdieter Lang, Sep 22 2021

Examples

			-------------------------------------------------------------------------
0, 1, 2, 3,  4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
+  +  +  +   +  +  +   +   +   +   +   +   +   +   +   +   +   +   +
0, 0, 0, 1, -1, 1, 2, -2,  2,  3, -3,  3,  4, -4,  4,  5, -5,  5,  6, ...
-------------------------------------------------------------------------
0, 1, 2, 4,  3, 6, 8,  5, 10, 12,  7, 14, 16,  9, 18, 20, 11, 22, 24, ...
-------------------------------------------------------------------------
		

Crossrefs

Cf. A064455: n+floor(n/2)*(-1)^(n mod 2).
Cf. A265888: n+floor(n/4)*(-1)^(n mod 4).
Cf. A265734: n+floor(n/5)*(-1)^(n mod 5).

Programs

  • Magma
    [n+Floor(n/3)*(-1)^(n mod 3): n in [0..70]];
  • Mathematica
    Table[n + Floor[n/3] (-1)^Mod[n, 3], {n, 0, 70}]
  • Sage
    [n+floor(n/3)*(-1)^mod(n,3) for n in (0..70)]
    

Formula

G.f.: x*(1 + 2*x + 4*x^2 + x^3 + 2*x^4) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6).
a(3*k) = 4*k;
a(3*k+1) = 2*k+1, hence a(3*k+1) = a(3*k)/2 + 1;
a(3*k+2) = 4*k+2, hence a(3*k+2) = 2*a(3*k+1) = a(3*k) + 2.
Sum_{i=0..n} a(i) = A008738(A032793(n+1)).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Mar 30 2023

A173690 Partial sums of round(n^2/5).

Original entry on oeis.org

0, 0, 1, 3, 6, 11, 18, 28, 41, 57, 77, 101, 130, 164, 203, 248, 299, 357, 422, 494, 574, 662, 759, 865, 980, 1105, 1240, 1386, 1543, 1711, 1891, 2083, 2288, 2506, 2737, 2982, 3241, 3515, 3804, 4108, 4428, 4764, 5117, 5487, 5874, 6279, 6702, 7144, 7605, 8085, 8585
Offset: 0

Views

Author

Mircea Merca, Nov 25 2010

Keywords

Comments

Partial sums of A008738.

Examples

			a(5) = round(1/5) + round(4/5) + round(9/5) + round(16/5) + round(25/5) = 0 + 1 + 2 + 3 + 5 = 11.
		

Crossrefs

Cf. A008738.

Programs

  • Maple
    A173690 := proc(n) add( round(i^2/5),i=0..n) ; end proc: # R. J. Mathar, Jan 10 2011
  • Mathematica
    Accumulate[Round[Range[0,50]^2/5]] (* or *) LinearRecurrence[{3,-3,1,0,1,-3,3,-1},{0,0,1,3,6,11,18,28},60] (* Harvey P. Dale, Mar 16 2022 *)
  • PARI
    a(n)=(2*n^3+3*n^2+n+6)\30 \\ Charles R Greathouse IV, May 30 2011

Formula

a(n) = Sum_{k=0..n} round(k^2/5);
a(n) = round((2*n^3 + 3*n^2 + n)/30);
a(n) = floor((2*n^3 + 3*n^2 + n + 6)/30);
a(n) = ceiling((2*n^3 + 3*n^2 + n - 6)/30);
a(n) = a(n-5) + (n-2)^2 + 2, n > 4;
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-5) - 3*a(n-6) + 3*a(n-7) - a(n-8), n > 7.
G.f.: x^2*(x+1)*(x^2 - x + 1) / ( (x^4 + x^3 + x^2 + x + 1)*(x-1)^4 ).
Showing 1-3 of 3 results.