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

A195605 a(n) = (4*n*(n+2)+(-1)^n+1)/2 + 1.

Original entry on oeis.org

2, 7, 18, 31, 50, 71, 98, 127, 162, 199, 242, 287, 338, 391, 450, 511, 578, 647, 722, 799, 882, 967, 1058, 1151, 1250, 1351, 1458, 1567, 1682, 1799, 1922, 2047, 2178, 2311, 2450, 2591, 2738, 2887, 3042, 3199, 3362, 3527, 3698, 3871, 4050, 4231, 4418, 4607, 4802
Offset: 0

Views

Author

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

Keywords

Comments

Sequence found by reading the numbers in increasing order on the vertical line containing 2 of the square spiral whose vertices are the triangular numbers (A000217) - see Pol's comments in other sequences visible in this numerical spiral.
Also A077591 (without first term) and A157914 interleaved.

Crossrefs

Cf. A047621 (contains first differences), A016754 (contains the sum of any two consecutive terms).

Programs

  • Magma
    [(4*n*(n+2)+(-1)^n+3)/2: n in [0..48]];
    
  • Mathematica
    CoefficientList[Series[(2 + 3 x + 4 x^2 - x^3) / ((1 + x) (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 19 2013 *)
    LinearRecurrence[{2,0,-2,1},{2,7,18,31},50] (* Harvey P. Dale, Jan 21 2017 *)
  • PARI
    for(n=0, 48, print1((4*n*(n+2)+(-1)^n+3)/2", "));

Formula

G.f.: (2+3*x+4*x^2-x^3)/((1+x)*(1-x)^3).
a(n) = a(-n-2) = 2*a(n-1)-2*a(n-3)+a(n-4).
a(n) = A047524(A000982(n+1)).
Sum_{n>=0} 1/a(n) = 1/2 + Pi^2/16 - cot(Pi/(2*sqrt(2)))*Pi/(4*sqrt(2)). - Amiram Eldar, Mar 06 2023

A194268 a(n) = 8*n^2 + 7*n + 1.

Original entry on oeis.org

1, 16, 47, 94, 157, 236, 331, 442, 569, 712, 871, 1046, 1237, 1444, 1667, 1906, 2161, 2432, 2719, 3022, 3341, 3676, 4027, 4394, 4777, 5176, 5591, 6022, 6469, 6932, 7411, 7906, 8417, 8944, 9487, 10046, 10621, 11212, 11819, 12442, 13081, 13736, 14407, 15094, 15797
Offset: 0

Views

Author

Omar E. Pol, Sep 05 2011

Keywords

Comments

Sequence found by reading the line from 1, in the direction 1, 16,..., in the square spiral whose vertices are the triangular numbers A000217.

Crossrefs

Programs

Formula

a(0)=1, a(1)=16, a(2)=47, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Apr 06 2014
From Elmo R. Oliveira, Oct 22 2024: (Start)
G.f.: (1 + 13*x + 2*x^2)/(1 - x)^3.
E.g.f.: (1 + 15*x + 8*x^2)*exp(x). (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.

A213171 T(n,k) = ((k+n)^2 - 4*k + 3 - (-1)^n - (k+n)*(-1)^(k+n))/2; n, k > 0, read by antidiagonals.

Original entry on oeis.org

1, 4, 5, 2, 3, 6, 9, 10, 13, 14, 7, 8, 11, 12, 15, 18, 19, 22, 23, 26, 27, 16, 17, 20, 21, 24, 25, 28, 31, 32, 35, 36, 39, 40, 43, 44, 29, 30, 33, 34, 37, 38, 41, 42, 45, 48, 49, 52, 53, 56, 57, 60, 61, 64, 65, 46, 47, 50, 51, 54, 55, 58, 59, 62, 63, 66, 69
Offset: 1

Views

Author

Boris Putievskiy, Feb 14 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). The order of the list:
T(1,1) = 1;
T(1,3), T(2,2), T(1,2), T(2,1), T(3,1);
. . .
T(1,n), T(2,n-1), T(1,n-1), T(2,n-2), T(3,n-2), T(4,n-3)...T(n,1);
...
Descent by snake along two adjacent antidiagonals - step to the southwest, step to the north, step to the southwest, step to the south and so on. The length of each step is 1. Phase four steps is rotated 90 degrees counterclockwise and the mirror of the phase A211377.
Table contains the following:
row 1 is alternation of elements A130883 and A100037,
row 2 accommodates elements A033816 in even places;
column 1 is alternation of elements A000384 and A014106,
column 2 is alternation of elements A091823 and A071355,
column 4 accommodates elements A130861 in odd places;
main diagonal is alternation of elements A188135 and A033567,
diagonal 1, located above the main diagonal, accommodates elements A033585 in even places,
diagonal 2, located above the main diagonal, accommodates elements A139271 in odd places,
diagonal 3, located above the main diagonal, is alternation of elements A033566 and A194431.

Examples

			The start of the sequence as a table:
   1   4   2   9   7   8  16 ...
   5   3  10   8  19  17  32 ...
   6  13  11  22  20  35  33 ...
  14  12  23  21  36  34  53 ...
  15  26  24  39  37  56  54 ...
  27  25  40  38  57  55  78 ...
  28  43  41  60  58  81  79 ...
  ...
The start of the sequence as a triangle array read by rows:
   1
   4  5
   2  3  6
   9 10 13 14
   7  8 11 12 15
  18 19 22 23 26 27
  16 17 20 21 24 25 28
  ...
The start of the sequence as array read by rows, the length of row r is 4*r-3.
First 2*r-2 numbers are from the row number 2*r-2 of triangle array, located above.
Last 2*r-1 numbers are from the row number 2*r-1 of triangle array, located above.
   1
   4  5  2  3  6
   9 10 13 14  7  8 11 12 15
  18 19 22 23 26 27 16 17 20 21 24 25 28
  ...
Row number r contains permutation 4*r-3 numbers from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-5*r+6, 2*r*r-5*r+7, ..., 2*r*r-r-4, 2*r*r-r-3, 2*r*r-r.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->((k+n)^2-4*k+3-(-1)^n-(k+n)*(-1)^(k+n))/2: seq(seq(T(k,n-k),k=1..n-1),n=1..13); # Muniru A Asiru, Dec 06 2018
  • Mathematica
    T[n_, k_] := ((n+k)^2 - 4k + 3 - (-1)^n - (-1)^(n+k)(n+k))/2;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-4*j+3-(-1)**i-(t+2)*(-1)**t)/2

Formula

As a table:
T(n,k) = ((k+n)^2-4*k+3-(-1)^n-(k+n)*(-1)^(k+n))/2.
As a linear sequence:
a(n) = (A003057(n)^2-4*A004736(n)+3-(-1)^A002260(n)-A003057(n)*(-1)^A003056(n))/2;
a(n) = ((t+2)^2-4*j+3-(-1)^i-(t+2)*(-1)^t)/2, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).
Showing 1-4 of 4 results.