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

A077221 a(0) = 0 and then alternately even and odd numbers in increasing order such that the sum of any two successive terms is a square.

Original entry on oeis.org

0, 1, 8, 17, 32, 49, 72, 97, 128, 161, 200, 241, 288, 337, 392, 449, 512, 577, 648, 721, 800, 881, 968, 1057, 1152, 1249, 1352, 1457, 1568, 1681, 1800, 1921, 2048, 2177, 2312, 2449, 2592, 2737, 2888, 3041, 3200, 3361, 3528, 3697, 3872, 4049, 4232
Offset: 0

Views

Author

Amarnath Murthy, Nov 03 2002

Keywords

Comments

This sequence arises from reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 8, ..., in the square spiral whose vertices are the triangular numbers A000217. Cf. A139591, etc. - Omar E. Pol, May 03 2008
The general formula for alternating sums of powers of odd integers is in terms of the Swiss-Knife polynomials P(n,x) A153641 (P(n,0)-(-1)^k*P(n,2*k))/2. Here n=2, thus a(k) = |(P(2,0)-(-1)^k*P(2,2*k))/2|. - Peter Luschny, Jul 12 2009
Axis perpendicular to A046092 in the square spiral whose vertices are the triangular numbers A000217. See the comment above. - Omar E. Pol, Sep 14 2011
Column 8 of A195040. - Omar E. Pol, Sep 28 2011
Concentric octagonal numbers. A139098 and A069129 interleaved. - Omar E. Pol, Sep 17 2011
Subsequence of A194274. - Bruno Berselli, Sep 22 2011
Partial sums of A047522. - Reinhard Zumkeller, Jan 07 2012
Alternating sum of the first n odd squares in decreasing order, n >= 1. Also number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton. The rules are: on the infinite square grid, start with all cells OFF, so a(0) = 0. Turn a single cell to the ON state, so a(1) = 1. At each subsequent step, the neighbor cells of each cell of the old generation are turned ON, and the cells of the old generation are turned OFF. Here "neighbor" refers to the eight adjacent cells of each ON cell. See example. - Omar E. Pol, Feb 16 2014

Examples

			From _Omar E. Pol_, Feb 16 2014: (Start)
Illustration of initial terms as a cellular automaton:
.
.                                   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       8           17              32
.
(End)
		

Crossrefs

Programs

Formula

a(2n) = 8*n^2, a(2n+1) = 8*n(n+1) + 1.
From Ralf Stephan, Mar 31 2003: (Start)
a(n) = 2*n^2 + 4*n + 1 [+1 if n is odd] with a(0)=1.
G.f.: x*(x^2+6*x+1)/(1-x)^3/(1+x). (End)
Row sums of triangle A131925; binomial transform of (1, 7, 2, 4, -8, 16, -32, ...). - Gary W. Adamson, Jul 29 2007
a(n) = a(-n); a(n+1) = A195605(n) - (-1)^n. - Bruno Berselli, Sep 22 2011
a(n) = 2*n^2 + ((-1)^n-1)/2. - Omar E. Pol, Sep 28 2011
Sum_{n>=1} 1/a(n) = Pi^2/48 + tan(Pi/(2*sqrt(2)))*Pi /(4*sqrt(2)). - Amiram Eldar, Jan 16 2023

Extensions

Extended by Ralf Stephan, Mar 31 2003

A047524 Numbers that are congruent to {2, 7} mod 8.

Original entry on oeis.org

2, 7, 10, 15, 18, 23, 26, 31, 34, 39, 42, 47, 50, 55, 58, 63, 66, 71, 74, 79, 82, 87, 90, 95, 98, 103, 106, 111, 114, 119, 122, 127, 130, 135, 138, 143, 146, 151, 154, 159, 162, 167, 170, 175, 178, 183, 186, 191, 194, 199, 202, 207, 210, 215, 218, 223, 226, 231, 234
Offset: 1

Views

Author

Keywords

Comments

A195605 is a subsequence. - Bruno Berselli, Sep 21 2011

Crossrefs

