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.

Previous Showing 31-40 of 45 results. Next

A173562 a(n) = n^2 + floor(n/4).

Original entry on oeis.org

0, 1, 4, 9, 17, 26, 37, 50, 66, 83, 102, 123, 147, 172, 199, 228, 260, 293, 328, 365, 405, 446, 489, 534, 582, 631, 682, 735, 791, 848, 907, 968, 1032, 1097, 1164, 1233, 1305, 1378, 1453, 1530, 1610, 1691, 1774, 1859, 1947, 2036, 2127, 2220, 2316, 2413, 2512
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2010

Keywords

Crossrefs

Programs

Formula

a(n) = A002378(n)-A057353(n) = A035608(n)-A002265(n+2) = A000290(n)+A002265(n);
a(n+1) - a(n) = A047624(n+2).
a(n) = floor((n + 1/8)^2).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n>5.
G.f.: x*(1+2*x+2*x^2+3*x^3)/((1+x)*(x^2+1)*(1-x)^3). - R. J. Mathar, Feb 27 2010
a(n) = (8*n^2+2*n-3+i^(2*n)+(1+i)*i^(-n)+(1-i)*i^n)/8 where i=sqrt(-1). - Wesley Ivan Hurt, Jun 04 2016

A253146 A fractal tree, read by rows: for n > 2, T(n,1) = T(n-1,1)+2, T(n,n) = T(n-1,1)+3, and for k=2..n-1, T(n,k) = T(n-2,k-1).

Original entry on oeis.org

1, 2, 3, 4, 1, 5, 6, 2, 3, 7, 8, 4, 1, 5, 9, 10, 6, 2, 3, 7, 11, 12, 8, 4, 1, 5, 9, 13, 14, 10, 6, 2, 3, 7, 11, 15, 16, 12, 8, 4, 1, 5, 9, 13, 17, 18, 14, 10, 6, 2, 3, 7, 11, 15, 19, 20, 16, 12, 8, 4, 1, 5, 9, 13, 17, 21, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15, 19, 23
Offset: 1

Views

Author

Keywords

Comments

Eric Angelini's original posting to the Sequence Fans mailing list gave a similar but different lovely sequence, which is now A253028. - N. J. A. Sloane, Jan 04 2015, and Felix Fröhlich, May 23 2016
It appears that:
1) partial sums of terms, situated on the outer leftmost leftwise triangle diagonal are equal to A002061(k), k>=1;
2) partial sums of terms, situated on the second (from the left) leftwise triangle diagonal represent recurrence a(k+1) = ((k-1)*a(k))/(k-3)-(2*(k+3))/(k-3), k>=3
3) partial sums of terms, situated on the outer rightmost rightwise triangle diagonal are equal to A000290(k)=k^2, k>=1. - Alexander R. Povolotsky, Dec 28 2014

Examples

			.   1:                         1
.   2:                       2   3
.   3:                     4   1   5
.   4:                   6   2   3   7
.   5:                 8   4   1   5   9
.   6:              10   6   2   3   7  11
.   7:            12   8   4   1   5   9  13
.   8:          14  10   6   2   3   7  11  15
.   9:        16  12   8   4   1   5   9  13  17
.  10:      18  14  10   6   2   3   7  11  15  19
.  11:    20  16  12   8   4   1   5   9  13  17  21
.  12:  22  18  14  10   6   2   3   7  11  15  19  23 .
Removing the first and last entries from each row gives the same tree back again.
		

Crossrefs

Cf. A253028. Row sums appear to be A035608.

Programs

  • Haskell
    a253146 n k = a253146_tabl !! (n-1) !! (k-1)
    a253146_row n = a253146_tabl !! (n-1)
    a253146_tabl = [1] : [2,3] : f [1] [2,3] where
       f us vs@(v:_) = ws : f vs ws where
                       ws = [v + 2] ++ us ++ [v + 3]
  • Mathematica
    T[n_, 1] := 2n - 2;
    T[n_, n_] := 2n - 1;
    T[n_, k_] := T[n, k] = T[n-2, k-1];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 20 2021 *)

