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

A061989 Number of ways to place 3 nonattacking queens on a 3 X n board.

Original entry on oeis.org

0, 0, 0, 0, 4, 14, 36, 76, 140, 234, 364, 536, 756, 1030, 1364, 1764, 2236, 2786, 3420, 4144, 4964, 5886, 6916, 8060, 9324, 10714, 12236, 13896, 15700, 17654, 19764, 22036, 24476, 27090, 29884, 32864, 36036, 39406, 42980, 46764, 50764
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 29 2001

Keywords

Crossrefs

Essentially the same as A079908.

Programs

  • Magma
    [0,0,0] cat [(n-3)*(n^2-6*n+12): n in [3..50]]; // G. C. Greubel, Apr 29 2022
    
  • Maple
    A061989 := proc(n)
        if n >= 3 then
            (n-3)*(n^2-6*n+12) ;
        else
            0;
        end if;
    end proc:
    seq(A061989(n),n=0..30) ; # R. J. Mathar, Aug 16 2019
  • Mathematica
    CoefficientList[Series[2*x^4*(2-x+2*x^2)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [0,0,0]+[(n-3)*((n-3)^2 +3) for n in (3..50)] # G. C. Greubel, Apr 29 2022

Formula

G.f.: 2*x^4*(2-x+2*x^2)/(1-x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n >= 7.
Explicit formula (H. Tarry, 1890): a(n) = (n-3)*(n^2-6*n+12), n >= 3.
(4, 14, 36, ...) is the binomial transform of row 4 of A117937: (4, 10, 12, 6). - Gary W. Adamson, Apr 09 2006
a(n) = 2*A229183(n-3). - R. J. Mathar, Aug 16 2019
E.g.f.: 36 + 14*x + 2*x^2 + (-36 + 22*x - 6*x^2 + x^3)*exp(x). - G. C. Greubel, Apr 29 2022

A270109 a(n) = n^3 + (n+1)*(n+2).

Original entry on oeis.org

2, 7, 20, 47, 94, 167, 272, 415, 602, 839, 1132, 1487, 1910, 2407, 2984, 3647, 4402, 5255, 6212, 7279, 8462, 9767, 11200, 12767, 14474, 16327, 18332, 20495, 22822, 25319, 27992, 30847, 33890, 37127, 40564, 44207, 48062, 52135, 56432, 60959, 65722, 70727, 75980, 81487, 87254
Offset: 0

Views

Author

Bruno Berselli, Mar 11 2016, at the suggestion of Giuseppe Amoruso in BASE Cinque forum

Keywords

Comments

For n>1, many consecutive terms of the sequence are generated by floor(sqrt(n^2 + 2)^3) + n^2 + 2.
It appears that this is a subsequence of A000037 (the nonsquares).
The primes in the sequence belong to A045326.
Inverse binomial transform is 2, 5, 8, 6, 0, 0, 0, ... (0 continued).

Crossrefs

Subsequence of A001651, A047212.
Cf. A027444: numbers of the form n^3+n*(n+1); A085490: numbers of the form n^3+(n-1)*n.
Cf. A008865: numbers of the form n+(n+1)*(n+2); A130883: numbers of the form n^2+(n+1)*(n+2).

Programs

  • Magma
    [n^3+(n+1)*(n+2): n in [0..50]];
  • Mathematica
    Table[n^3 + (n + 1) (n + 2), {n, 0, 50}]
  • Maxima
    makelist(n^3+(n+1)*(n+2), n, 0, 50);
    
  • PARI
    vector(50, n, n--; n^3+(n+1)*(n+2))
    
  • Sage
    [n^3+(n+1)*(n+2) for n in (0..50)]
    

Formula

O.g.f.: (2 - x + 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (2 + x)*(1 + x)^2*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n>3.
a(n+h) - a(n) + a(n-h) = n^3 + n^2 + (6*h^2+3)*n + (2*h^2+2) for any h. This identity becomes a(n) = n^3 + n^2 + 3*n + 2 if h=0.
a(h*a(n) + n) = (h*a(n))^3 + (3*n+1)*(h*a(n))^2 + (3*n^2+2*n+3)*(h*a(n)) + a(n) for any h, therefore a(h*a(n) + n) is always a multiple of a(n).
a(n) + a(-n) = 2*A059100(n) = A255843(n).
a(n) - a(-n) = 4*A229183(n).

A153976 a(n) = n^3 + (n+2)^3.

Original entry on oeis.org

8, 28, 72, 152, 280, 468, 728, 1072, 1512, 2060, 2728, 3528, 4472, 5572, 6840, 8288, 9928, 11772, 13832, 16120, 18648, 21428, 24472, 27792, 31400, 35308, 39528, 44072, 48952, 54180, 59768, 65728, 72072, 78812, 85960, 93528, 101528, 109972, 118872, 128240
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n^3+(n+2)^3: n in [0..60]]; // Vincenzo Librandi, Apr 26 2011
    
  • Mathematica
    f[n_]:=n^3;lst={};Do[AppendTo[lst,(f[n]+f[n+2])],{n,0,6!}];lst
    Array[#^3+(#+2)^3&,40,0] (* or *) LinearRecurrence[{4,-6,4,-1},{8,28,72,152},40] (* Harvey P. Dale, Aug 02 2011 *)
  • Python
    def a(n): return n**3 + (n+2)**3
    print([a(n) for n in range(40)]) # Michael S. Branicky, Aug 28 2021

Formula

For n>3, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Aug 02 2011
G.f.: 4*( 2-x+2*x^2 ) / (x-1)^4 . - R. J. Mathar, Apr 11 2016
a(n) = 4*A229183(n+1). - R. J. Mathar, Apr 11 2016

Extensions

Offset changed from 1 to 0 by Vincenzo Librandi, Apr 26 2011

A271636 a(n) = 4*n*(4*n^2 + 3).

Original entry on oeis.org

0, 28, 152, 468, 1072, 2060, 3528, 5572, 8288, 11772, 16120, 21428, 27792, 35308, 44072, 54180, 65728, 78812, 93528, 109972, 128240, 148428, 170632, 194948, 221472, 250300, 281528, 315252, 351568, 390572, 432360, 477028, 524672, 575388, 629272, 686420
Offset: 0

Views

Author

Vincenzo Librandi, Apr 11 2016

Keywords

Comments

This is the case h=0 of the identity 4*n*(4*n^2 + 3*(2*h + 1)^2) = (2*n - 2*h - 1)^3 + (2*n + 2*h + 1)^3.
Subsequence of A004999 and, after 0, second bisection of A153976.

Crossrefs

Programs

  • Magma
    [4*n*(4*n^2+3): n in [0..50]];
    
  • Mathematica
    Table[4 n (4 n^2 + 3), {n, 0, 50}]
  • PARI
    x='x+O('x^99); concat(0, Vec(x*(28+40*x+28*x^2)/(1-x)^4)) \\ Altug Alkan, Apr 11 2016
    
  • Python
    for n in range(0,1000):print(4*n*(4*n**2+3)) # Soumil Mandal, Apr 11 2016

Formula

O.g.f.: 4*x*(7 + 10*x + 7*x^2)/(1 - x)^4.
E.g.f.: 4*x*(7 + 12*x + 4*x^2)*exp(x). - Ilya Gutkovskiy, Apr 11 2016
a(n) = -a(-n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = 4*A229183(2*n). - Bruno Berselli, Apr 11 2016

Extensions

Edit and extended by Bruno Berselli, Apr 12 2016

A342940 Triangle read by rows: T(n, k) is the Skolem number of the parallelogram graph P_{n, k}, with 1 < k <= n.

Original entry on oeis.org

2, 3, 4, 4, 6, 8, 5, 8, 11, 14, 6, 10, 14, 18, 22, 7, 12, 17, 22, 27, 32, 8, 14, 20, 26, 32, 38, 44, 9, 16, 23, 30, 37, 44, 51, 58, 10, 18, 26, 34, 42, 50, 58, 66, 74, 11, 20, 29, 38, 47, 56, 65, 74, 83, 92, 12, 22, 32, 42, 52, 62, 72, 82, 92, 102, 112, 13, 24, 35, 46, 57, 68, 79, 90, 101, 112, 123, 134
Offset: 2

Views

Author

Stefano Spezia, Mar 30 2021

Keywords

Comments

For the meaning of Skolem number of a graph, see Definitions 1.4 and 1.5 in Carrigan and Green.

Examples

			The triangle T(n, k) begins:
n\k|   2   3   4   5   6   7
---+------------------------
2  |   2
3  |   3   4
4  |   4   6   8
5  |   5   8  11  14
6  |   6  10  14  18  22
7  |   7  12  17  22  27  32
...
		

Crossrefs

For n > 1, 3*A002061(n) gives the Skolem number of the hexagonal grid graph H_n.

Programs

  • Mathematica
    T[n_,k_]:=k*n-2k-n+4; Table[T[n,k],{n,2,13},{k,2,n}]//Flatten

Formula

O.g.f.: (4 - 6*y - x*(5 - 8*y))/((1 - x)^2*(1 - y)^2).
E.g.f.: exp(x+y)*(4 - x*(1 - y) - 2*y).
T(n, k) = k*n - 2*k - n + 4 (see Theorem 3.3 in Carrigan and Green).
Sum_{k=2..n} T(n, k) = A229183(n-1).
T(n, n) = A014206(n-2).

A275740 Sums of the next n consecutive nonsquare integers.

Original entry on oeis.org

0, 2, 8, 21, 46, 83, 136, 210, 306, 426, 575, 758, 972, 1223, 1519, 1855, 2236, 2669, 3156, 3694, 4290, 4956, 5678, 6467, 7332, 8269, 9278, 10368, 11548, 12804, 14148, 15593, 17126, 18753, 20485, 22325, 24262, 26308, 28481, 30756, 33148
Offset: 0

Views

Author

Olivier Gérard, Aug 07 2016

Keywords

Comments

Row sums of nonsquare integers (A000037), seen as a regular triangle:
.
2 | 2,
8 | 3, 5,
21 | 6, 7, 8,
46 | 10, 11, 12, 13,
83 | 14, 15, 17, 18, 19,
136 | 20, 21, 22, 23, 24, 26,
210 | 27, 28, 29, 30, 31, 32, 33,
306 | 34, 35, 37, 38, 39, 40, 41, 42,
...
The equivalent for all integers are A006003 (starting from 1), A229183 (starting from 2) and A027480 (starting from 0).
There are several sequences close to nonsquares whose sum of groups of n terms starts like this sequence, notably A028761, A158276, A167759.

Crossrefs

Programs

  • Maple
    R:= 0: s:= 1:
    for n from 1 to 100 do
      if floor(sqrt(s+n)) = floor(sqrt(s)) then
        R:= R, n*s + n*(n+1)/2; s:= s+n;
      else
        R:= R, n*s + n*(n+1)/2 - floor(sqrt(s+n))^2 + s+n+1; s:= s+n+1;
      fi
    od:
    R; # Robert Israel, Oct 02 2022
  • Mathematica
    Table[Sum[
      i + Floor[1/2 + Sqrt[i]], {i, n (n - 1)/2 + 1, (n + 1) (n)/2}], {n,
      0, 40}]
    Join[{0},Module[{nn=1000,nsi,len},nsi=Select[Range[nn],!IntegerQ[Sqrt[#]]&];len=Floor[ (Sqrt[ 8*Length[nsi]+1]-1)/2];Total/@TakeList[nsi,Range[len]]]] (* Harvey P. Dale, Jan 04 2024 *)

Extensions

Definition clarified by Harvey P. Dale, Jan 04 2024

A267707 a(n) = A000217(A000217(n)+1).

Original entry on oeis.org

1, 3, 10, 28, 66, 136, 253, 435, 703, 1081, 1596, 2278, 3160, 4278, 5671, 7381, 9453, 11935, 14878, 18336, 22366, 27028, 32385, 38503, 45451, 53301, 62128, 72010, 83028, 95266, 108811, 123753, 140185, 158203, 177906, 199396, 222778, 248160, 275653, 305371
Offset: 0

Views

Author

Waldemar Puszkarz, Jan 19 2016

Keywords

Comments

It is the sequence of triangular numbers (A000217) with progressive gaps that grow as 0,1,2,3, ... (consecutive numbers), by which I mean that the 0,1,2,3, ... consecutive triangular numbers are removed from A000217 to form this sequence. For instance, (1), 6, a triangular number, is missing between 3 and 10, which is the gap with 1 triangular number removed, (2), 15 and 21 (two consecutive triangular numbers) are missing between 10 and 28, which is the gap with 2 triangular numbers removed, and so on.
The differences between the consecutive terms of this sequence can be expressed through the sum of cubes of two numbers separated by 2 as (n^3+(n+2)^3)/4, which is the same as A229183, except for the first term in there.
The same pattern when applied to squares, A000290(A000290(n)+1), gives A082044(n). Triangular numbers are also linked in a similar manner to A027927(n) = A000217(A000217(n)+2)/3.

Examples

			For n=0, a(0)=1*2/2=1. For n=2, a(2)=4*5/2=10.
		

Crossrefs

Cf. A000217 (triangular numbers), A229183 (consecutive terms differences), A082044 (related sequence for squares), A027927 (related sequence for triangular numbers).

Programs

  • Magma
    I:=[1,3,10,28,66]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Jan 22 2016
  • Mathematica
    S[n_] :=n*(n+1)/2; Table[S[S[n]+1], {n, 0, 50}]
    Table[(n*(n+1)/2+1)(n*(n+1)/2+2)/2, {n, 0, 50}]
    Table[(n^4+2*n^3+7*n^2+6*n+8)/8, {n, 0, 50}]
    CoefficientList[Series[(1 - 2 x + 5 x^2 - 2 x^3 + x^4) / (1 - x)^5, {x, 0, 33}], x] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {1, 3, 10, 28, 66}, 50] (* Vincenzo Librandi, Jan 22 2016 *)
  • PARI
    for(n=0,50,print1((n^4+2*n^3+7*n^2+6*n+8)/8 ", "))
    

Formula

a(n) = A000217(A000217(n)+1) = (n*(n+1)/2+1)(n*(n+1)/2+2)/2.
a(n) = (n^4+2n^3+7n^2+6n+8)/8 = (n^2+n+2)(n^2+n+4)/8.
G.f.: (1-2*x+5*x^2-2*x^3+x^4)/(1-x)^5. - Vincenzo Librandi, Jan 22 2016
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Vincenzo Librandi, Jan 22 2016
Showing 1-7 of 7 results.