Programs

  • GAP
    Filtered([0..250],n->n mod 8=2 or n mod 8=7); # Muniru A Asiru, Aug 06 2018
    
  • Maple
    seq(coeff(series(x*(2+5*x+x^2)/((1+x)*(1-x)^2), x,n+1),x,n),n=1..60); # Muniru A Asiru, Aug 06 2018
  • Mathematica
    Select[Range[300],MemberQ[{2,7},Mod[#,8]]&] (* or *)
    LinearRecurrence[ {1,1,-1},{2,7,10},60] (* Harvey P. Dale, Nov 05 2017 *)
    CoefficientList[ Series[(x^2 + 5x + 2)/((x - 1)^2 (x + 1)), {x, 0, 60}], x] (* Robert G. Wilson v, Aug 07 2018 *)
  • Maxima
    makelist(4*n - mod(n,2) - 1, n, 1, 100); /* Franck Maminirina Ramaharo, Aug 06 2018 */
    
  • PARI
    is(n) = #setintersect([n%8], [2, 7]) > 0 \\ Felix Fröhlich, Aug 06 2018
    
  • Python
    def A047524(n): return (n<<2)-1-(n&1) # Chai Wah Wu, Mar 30 2024

Formula

a(n) = 8*n - a(n-1) - 7, n > 1. - Vincenzo Librandi, Aug 06 2010
From R. J. Mathar, Mar 22 2011: (Start)
a(n) = 4*n - 3/2 + (-1)^n/2.
G.f.: x*(2+5*x+x^2) / ( (1+x)*(x-1)^2 ). (End)
From Franck Maminirina Ramaharo, Aug 06 2018: (Start)
a(n) = 4*n - (n mod 2) - 1.
a(n) = A047615(n) + 2.
a(2*n) = A004771(n-1).
a(2*n-1) = A017089(n-1).
E.g.f.: ((8*x - 3)*exp(x) + exp(-x) + 2)/2. (End)
a(n) = a(n-1) + a(n-2) - a(n-3). - Muniru A Asiru, Aug 06 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+2)*Pi/16 - log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A077591 Maximum number of regions into which the plane can be divided using n (concave) quadrilaterals.

Original entry on oeis.org

1, 2, 18, 50, 98, 162, 242, 338, 450, 578, 722, 882, 1058, 1250, 1458, 1682, 1922, 2178, 2450, 2738, 3042, 3362, 3698, 4050, 4418, 4802, 5202, 5618, 6050, 6498, 6962, 7442, 7938, 8450, 8978, 9522, 10082, 10658, 11250, 11858, 12482, 13122, 13778
Offset: 0

Views

Author

Joshua Zucker and the Castilleja School MathCounts club, Nov 07 2002

Keywords

Comments

Sequence found by reading the segment (1, 2) together with the line from 2, in the direction 2, 18, ..., in the square spiral whose vertices are the triangular numbers A000217. - Omar E. Pol, Sep 05 2011
For a(n) > 1, a(n) are the numbers such that phi(sum of the odd divisors of a(n)) = phi(sum of even divisors of a(n)). - Michel Lagneau, Sep 14 2011
Apart from first term, subsequence of A195605. - Bruno Berselli, Sep 21 2011
Engel expansion of 1F2(1; 1/2, 1/2; 1/8). - Benedict W. J. Irwin, Jun 21 2018
Let f(n) = 4*n^2 - 5, then (x, y, z) = (a(n+1), -f(n), -f(n + 1)) are solutions of the Diophantine equation x^3 + 4*y^3 + 4*z^3 = 512. - XU Pingya, Apr 25 2022

Examples

			a(2) = 18 if you draw two concave quadrilaterals such that all four sides of one cross all four sides of the other.
		

Crossrefs

Programs

  • GAP
    Concatenation([1], List([1..2000], n->8*n^2 - 8*n + 2)); # Muniru A Asiru, Jan 29 2018
  • Maple
    A077591:=n->`if`(n=0, 1, 8*n^2 - 8*n + 2); seq(A077591(n), n=0..50); # Wesley Ivan Hurt, Mar 12 2014
  • Mathematica
    Table[2*(4*n^2 - 4*n + 1), {n,0,50}] (* G. C. Greubel, Jul 15 2017 *)
  • PARI
    isok(n) = (sod = sumdiv(n, d, (d%2)*d)) && (sed = sumdiv(n, d, (1 - d%2)*d)) && (eulerphi(sod) == eulerphi(sed)); \\ from Michel Lagneau comment; Michel Marcus, Mar 15 2014
    

Formula

a(n) = 8*n^2 - 8*n + 2 = 2*(2*n-1)^2, n > 0, a(0)=1.
Proof from Keyang Li, Jun 18 2022: (Start)
Represent the configuration of n concave quadrilaterals by a planar graph with a node for each vertex of the quadrilaterals and for each intersection point. Let there be v_n nodes and e_n edges. By Euler's formula for planar graphs, a(n) = e_n - v_n + 2. When we go from n to n+1 quadrilaterals, each side of the new quadrilateral can meet each side of the existing quadrilaterals at most 4 times, so Dv_n := v_{n+1} - v_n <= 4*4n = 16n.
Each of these intersection points increases the number of edges in the graph by 2, so De_n := e_{n+1} - e_n = 4 + 2*Dv_n, Da_n := a(n+1) - a(n) = 4 + Dv_n <= 4+16*n.
These upper bounds can be achieved by taking n interwoven concave quadrilaterals (for n=1,2,3 see the attached Keyang Li links), and we achieve a(n) = 8n^2 - 8n + 2 (and v_n = 8n^2 - 4n, e_n = 4n*(4n-3)) for n > 0. QED (End)
For n > 0: A071974(a(n)) = 2*n+1, A071975(a(n)) = 2. - Reinhard Zumkeller, Jul 10 2011
a(n) = 1 + A069129(n), if n >= 1. - Omar E. Pol, Sep 05 2011
a(n) = 2*A016754(n-1), if n >= 1. - Omar E. Pol, Sep 05 2011
G.f.: (1 - x + 15*x^2 + x^3)/(1-x)^3. - Colin Barker, Feb 23 2012
E.g.f.: (8*x^2 + 2)*exp(x) - 1. - G. C. Greubel, Jul 15 2017
From Amiram Eldar, Jan 29 2021: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/16.
Sum_{n>=1} (-1)^(n+1)/a(n) = G/2, where G is Catalan constant (A006752).
Product_{n>=1} (1 + 1/a(n)) = cosh(Pi/sqrt(8)).
Product_{n>=1} (1 - 1/a(n)) = cos(Pi/sqrt(8)). (End)

A157914 a(n) = 8*n^2 - 1.

Original entry on oeis.org

7, 31, 71, 127, 199, 287, 391, 511, 647, 799, 967, 1151, 1351, 1567, 1799, 2047, 2311, 2591, 2887, 3199, 3527, 3871, 4231, 4607, 4999, 5407, 5831, 6271, 6727, 7199, 7687, 8191, 8711, 9247, 9799, 10367, 10951, 11551, 12167, 12799, 13447, 14111, 14791
Offset: 1

Views

Author

Vincenzo Librandi, Mar 09 2009

Keywords

Comments

The identity (8*n^2 - 1)^2 - (16*n^2 - 4)*(2*n)^2 = 1 can be written as a(n)^2 - A158443(n)*A005843(n)^2 = 1.
Sequence found by reading the line from 7, in the direction 7, 31, ..., in the square spiral whose vertices are the triangular numbers A000217. - Omar E. Pol, Sep 03 2011
Bisection of A195605 (odd part). - Bruno Berselli, Sep 21 2011
The identity (8*n^2 - 1)^2 - (64*n^2 - 16)*(n)^2 = 1 can be written as a(n)^2 - A157913(n)*(n)^2 = 1. - Vincenzo Librandi, Feb 09 2012

Crossrefs

Programs

  • Magma
    I:=[7, 31, 71]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]];
    
  • Mathematica
    Table[8n^2-1,{n,50}]
    LinearRecurrence[{3,-3,1},{7,31,71},50] (* Harvey P. Dale, Jul 16 2025 *)
  • PARI
    a(n)=8*n^2-1 \\ Charles R Greathouse IV, Sep 03 2011

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f: x*(7+10*x-x^2)/(1-x)^3.
a(n) = A139098(n) - 1. - Omar E. Pol, Sep 03 2011
E.g.f.: (8*x^2 + 8*x - 1)*exp(x) + 1. - G. C. Greubel, Jul 15 2017
From Amiram Eldar, Feb 04 2021: (Start)
Sum_{n>=1} 1/a(n) = (1 - (Pi/sqrt(8))*cot(Pi/sqrt(8)))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = ((Pi/sqrt(8))*csc(Pi/sqrt(8)) - 1)/2.
Product_{n>=1} (1 + 1/a(n)) = (Pi/sqrt(8))*csc(Pi/sqrt(8)).
Product_{n>=1} (1 - 1/a(n)) = csc(Pi/sqrt(8))/sqrt(2). (End)