A292680 Rule 6: 000, ..., 111 -> 0, 1, 1, 0, 0, 0, 0, 0.

Original entry on oeis.org

0, 6, 12, 8, 24, 26, 16, 16, 48, 54, 52, 48, 32, 34, 32, 32, 96, 102, 108, 104, 104, 106, 96, 96, 64, 70, 68, 64, 64, 66, 64, 64, 192, 198, 204, 200, 216, 218, 208, 208, 208, 214, 212, 208, 192, 194, 192, 192, 128, 134, 140, 136, 136, 138, 128, 128, 128, 134, 132, 128
Offset: 0

Views

Author

M. F. Hasler, Oct 09 2017

Keywords

Comments

The orbit of 1 under this rule is A266180.
Rule 6 is the smallest rule which is even (otherwise infinitely many bits would be switched on at step 1, for any finite starting value) and nontrivial (i.e., does not lead to extinction nor simple reproduction, possibly shifted left or right, of a single-bit initial state).
As is customary in the context of elementary cellular automata, the result is the bitmap obtained from the argument extended by one bit to the right (as to consider the cell which has bit 0 of the input as left neighbor), cf. example. Since the rule has a value < 16, no cell having its left neighbor 'on' will be on. Therefore all values a(n) are even. See A292681 for the variant without this extension beyond bit 0, i.e., a(n)/2.

Examples

			     n        |          a(n)
   0 =   0[2] |       0[2] =  0
   1 =   1[2] |     110[2] =  6 (bits below 001 and 010 are on, below 100 is off)
   2 =  10[2] |    1100[2] = 12 (as above, plus an additional bit 0 below 000)
   3 =  11[2] |    1000[2] =  8 (1 below 001, 0 below 011, 110 and 100.)
   4 = 100[2] |   11000[2] = 24 (as n = 1 and n = 2, shifted right once more)
   5 = 101[2] |   11010[2] = 26 (1 below 001 and 010 (twice), 0 below 101 and 100)
   6 = 110[2] |   10000[2] = 16 (as n = 3, shifted right once)
   7 = 111[2] |   10000[2] = 16 (1 below 001, 0 below 011, 111, 110 and 100).
		

Crossrefs

Programs

  • PARI
    apply( A292680(n,r=6)=sum(i=0,logint(!n+n<<=2,2)+1,bittest(r,(n>>i)%8)<
    				

A268696 a(1)=1; thereafter a(n+1) = floor(m/2), where m = number of occurrences of a(n) in [a(1),...,a(n)].

Original entry on oeis.org

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

Views

Author

David Seelmann, Feb 11 2016

Keywords

Comments

It appears that a(n) <= ceiling(sqrt(n)).
Comments from N. J. A. Sloane, Feb 12 2016: (Start)
In fact it appears that a(n) <= floor(sqrt(n)) except when n belongs to the sequence S := [99, 120, 142, 167, 193, 222, 252, 285, 319, ...], which has second differences 1,3,1,3,1,3,... and is the sequence {99; A035608(k)+21*k+120, k>=0}. For these values of n it appears that a(n) = ceiling(sqrt(n)). The first example is a(99) = 10 = ceiling(sqrt(99)).
The zeros occur at positions [2, 3, 8, 13, 19, 28, 38, 51, 65, 82, 100, 121, 143, 168, 194, 223, 253, 286, 320, ...], which apart from the initial terms appears to be S+1.
Without the division by 2 in the definition (that is, if a(n+1)=m), we get A158416. (End)

Examples

			a(2) is equal to the number of times a(1) = 1 appears in the sequence before, divided by two, rounding down. Since 1 appears once before, a(2) = floor(1/2) = 0.
a(3) is  equal to the number of times 0 appears in the sequence before, which is again once, divided by two, rounding down. So a(3) = floor(1/2) = 0.
a(4) is the number of times 0 appears before (twice) divided by two, which gives us 1.
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, Floor[Count[a, n_ /; n == a[[k - 1]]]/2]], {k, 2, 120}]; a (* Michael De Vlieger, Feb 11 2016 *)

Extensions

