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.

A152751 3 times octagonal numbers: a(n) = 3*n*(3*n-2).

Original entry on oeis.org

0, 3, 24, 63, 120, 195, 288, 399, 528, 675, 840, 1023, 1224, 1443, 1680, 1935, 2208, 2499, 2808, 3135, 3480, 3843, 4224, 4623, 5040, 5475, 5928, 6399, 6888, 7395, 7920, 8463, 9024, 9603, 10200, 10815, 11448, 12099, 12768, 13455, 14160, 14883, 15624, 16383, 17160
Offset: 0

Views

Author

Omar E. Pol, Dec 12 2008

Keywords

Comments

a(n) also can be represented as n concentric triangles (see example). - Omar E. Pol, Aug 21 2011

Examples

			From _Omar E. Pol_, Aug 21 2011: (Start)
Illustration of initial terms as concentric triangles:
.
.                                          o
.                                         o o
.                                        o   o
.                                       o     o
.                 o                    o   o   o
.                o o                  o   o o   o
.               o   o                o   o   o   o
.              o     o              o   o     o   o
.    o        o   o   o            o   o   o   o   o
.   o o      o   o o   o          o   o   o o   o   o
.           o           o        o   o           o   o
.          o o o o o o o o      o   o o o o o o o o   o
.                              o                       o
.                             o o o o o o o o o o o o o o
.
.    3            24                       63
(End)
		

Crossrefs

Cf. A033581, A085250, A152734, A194273. - Omar E. Pol, Aug 21 2011
Cf. numbers of the form n*(n*k - k + 6)/2, this sequence is the case k=18: see Comments lines of A226492.

Programs

Formula

a(n) = 9*n^2 - 6*n = 3*A000567(n) = A064201(n)/3.
a(n) = a(n-1) + 18*n - 15 with n > 0, a(0)=0. - Vincenzo Librandi, Nov 26 2010
G.f.: 3*x*(1+5*x)/(1-x)^3. - Bruno Berselli, Jan 21 2011
From Elmo R. Oliveira, Dec 25 2024: (Start)
E.g.f.: 3*exp(x)*x*(1 + 3*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3.
a(n) = n + A152995(n). (End)

A194274 Concentric square numbers (see Comments lines for definition).

Original entry on oeis.org

0, 1, 4, 8, 12, 17, 24, 32, 40, 49, 60, 72, 84, 97, 112, 128, 144, 161, 180, 200, 220, 241, 264, 288, 312, 337, 364, 392, 420, 449, 480, 512, 544, 577, 612, 648, 684, 721, 760, 800, 840, 881, 924, 968, 1012, 1057, 1104, 1152, 1200, 1249, 1300, 1352, 1404
Offset: 0

Views

Author

Omar E. Pol, Aug 20 2011

Keywords

Comments

Cellular automaton on the first quadrant of the square grid. The sequence gives the number of cells "ON" in the structure after n-th stage. A098181 gives the first differences. For a definition without words see the illustration of initial terms in the example section. For other concentric polygonal numbers see A194273, A194275 and A032528.
Also, union of A046092 and A077221, the bisections of this sequence.
Also row sums of an infinite square array T(n,k) in which column k lists 4*k-1 zeros followed by the numbers A008574 (see example).

Examples

			Using the numbers A008574 we can write:
0, 1, 4, 8, 12, 16, 20, 24, 28, 32, 36, ...
0, 0, 0, 0, 0,  1,   4,  8, 12, 16, 20, ...
0, 0, 0, 0, 0,  0,   0,  0,  0,  1,  4, ...
And so on.
===========================================
The sums of the columns give this sequence:
0, 1, 4, 8, 12, 17, 24, 32, 40, 49, 60, ...
...
Illustration of initial terms:
.                                         o o o o o o
.                             o o o o o   o         o
.                   o o o o   o       o   o   o o   o
.           o o o   o     o   o   o   o   o   o o   o
.     o o   o   o   o     o   o       o   o         o
. o   o o   o o o   o o o o   o o o o o   o o o o o o
.
. 1    4      8        12         17           24
		

Crossrefs

Programs

  • Magma
    [n le 2 select n-1 else (n-1)^2 - Self(n-2): n in [1..61]]; // G. C. Greubel, Jan 31 2024
    
  • Mathematica
    Table[Floor[3*n/4] + Floor[(n*(n + 2) + 1)/2] - Floor[(3*n + 1)/4], {n, 0, 52}] (* Arkadiusz Wesolowski, Nov 08 2011 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==n^2-a[n-2]},a,{n,60}] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,1,4,8,12},60] (* Harvey P. Dale, Sep 11 2013 *)
  • Python
    prpr = 0
    prev = 1
    for n in range(2,777):
        print(str(prpr), end=", ")
        curr = n*n - prpr
        prpr = prev
        prev = curr
    # Alex Ratushnyak, Aug 03 2012
    
  • Python
    def A194274(n): return (3*n>>2)+(n*(n+2)+1>>1)-(3*n+1>>2) # Chai Wah Wu, Jul 15 2023
    
  • SageMath
    def A194274(n): return n if n<2 else n^2 - A194274(n-2)
    [A194274(n) for n in range(41)] # G. C. Greubel, Jan 31 2024