A195241 Expansion of (1-x+19*x^3-3*x^4)/(1-x)^3.

Original entry on oeis.org

1, 2, 3, 23, 59, 111, 179, 263, 363, 479, 611, 759, 923, 1103, 1299, 1511, 1739, 1983, 2243, 2519, 2811, 3119, 3443, 3783, 4139, 4511, 4899, 5303, 5723, 6159, 6611, 7079, 7563, 8063, 8579, 9111, 9659, 10223, 10803, 11399, 12011, 12639, 13283, 13943
Offset: 0

Views

Author

Bruno Berselli, Sep 13 2011 - based on remarks and sequences by Omar E. Pol

Keywords

Comments

Sequence found by reading the line 1, 2, 3, 23,.. in the square spiral whose vertices are the triangular numbers (A000217) - see Pol's comments in other sequences visible in this numerical spiral.
This is a subsequence of A110326 (without signs) and A047838 (apart from the second term, 2).

Crossrefs

Programs

  • Magma
    m:=44; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+19*x^3-3*x^4)/(1-x)^3));
    
  • Mathematica
    CoefficientList[Series[(1 - x + 19 x^3 - 3 x^4)/(1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{3,-3,1},{1,2,3,23,59},50] (* Harvey P. Dale, Dec 04 2022 *)
  • Maxima
    makelist(coeff(taylor((1-x+19*x^3-3*x^4)/(1-x)^3, x, 0, n), x, n), n, 0, 43);
  • PARI
    Vec((1-x+19*x^3-3*x^4)/(1-x)^3+O(x^44))
    

Formula

G.f.: (1-x+19*x^3-3*x^4)/(1-x)^3.
a(n) = 8*n^2-20*n+11 for n>1; a(0)=1, a(1)=2.

A347533 Array A(n,k) where A(n,0) = n and A(n,k) = (k*n + 1)^2 - A(n,k-1), n > 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 3, 3, 7, 6, 4, 13, 18, 10, 5, 21, 36, 31, 15, 6, 31, 60, 64, 50, 21, 7, 43, 90, 109, 105, 71, 28, 8, 57, 126, 166, 180, 151, 98, 36, 9, 73, 168, 235, 275, 261, 210, 127, 45, 10, 91, 216, 316, 390, 401, 364, 274, 162, 55, 11, 111, 270, 409, 525, 571, 560, 477, 351, 199, 66
Offset: 1

Views

Author

Lamine Ngom, Sep 05 2021

Keywords

Comments

A(n,k) is also the distance from A(n, k-1) to the earliest square greater than 3*A(n,k-1) - A(n,k-2).
In column k, every term is the arithmetic mean of its neighbors minus A000217(k).

Examples

			Array, A(n, k), begins:
  1  3   6  10  15   21   28   36   45 ... A000217;
  2  7  18  31  50   71   98  127  162 ... A195605;
  3 13  36  64 105  151  210  274  351 ...
  4 21  60 109 180  261  364  477  612 ...
  5 31  90 166 275  401  560  736  945 ...
  6 43 126 235 390  571  798 1051 1350 ...
  7 57 168 316 525  771 1078 1422 1827 ...
  8 73 216 409 680 1001 1400 1849 2376 ...
  9 91 270 514 855 1261 1764 2332 2997 ...
Antidiagonals, T(n, k), begin as:
   1;
   2,  3;
   3,  7,   6;
   4, 13,  18,  10;
   5, 21,  36,  31,  15;
   6, 31,  60,  64,  50,  21;
   7, 43,  90, 109, 105,  71,  28;
   8, 57, 126, 166, 180, 151,  98,  36;
   9, 73, 168, 235, 275, 261, 210, 127,  45;
  10, 91, 216, 316, 390, 401, 364, 274, 162,  55;
		

Crossrefs

Family of sequences (k*n + 1)^2: A016754 (k=2), A016778 (k=3), A016814 (k=4), A016862 (k=5), A016922 (k=6), A016994 (k=7), A017078 (k=8), A017174 (k=9), A017282 (k=10), A017402 (k=11), A017534 (k=12), A134934 (k=14).

Programs

  • Magma
    A347533:= func< n,k | (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1)) >;
    [A347533(n,k): k in [0..n-1], n in [1..13]]; // G. C. Greubel, Dec 25 2022
    
  • Mathematica
    A[n_, 0]:= n; A[n_, k_]:= (k*n+1)^2 -A[n,k-1]; Table[Function[n, A[n, k]][m-k+1], {m,0,10}, {k,0,m}]//Flatten (* Michael De Vlieger, Oct 27 2021 *)
  • SageMath
    def A347533(n,k): return (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1))
    flatten([[A347533(n,k) for k in range(n)] for n in range(1,14)]) # G. C. Greubel, Dec 25 2022

Formula

A(n,k) = A000217(k)*n^2 + k*n + 1, for k odd.
A(n,k) = A000217(k)*n^2 + (k+1)*n = (k+1)*x*(k*n/2 + 1), for k even.
A(n,k) = (A(n,k-1) + A(n,k+1) + k*(k+1))/2, for any k.
A(n, 0) = A000027(n).
A(n, 1) = A002061(n+1).
A(n, 2) = A028896(n).
A(n, 3) = A085473(n).
From G. C. Greubel, Dec 25 2022: (Start)
A(n, k) = (1/2)*( (k*n+1)*(k*n+n+1) + (-1)^k*(n-1) ).
T(n, k) = (1/2)*( (k*(n-k)+1)*((k+1)*(n-k)+1) + (-1)^k*(n-k-1) ).
Sum_{k=0..n-1} T(n, k) = (1/120)*(2*n^5 + 5*n^4 + 20*n^3 + 25*n^2 + 98*n - 15*(1-(-1)^n)). (End)
Showing 1-6 of 6 results.