More terms from Michael De Vlieger, Feb 11 2016

A104569 Triangle read by rows: T(i,j) is the (i,j)-entry (1 <= j <= i) of the product Q*R of the infinite lower triangular matrices Q = [1; 1,3; 1,3,1; 1 3,1,3; ...] and R = [1; 1,1; 1,1,1; 1,1,1,1; ...].

Original entry on oeis.org

1, 4, 3, 5, 4, 1, 8, 7, 4, 3, 9, 8, 5, 4, 1, 12, 11, 8, 7, 4, 3, 13, 12, 9, 8, 5, 4, 1, 16, 15, 12, 11, 8, 7, 4, 3, 17, 16, 13, 12, 9, 8, 5, 4, 1, 20, 19, 16, 15, 12, 11, 8, 7, 4, 3, 21, 20, 17, 16, 13, 12, 9, 8, 5, 4, 1, 24, 23, 20, 19, 16, 15, 12, 11, 8, 7, 4, 3, 25, 24, 21, 20, 17, 16, 13, 12, 9, 8, 5, 4, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			The first few rows of the triangle are:
  1;
  4, 3;
  5, 4, 1;
  8, 7, 4, 3;
  9, 8, 5, 4, 1;
  ...
		

Crossrefs

Row sums yield A074377. Columns 1, 3, 5, ... (starting at the diagonal entry) yield A042948. Columns 2, 4, 6, ... (starting at the diagonal entry) yield A014601. The product R*Q yields A104570.

Programs

  • Maple
    T:=proc(i,j) if j>i then 0 elif i+j mod 2 = 1 then 2*(i-j)+2 elif i mod 2 = 1 and j mod 2 = 1 then 2*(i-j)+1 elif i mod 2 = 0 and j mod 2 = 0 then 2*(i-j)+3 else fi end: for i from 1 to 13 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 23 2005
  • Mathematica
    Q[i_, j_] := If[j <= i, 2 + (-1)^j, 0];
    R[i_, j_] := If[j <= i, 1, 0];
    T[i_, j_] := Sum[Q[i, k]*R[k, j], {k, 1, 13}];
    Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024 *)

Formula

For 1<=j<=i: T(i, j)=2(i-j+1) if i and j are of opposite parity; T(i, j)=2(i-j)+1 if both i and j are odd; T(i, j)=2(i-j)+3 if both i and j are even. - Emeric Deutsch, Mar 23 2005

Extensions

More terms from Emeric Deutsch, Mar 23 2005

A104570 Triangle read by rows: T(i,j) is the (i,j)-entry (1 <= j <= i) of the product R*Q of the infinite lower triangular matrices R = [1; 1,1; 1,1,1; 1,1,1,1; ...] and Q = [1; 1,3; 1,3,1; 1,3,1,3; ...].

Original entry on oeis.org

1, 2, 3, 3, 6, 1, 4, 9, 2, 3, 5, 12, 3, 6, 1, 6, 15, 4, 9, 2, 3, 7, 18, 5, 12, 3, 6, 1, 8, 21, 6, 15, 4, 9, 2, 3, 9, 24, 7, 18, 5, 12, 3, 6, 1, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1, 12, 33, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 13, 36, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 16 2005

Keywords

Examples

			First few rows of the triangle:
  1;
  2, 3;
  3, 6, 1;
  4, 9, 2, 3;
  ...
		

Crossrefs

Row sums yield A035608. The product Q*R yields A104569.

Programs

  • Maple
    T:=proc(i,j) if j>i then 0 elif j mod 2 = 1 then i-j+1 else 3*(i-j+1) fi end:for i from 1 to 14 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 23 2005
  • Mathematica
    Q[i_, j_] := If[j <= i, 2 + (-1)^j, 0];
    R[i_, j_] := If[j <= i, 1, 0];
    T[i_, j_] := Sum[R[i, k]*Q[k, j], {k, 1, 13}];
    Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024~ *)

Formula

Even columns (offset) = 1, 2, 3, ...; while odd columns = 3, 6, 9, ...
T(i,j) = i-j+1 if j <= i and j is odd; 3(i-j+1) if j <= i and j is even. - Emeric Deutsch, Mar 23 2005