Formula

a(n) = n^2 - a(n-2), with a(0)=0, a(1)=1. - Alex Ratushnyak, Aug 03 2012
From R. J. Mathar, Aug 22 2011: (Start)
G.f.: x*(1 + x)/((1 + x^2)*(1 - x)^3).
a(n) = (A005563(n) - A056594(n-1))/2. (End)
a(n) = a(-n-2) = (2*n*(n+2) + (1-(-1)^n)*i^(n+1))/4, where i=sqrt(-1). - Bruno Berselli, Sep 22 2011
a(n) = floor(3*n/4) + floor((n*(n+2)+1)/2) - floor((3*n+1)/4). - Arkadiusz Wesolowski, Nov 08 2011
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5), with a(0)=0, a(1)=1, a(2)=4, a(3)=8, a(4)=12. - Harvey P. Dale, Sep 11 2013
E.g.f.: (exp(x)*x*(3 + x) - sin(x))/2. - Stefano Spezia, Feb 26 2023

A194272 Array T(n,k) with 6 columns read by rows in which row n lists 3*n-2, 3*n-1, 3*n, 3*n, 3*n, 3*n.

Original entry on oeis.org

1, 2, 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 11, 12, 12, 12, 12, 13, 14, 15, 15, 15, 15, 16, 17, 18, 18, 18, 18, 19, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 31, 32, 33, 33, 33, 33, 34, 35, 36, 36, 36, 36
Offset: 1

Views

Author

Omar E. Pol, Aug 20 2011

Keywords

Comments

Also first differences of A194273 which is also a sequence related to cellular automata.

Examples

			Array begins:
1,  2,  3,  3,  3,  3,
4,  5,  6,  6,  6,  6,
7,  8,  9,  9,  9,  9,
10, 11, 12, 12, 12, 12,
13, 14, 15, 15, 15, 15,
16, 17, 18, 18, 18, 18,
19, 20, 21, 21, 21, 21,
22, 23, 24, 24, 24, 24,
...
Sum of row n gives 18*n-3 = A008600(n) - 3.
G.f. = x + 2*x^2 + 3*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 5*x^8 + ...
		

Crossrefs

Column 1: A016777. Column 2: A016789. Every column 3, 4, 5 and 6: positive integers of A008585.

Programs

  • Magma
    [Floor((n+3)/6) + Floor((n+4)/6) + Floor((n+5)/6) : n in [1..100]]; // Wesley Ivan Hurt, Apr 04 2015
    
  • Maple
    A194272:=n->floor((n+3)/6) + floor((n+4)/6) + floor((n+5)/6): seq(A194272(n), n=1..100); # Wesley Ivan Hurt, Apr 04 2015
  • Mathematica
    Table[Floor[(n + 3)/6] + Floor[(n + 4)/6] + Floor[(n + 5)/6], {n, 100}] (* Wesley Ivan Hurt, Apr 04 2015 *)
  • PARI
    x='x+O('x^60); Vec(x*(1-x^3)/((1-x)^2*(1-x^6))) \\ G. C. Greubel, Aug 13 2018

Formula

From Michael Somos, May 12 2014: (Start)
Euler transform of length 6 sequence [2, 0, -1, 0, 0, 1].
G.f.: x * (1-x^3) / ( (1-x)^2 * (1-x^6) ).
a(n-1) = A047926(n) - A132868(n). (End)
From Wesley Ivan Hurt, Apr 04 2015, Sep 08 2015: (Start)
a(n) = 2*a(n-1)-a(n-2)-a(n-3)+2*a(n-4)-a(n-5), n>5.
a(n) = floor((n+3)/6) + floor((n+4)/6) + floor((n+5)/6).
a(n) = Sum_{i=0..n-1} floor(i/6) - floor((i-3)/6). (End)
Showing 1-3 of 3 results.