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.

A084570 Partial sums of A084263.

Original entry on oeis.org

1, 2, 6, 12, 23, 38, 60, 88, 125, 170, 226, 292, 371, 462, 568, 688, 825, 978, 1150, 1340, 1551, 1782, 2036, 2312, 2613, 2938, 3290, 3668, 4075, 4510, 4976, 5472, 6001, 6562, 7158, 7788, 8455, 9158, 9900, 10680, 11501, 12362, 13266, 14212, 15203, 16238
Offset: 0

Views

Author

Paul Barry, May 31 2003

Keywords

Comments

Partial sums give A084569.

Programs

  • Magma
    [(-1)^n/4 + (2*n^3+6*n^2+10*n+ 9)/12: n in [0..50]]; // Vincenzo Librandi, Apr 04 2015
  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{1,2,6,12,23},50] (* Harvey P. Dale, Nov 12 2014 *)
    CoefficientList[Series[(1 - x + 2 x^2) / ((1 + x) (1 - x)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Apr 04 2015 *)
  • PARI
    a(n) = sum(j=0, n, sum(i=0, j, (i+(-1)^i)));
    vector(50, n, n--; a(n)) \\ Michel Marcus, Apr 04 2015
    

Formula

a(n) = (-1)^n/4 + (2n^3 + 6n^2 + 10n + 9)/12.
a(n) = Sum_{j=0..n} (Sum_{i=0..j} (i + (-1)^i)).
From Arun Giridhar, Apr 03 2015: (Start)
a(n) = ceiling(A006527(n+1) / 2).
a(n) = ceiling((n^3 + 3n^2 + 5n + 3)/6).
(End)
G.f.: (1-x+2*x^2)/((1+x)*(1-x)^4). - Vincenzo Librandi, Apr 04 2015

A084264 Binomial transform of A084263.

Original entry on oeis.org

1, 2, 7, 22, 64, 176, 464, 1184, 2944, 7168, 17152, 40448, 94208, 217088, 495616, 1122304, 2523136, 5636096, 12517376, 27656192, 60817408, 133169152, 290455552, 631242752, 1367343104, 2952790016, 6358564864, 13656653824, 29259464704
Offset: 0

Views

Author

Paul Barry, May 31 2003

Keywords

Comments

Also the number of matchings in the (n-1)-book graph. - Eric W. Weisstein, Sep 30 2017

Crossrefs

Cf. A084263.

Programs

  • Mathematica
    CoefficientList[Series[(-1 + x)(1 - 3 x + 4 x^2)/(-1 + 2 x)^3, {x, 0, 30}], x]
    Join[{1}, LinearRecurrence[{6, -12, 8}, {2, 7, 22}, 30]]
    Table[If[n == 0, 1, 2^(n - 3) (n^2 + 3 n + 4)], {n, 0, 20}] (* Eric W. Weisstein, Sep 30 2017 *)

Formula

E.g.f.: exp(x)*cosh(x)+exp(2*x)*(x+x^2/2).
O.g.f.: (1-x)*(1-3*x+4*x^2)/(1-2*x)^3. - R. J. Mathar, Apr 02 2008
a(0)=1, a(1)=2, a(2)=7, a(3)=22, a(n) = 6*a(n-1)-12*a(n-2)+8*a(n-3). - Harvey P. Dale, Mar 25 2012
a(n) = 2^(n-3)*(n^2+3*n+4) for n > 0. - Eric W. Weisstein, Sep 30 2017

A084265 a(n) = (n^2 + 3*n + 1 + (-1)^n) / 2.

Original entry on oeis.org

1, 2, 6, 9, 15, 20, 28, 35, 45, 54, 66, 77, 91, 104, 120, 135, 153, 170, 190, 209, 231, 252, 276, 299, 325, 350, 378, 405, 435, 464, 496, 527, 561, 594, 630, 665, 703, 740, 780, 819, 861, 902, 946, 989, 1035, 1080, 1128, 1175, 1225, 1274, 1326, 1377, 1431, 1484
Offset: 0

Views

Author

Paul Barry, May 31 2003

Keywords

Comments

Previous name was: Modified triangular numbers.
Binomial transform is A084266.
Partial sums give A064843. - N. J. A. Sloane, Jul 20 2008
Starting with "1" = triangle A171608 * the odd integers, (1, 3, 5, ...). - Gary W. Adamson, Dec 12 2009

Crossrefs

Programs

  • Magma
    [(n^2+3*n+1)/2+(-1)^n/2: n in [0..60]]; // Vincenzo Librandi, Aug 15 2013
    
  • Maple
    A084265:=n->(n^2+3*n+1)/2+(-1)^n/2: seq(A084265(n),n=0..100); # Wesley Ivan Hurt, Mar 21 2015
  • Mathematica
    CoefficientList[Series[(-1 - 2 x^2 + x^3) / ((1 + x) (x - 1)^3), {x, 0, 60}], x] (* Vincenzo Librandi, Aug 15 2013 *)
  • PARI
    vector(100,n,(n^2+n-1-(-1)^n)/2) \\ Derek Orr, Mar 22 2015

Formula

a(n) = A000217(n)+A059841(n)+n.
E.g.f.: cosh(x) + exp(x)*(2x+x^2/2).
a(n) = (n^2+3*n+1)/2+(-1)^n/2.
G.f.: ( -1-2*x^2+x^3 ) / ( (1+x)*(x-1)^3 ). - R. J. Mathar, Nov 26 2012
From Wesley Ivan Hurt, Mar 21 2015: (Start)
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
a(n) = Sum_{i=0..n+1} i-(-1)^i. (End)
a(2*n) = A000384(n+1); a(2*n-1) = A014105(n)-1; a(2*n-1) = A014107(n+1), for all integers n. - Hartmut F. W. Hoft, Feb 02 2022

Extensions

New name from Joerg Arndt, Aug 15 2013

A286098 Square array read by antidiagonals: A(n,k) = T(n AND k, n OR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986).

Original entry on oeis.org

0, 1, 1, 3, 4, 3, 6, 6, 6, 6, 10, 11, 12, 11, 10, 15, 15, 17, 17, 15, 15, 21, 22, 21, 24, 21, 22, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 37, 38, 37, 40, 37, 38, 37, 36, 45, 45, 47, 47, 49, 49, 47, 47, 45, 45, 55, 56, 55, 58, 59, 60, 59, 58, 55, 56, 55, 66, 66, 66, 66, 70, 70, 70, 70, 66, 66, 66, 66, 78, 79, 80, 79, 78, 83, 84, 83, 78, 79, 80, 79, 78
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,  1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
   1,  4,   6,  11,  15,  22,  28,  37,  45,  56,  66,  79,  91
   3,  6,  12,  17,  21,  28,  38,  47,  55,  66,  80,  93, 105
   6, 11,  17,  24,  28,  37,  47,  58,  66,  79,  93, 108, 120
  10, 15,  21,  28,  40,  49,  59,  70,  78,  91, 105, 120, 140
  15, 22,  28,  37,  49,  60,  70,  83,  91, 106, 120, 137, 157
  21, 28,  38,  47,  59,  70,  84,  97, 105, 120, 138, 155, 175
  28, 37,  47,  58,  70,  83,  97, 112, 120, 137, 155, 174, 194
  36, 45,  55,  66,  78,  91, 105, 120, 144, 161, 179, 198, 218
  45, 56,  66,  79,  91, 106, 120, 137, 161, 180, 198, 219, 239
  55, 66,  80,  93, 105, 120, 138, 155, 179, 198, 220, 241, 261
  66, 79,  93, 108, 120, 137, 155, 174, 198, 219, 241, 264, 284
  78, 91, 105, 120, 140, 157, 175, 194, 218, 239, 261, 284, 312
		

Crossrefs

Cf. A000217 (row 0 & column 0), A084263 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286099, A286101, A286102, A286108.

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitAnd[n, k],BitOr[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n&k, n|k)
    for n in range(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286098 n) (A286098bi (A002262 n) (A025581 n)))
    (define (A286098bi row col) (let ((a (A004198bi row col)) (b (A003986bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
    

Formula

A(n,k) = T(A004198(n,k), A003986(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...].

A134519 Numbers remaining when the natural numbers (A000027) are arranged into a triangle and only the beginning and end terms of each row are retained.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 10, 11, 15, 16, 21, 22, 28, 29, 36, 37, 45, 46, 55, 56, 66, 67, 78, 79, 91, 92, 105, 106, 120, 121, 136, 137, 153, 154, 171, 172, 190, 191, 210, 211, 231, 232, 253, 254, 276, 277, 300, 301, 325, 326, 351, 352, 378, 379, 406, 407, 435, 436, 465, 466
Offset: 1

Views

Author

Rick L. Shepherd, Oct 29 2007

Keywords

Comments

Equivalently, this is TriRet(A000027,{1}) = TriRem(A000027,{2,3,4,...}), using the operations defined in A134509. Bisections are A000217-{0} and A000124-{1}. A055802 and A114220 appear to be this sequence with two and three additional leading terms, respectively.

Crossrefs

Cf. A084263: A000217(m) + (1 + (-1)^m)/2.
Cf. A117142: A000217(floor(m/2)+1) - (1 + (-1)^m)/2.

Programs

  • GAP
    a:=[];; for n in [1..60] do if n mod 2=0 then Add(a,(16+4*n+2*n^2)/16); else Add(a,(3+4*n+n^2)/8); fi; od; a; # Muniru A Asiru, Dec 21 2018
    
  • Magma
    T:=func; [T(Floor((n+1)/2))+(1+(-1)^n)/2: n in [1..60]]; // Bruno Berselli, Aug 20 2019
  • Maple
    seq(coeff(series(-x*(x^4-x^3-x^2+x+1)/((x-1)^3*(x+1)^2),x,n+1), x, n), n = 1 .. 60); # Muniru A Asiru, Dec 21 2018
  • Mathematica
    Table[Sum[If[EvenQ[k], 1, (k - 1)/2], {k, 0, n}], {n, 60}] (* Jon Maiga, Dec 21 2018 *)
    LinearRecurrence[{1,2,-2,-1,1},{1,2,3,4,6},60] (* Harvey P. Dale, Oct 13 2024 *)

Formula

From Colin Barker, Jul 17 2013: (Start)
a(n) = (16 + 4*n + 2*n^2)/16 for n even, a(n) = (3 + 4*n + n^2)/8 for n odd.
G.f.: -x*(x^4 - x^3 - x^2 + x + 1) / ((x - 1)^3*(x + 1)^2). (End)
a(n) = Sum_{k=0..n-1} A057979(k). - Jon Maiga, Dec 21 2018
a(n) = A000217(floor(n+1)/2) + (1 + (-1)^n)/2. - Bruno Berselli, Aug 20 2019

A232114 a(n) is the Manhattan distance between n and n^2 in a square spiral of positive integers with 1 at the center.

Original entry on oeis.org

0, 2, 2, 2, 6, 4, 6, 8, 6, 12, 8, 12, 12, 12, 16, 12, 20, 14, 20, 18, 20, 22, 20, 26, 20, 30, 22, 30, 26, 30, 30, 30, 34, 30, 38, 30, 42, 32, 42, 36, 42, 40, 42, 44, 42, 48, 42, 52, 42, 56, 44, 56, 48, 56, 52, 56, 56, 56, 60, 56, 64, 56, 68, 56, 72, 58, 72, 62, 72, 66
Offset: 1

Author

Alex Ratushnyak, Nov 19 2013

Keywords

Comments

Spiral begins:
.
49 26--27--28--29--30--31
| | |
48 25 10--11--12--13 32
| | | | |
47 24 9 2---3 14 33
| | | | | | |
46 23 8 1 4 15 34
| | | | | |
45 22 7---6---5 16 35
| | | |
44 21--20--19--18--17 36
| |
43--42--41--40--39--38--37
.
Numbers n such that a(n)=n: 2, 8, 12, 22, 30, 44, 56, 74, 90, 112, 132, 158, 182, 212, 240, 274, 306, 344, 380, 422, ... That is, 2 * A084263.

Crossrefs

Showing 1-6 of 6 results.