Extensions

More terms from Emeric Deutsch, Mar 23 2005

A131225 Triangle read by rows: T(n,k) = 2*k - (1 + (-1)^(n-k))/2 (1 <= k <= n).

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 2, 3, 6, 7, 1, 4, 5, 8, 9, 2, 3, 6, 7, 10, 11, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15, 1, 4, 5, 8, 9, 12, 13, 16, 17, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23
Offset: 1

Views

Author

Gary W. Adamson, Jun 20 2007

Keywords

Comments

Row sums = A035608: (1, 5, 10, 18, 27, 39, ...).

Examples

			First few rows of the triangle:
  1;
  2,  3;
  1,  4,  5;
  2,  3,  6,  7;
  1,  4,  5,  8,  9;
  2,  3,  6,  7, 10, 11;
  1,  4,  5,  8,  9, 12, 13;
  ...
		

Crossrefs

Programs

  • Maple
    T := proc (n, k) options operator, arrow; 2*k-1/2-(1/2)*(-1)^(n-k) end proc: for n to 10 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jul 09 2007
  • Mathematica
    T[n_,k_]:=2k-(1+(-1)^(n-k))/2;Table[T[n,k],{n,12},{k,n}]//Flatten (* James C. McMahon, Feb 17 2025 *)

Formula

2*A002260 - A128174, as infinite lower triangular matrices; where A002260 = (1; 1,2; 1,2,3; ...) and A128174 = (1; 0,1; 1,0,1; ...).

Extensions

a(47), a(49) corrected and more terms from Georg Fischer, Jun 07 2023

A266085 Alternating sum of heptagonal numbers.

Original entry on oeis.org

0, -1, 6, -12, 22, -33, 48, -64, 84, -105, 130, -156, 186, -217, 252, -288, 328, -369, 414, -460, 510, -561, 616, -672, 732, -793, 858, -924, 994, -1065, 1140, -1216, 1296, -1377, 1462, -1548, 1638, -1729, 1824, -1920, 2020, -2121, 2226, -2332, 2442, -2553
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 21 2015

Keywords

Crossrefs

Unsigned terms give antidiagonal sums of A204154. - Nathaniel J. Strout, Nov 14 2019

