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.

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

A152204 Triangle read by rows: T(n,k) = 2*n-4*k+5 (n >= 0, 1 <= k <= 1+floor(n/2)).

Original entry on oeis.org

1, 3, 5, 1, 7, 3, 9, 5, 1, 11, 7, 3, 13, 9, 5, 1, 15, 11, 7, 3, 17, 13, 9, 5, 1, 19, 15, 11, 7, 3, 21, 17, 13, 9, 5, 1, 23, 19, 15, 11, 7, 3, 25, 21, 17, 13, 9, 5, 1, 27, 23, 19, 15, 11, 7, 3, 29, 25, 21, 17, 13, 9, 5, 1, 31, 27, 23, 19, 15, 11, 7, 3, 33
Offset: 0

Views

Author

Gary W. Adamson, Nov 29 2008

Keywords

Comments

All terms are odd, decreasing across rows. Row sums = A000217, the triangular numbers.
From Johannes W. Meijer, Sep 08 2013: (Start)
Triangle read by rows formed from the antidiagonals of triangle A099375.
The alternating row sums equal A098181(n). (End)

Examples

			First few rows of the triangle:
  1
  3
  5  1
  7  3
  9  5  1
  11 7  3
  13 9  5  1
  15 11 7  3
  17 13 9  5 1
  19 15 11 7 3
  21 17 13 9 5 1
  ...
		

Crossrefs

Cf. A000217.

Programs

  • Maple
    T := proc(n,k) return 2*n-4*k+5: end: seq(seq(T(n,k), k=1..1+floor(n/2)), n=0..20); # Nathaniel Johnston, May 01 2011

Formula

By columns, odd terms in every column, n-th column starts at row (2*n).
From Johannes W. Meijer, Sep 08 2013: (Start)
T(n, k) = A099375(n-k+1, k-1), n >= 0 and 1 <= k <= 1+floor(n/2).
T(n, k) = A158405(n+1, n-2*k+2). (End)

Extensions

Edited by N. J. A. Sloane, Sep 25 2010, following a suggestion from Emeric Deutsch
Offset corrected by Johannes W. Meijer, Sep 07 2013

A174882 A (3/2,-1) Somos-4 sequence.

Original entry on oeis.org

1, 1, -2, -8, -16, -16, 32, 128, 256, 256, -512, -2048, -4096, -4096, 8192, 32768, 65536, 65536, -131072, -524288, -1048576, -1048576, 2097152, 8388608, 16777216, 16777216, -33554432, -134217728, -268435456, -268435456
Offset: 0

Views

Author

Paul Barry, Mar 31 2010

Keywords

Comments

Hankel transform of A051286. a(n+2) = -(-1)^floor(n/4) * 2^A098181(n).

Examples

			G.f. = 1 + x - 2*x^2 - 8*x^3 - 16*x^4 - 16*x^5 + 32*x^6 + 128*x^7 + ...
		

Crossrefs

Programs

  • Magma
    Q:=Rationals(); R:=PowerSeriesRing(Q, 40); Coefficients(R!((1-2*x)*(4*x^2+3*x+1)/(1+16*x^4))) // G. C. Greubel, Feb 21 2018
  • Mathematica
    a[ n_] := (-1)^Quotient[n + 2, 4] 2^(n - Mod[ Quotient[n + 1, 2], 2]); (* Michael Somos, Sep 18 2014 *)
    CoefficientList[Series[(1-2*x)*(4*x^2+3*x+1)/(1+16*x^4), {x,0,50}], x] (* G. C. Greubel, Feb 21 2018 *)
  • PARI
    {a(n) = (-1)^((n+2) \ 4) * 2^(n - ((n+1) \ 2 % 2))}; /* Michael Somos, Jan 06 2011 */
    
  • PARI
    x='x+O('x^30); Vec((1-2*x)*(4*x^2+3*x+1)/(1+16*x^4)) \\ G. C. Greubel, Feb 21 2018
    

Formula

a(n) = ((3/2)*a(n-1)*a(n-3) - a(n-2)^2)/a(n-4), n>3.
a(-n) = a(n-1) / 2^(2*n - 1) for all n in Z. - Michael Somos, Jan 06 2011
0 = a(n)*(+2*a(n+4)) + a(n+1)*(-3*a(n+3)) + a(n+2)*(+2*a(n+2)) for all n in Z. - Michael Somos, Sep 18 2014
a(n+4) = -16 * a(n) for all n in Z. - Michael Somos, Sep 02 2015
G.f.: -(2*x-1)*(4*x^2+3*x+1)/(1+16*x^4) . - R. J. Mathar, Aug 18 2017

A386820 a(n) is the size of largest subset of {1, 1/2, ..., 1/n} that can be partitioned into two parts, the sum of elements of which are equal.

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 6, 6, 6, 9, 9, 9, 11, 11, 11, 14, 14, 14
Offset: 1

Views

Author

Yifan Xie, Aug 03 2025

Keywords

Examples

			For a(6) = 4, the set {1, 1/2, 1/3, 1/6} is chosen because 1 = 1/2 + 1/3 + 1/6.
The two parts for a(18) = 11 are 1 + 1/5 + 1/6 + 1/15 = 1/2 + 1/3 + 1/4 + 1/9 + 1/10 + 1/12 + 1/18.
The two parts for a(20) = 11 are 1 + 1/9 + 1/10 + 1/15 + 1/18 = 1/2 + 1/3 + 1/5 + 1/6 + 1/12 + 1/20.
		

Crossrefs

Formula

a(n) = a(n-1) if n/k = p is a prime and p > A001008(k).

A116188 Triangle T(n,k), 0<=k<=n : T(n,k)is smallest number such that T(n,k)>=T(n-1,k-1), T(n,k)>=T(n-1,k), T(n,k)and T(n-1,k-1)+T(n-1,k) have the same parity, T(0,0)=1 .

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 4, 1, 1, 5, 4, 4, 5, 1, 1, 6, 5, 4, 5, 6, 1, 1, 7, 7, 5, 5, 7, 7, 1, 1, 8, 8, 8, 6, 8, 8, 8, 1, 1, 9, 8, 8, 8, 8, 8, 8, 9, 1, 1, 10, 9, 8, 8, 8, 8, 8, 9, 10, 1, 1, 11, 11, 9, 8, 8, 8, 8, 9, 11, 11, 1, 1, 12, 12, 12, 9, 8, 8, 8, 9, 12, 12, 12, 1, 1, 13, 12, 12, 13, 9
Offset: 0

Views

Author

Philippe Deléham, Apr 08 2007

Keywords

Comments

Sequence read mod 2 gives A047999 .

Examples

			Triangle begins:
1;
1, 1;
1, 2, 1;
1, 3, 3, 1;
1, 4, 4, 4, 1;
1, 5, 4, 4, 5, 1;
1, 6, 5, 4, 5, 6, 1;
1, 7, 7, 5, 5, 7, 7, 1;
1, 8, 8, 8, 6, 8, 8, 8, 1;
1, 9, 8, 8, 8, 8, 8, 8, 9, 1;
		

Crossrefs

Showing 1-5 of 5 results.