Programs

  • Magma
    [((10*n^2+4*n-3)*(-1)^n+3)/8: n in [0..50]]; // Vincenzo Librandi, Dec 21 2015
    
  • Magma
    R:=PowerSeriesRing(Integers(), 50); [0] cat  Coefficients(R!(-x*(1 - 4*x)/((1 - x)*(1 + x)^3))); // Marius A. Burtea, Nov 13 2019
    
  • Mathematica
    Table[((10 n^2 + 4 n - 3) (-1)^n + 3)/8, {n, 0, 50}]
    CoefficientList[Series[(x - 4 x^2)/(x^4 + 2 x^3 - 2 x - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 21 2015 *)
    LinearRecurrence[{-2,0,2,1},{0,-1,6,-12},60] (* Harvey P. Dale, Jan 26 2023 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(-x*(1-4*x)/((1-x)*(1+x)^3))) \\ Altug Alkan, Dec 21 2015

Formula

G.f.: -x*(1 - 4*x)/((1 - x)*(1 + x)^3).
a(n) = ((10*n^2 + 4*n - 3)*(-1)^n + 3)/8.
a(n) = Sum_{k = 0..n} (-1)^k*A000566(k).
Lim_{n -> infinity} a(n + 1)/a(n) = -1.
a(n) = (-1)^n*A008728(5*n-5) for n>0. - Bruno Berselli, Dec 21 2015
E.g.f.: (1/8)*exp(-x)*(-3 + 3*exp(2*x) - 14*x + 10*x^2). - Stefano Spezia, Nov 13 2019

A241592 Degree of Somos4-oid polynomial s_n(x).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 2, 5, 6, 7, 9, 10, 12, 14, 14, 18, 20, 22, 25, 27, 30, 33, 34, 39, 42, 45, 49, 52, 56, 60, 62, 68, 72, 76, 81, 85, 90, 95, 98, 105, 110, 115, 121, 126, 132, 138, 142, 150, 156, 162, 169, 175, 182, 189, 194, 203, 210, 217, 225, 232, 240
Offset: 1

Views

Author

N. J. A. Sloane, May 16 2014

Keywords

Examples

			G.f. = x^4 + x^5 + 2*x^6 + 3*x^7 + 2*x^8 + 5*x^9 + 6*x^10 + 7*x^11 + ...
		

Crossrefs

Programs

  • Magma
    I:=[0,0,0,1,1,2,3,2,5,6]; [n le 10 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-8)-2*Self(n-9)+Self(n-10): n in [1..70]]; // Vincenzo Librandi, Jan 20 2015
  • Mathematica
    a[ n_] := If[ Divisible[ n, 8], -2 + n^2 / 16, Quotient[ 2 n^2 - 5 (-1)^n + 5, 32]]; (* Michael Somos, Jan 20 2015 *)
    CoefficientList[Series[x^3 (1 - x + x^2 - 2 x^4 + 4 x^5 - 2 x^6) / ((1 - x)^2 (1 - x^8)), {x, 0, 70}], x] (* Vincenzo Librandi, Jan 20 2015 *)
    LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1},{0,0,0,1,1,2,3,2,5,6},70] (* Harvey P. Dale, Feb 28 2023 *)
  • PARI
    {a(n) = if( n%8==0, -2 + n^2 / 16, (2*n^2 - 5*(-1)^n + 5) \ 32)}; /* Michael Somos, Jan 19 2015 */
    
  • PARI
    concat(vector(3), Vec(x^4*(2*x^6-4*x^5+2*x^4-x^2+x-1)/((x-1)^3*(x+1)*(x^2+1)*(x^4+1)) + O(x^100))) \\ Colin Barker, Jul 17 2015
    

Formula

Eight interlaced quadratic progressions: deg(s_{8q+r}) = (4q + r)q + [-2,0,0,0,1,1,2,3]_r, 0 <= r <= 7.
G.f.: x^4 * (1 - x + x^2 - 2*x^4 + 4*x^5 - 2*x^6) / ((1 - x)^2 * (1 - x^8)). - Michael Somos, Jan 19 2015
a(n) = a(-n) for all n in Z. - Michael Somos, Jan 19 2015
a(4*n + 1) = A035608(n), a(4*n + 2) = A002378(n), a(4*n + 3) = A156859(n). - Michael Somos, Jan 19 2015

A266086 Alternating sum of 9-gonal (or nonagonal) numbers.

Original entry on oeis.org

0, -1, 8, -16, 30, -45, 66, -88, 116, -145, 180, -216, 258, -301, 350, -400, 456, -513, 576, -640, 710, -781, 858, -936, 1020, -1105, 1196, -1288, 1386, -1485, 1590, -1696, 1808, -1921, 2040, -2160, 2286, -2413, 2546, -2680, 2820, -2961, 3108, -3256, 3410
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 21 2015

Keywords

Crossrefs

Programs

  • Magma
    [(14*(-1)^n*n^2 + 4*(-1)^n*n - 5*(-1)^n + 5)/8: n in [0..50]]; // Vincenzo Librandi, Dec 21 2015
    
  • Mathematica
    Table[((14 n^2 + 4 n - 5) (-1)^n + 5)/8, {n, 0, 44}]
    CoefficientList[Series[(x - 6 x^2)/(x^4 + 2 x^3 - 2 x - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 21 2015 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(-x*(1-6*x)/((1-x)*(1+x)^3))) \\ Altug Alkan, Dec 21 2015

Formula

G.f.: -x*(1 - 6*x)/((1 - x)*(1 + x)^3).
a(n) = ((14*n^2 + 4*n - 5)*(-1)^n + 5)/8.
a(n) = Sum_{k = 0..n} (-1)^k*A001106(k).
Lim_{n -> infinity} a(n + 1)/a(n) = -1.
Previous Showing 31-40 of 45 results. Next