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

A140113 a(1)=1, a(n)=a(n-1)+n if n odd, a(n)=a(n-1)+ n^2 if n is even.

Original entry on oeis.org

1, 5, 8, 24, 29, 65, 72, 136, 145, 245, 256, 400, 413, 609, 624, 880, 897, 1221, 1240, 1640, 1661, 2145, 2168, 2744, 2769, 3445, 3472, 4256, 4285, 5185, 5216, 6240, 6273, 7429, 7464, 8760, 8797, 10241, 10280, 11880, 11921, 13685, 13728, 15664, 15709
Offset: 1

Views

Author

Artur Jasinski, May 08 2008

Keywords

Comments

One notices the powers 8, 256, 400, and 2744 (14^3) and wonders if the sum is ever again a power. [J. M. Bergot, Sep 07 2011]

Crossrefs

Cf. A136047.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+n+1,a+(n+1)^2]}; Transpose[ NestList[ nxt,{1,1},50]][[2]] (* or *) LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,5,8,24,29,65,72},50] (* Harvey P. Dale, Jul 22 2014 *)
    CoefficientList[Series[(- x^4 + 4 x^3 + 4 x + 1)/(x^7 - x^6 - 3 x^5 + 3 x^4 + 3 x^3 - 3 x^2 - x + 1), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 23 2014 *)
  • PARI
    print1(a=1);for(n=2,99,print1(", ",a+=n^(2-n%2))) \\ Charles R Greathouse IV, Jul 19 2011

Formula

O.g.f.: (-x^4 + 4*x^3 + 4*x + 1)/(x^7 - x^6 - 3*x^5 + 3*x^4 + 3*x^3 - 3*x^2 - x + 1). - Alexander R. Povolotsky, May 08 2008
a(2*n) = A185872(n,2); a(2*n-1) = A100178(n). - Franck Maminirina Ramaharo, Feb 26 2018

A299989 Triangle read by rows: T(n,0) = 0 for n >= 0; T(n,2*k+1) = A152842(2*n,2*(n-k)) and T(n,2*k) = A152842(2*n,2*(n-k)+1) for n >= k > 0.

Original entry on oeis.org

0, 1, 0, 3, 4, 1, 0, 9, 24, 22, 8, 1, 0, 27, 108, 171, 136, 57, 12, 1, 0, 81, 432, 972, 1200, 886, 400, 108, 16, 1, 0, 243, 1620, 4725, 7920, 8430, 5944, 2810, 880, 175, 20, 1, 0, 729, 5832, 20898, 44280, 61695, 59472, 40636, 19824, 6855, 1640, 258, 24, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of state diagrams having k components of n connected summed trefoil knots.
Row sums gives A001018.

Examples

			The triangle T(n, k) begins:
n\k 0     1      2      3       4       5       6      7        8       9
0:  0     1
1:  0     3      4      1
2:  0     9     24     22       8       1
3:  0    27    108    171     136      57      12       1
4:  0    81    432    972    1200     886     400     108      16       1
		

References

  • V. I. Arnold, Topological Invariants of Plane Curves and Caustics, American Math. Soc., 1994.

Crossrefs

Row 2: row 5 of A158454.
Row 3: row 2 of A220665.
Row 4: row 5 of A219234.

Programs

  • Mathematica
    row[n_] := CoefficientList[x*(x^2 + 4*x + 3)^n, x]; Array[row, 7, 0] // Flatten (* Jean-François Alcover, Mar 16 2018 *)
  • Maxima
    g(x, y) := taylor(x/(1 - y*(x^2 + 4*x + 3)), y, 0, 10)$
    a : makelist(ratcoef(g(x, y), y, n), n, 0, 10)$
    T : []$
    for i:1 thru 11 do
      T : append(T, makelist(ratcoef(a[i], x, n), n, 0, 2*i - 1))$
    T;
    
  • PARI
    T(n, k) = polcoeff(x*(x^2 + 4*x + 3)^n, k);
    tabf(nn) = for (n=0, nn, for (k=0, 2*n+1, print1(T(n, k), ", ")); print); \\ Michel Marcus, Mar 03 2018

Formula

T(n,k) = coefficients of x*(x^2 + 4*x + 3)^n.
T(n,k) = T(n-1,k-2) + 4*T(n-1,k-1) + 3*T(n-1,k), with T(n,0) = 0, T(n,1) = 3^n and T(n,2) = 4*n*3^(n-1).
T(n,n+k+1) = A152842(2*n,n+k) and T(n,n-k) = A152842(2*n,n+k+1), for n >= k >= 0.
T(n,1) = A000244(n).
T(n,2) = A120908(n).
T(n,n+1) = A069835(n).
T(n,2*n-1) = A139272(n).
T(n,2*n) = A008586(n).
T(n,2*n-2) = A140138(4*n) = A185872(2n,2) for n >= 1.
G.f.: x/(1 - y*(x^2 + 4*x + 3)).

Extensions

Typo in row 6 corrected by Jean-François Alcover, Mar 16 2018

A185868 (Odd,odd)-polka dot array in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

1, 4, 6, 11, 13, 15, 22, 24, 26, 28, 37, 39, 41, 43, 45, 56, 58, 60, 62, 64, 66, 79, 81, 83, 85, 87, 89, 91, 106, 108, 110, 112, 114, 116, 118, 120, 137, 139, 141, 143, 145, 147, 149, 151, 153, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is one of four polka dot arrays in the natural number array A000027:
(odd,odd): A185868
(odd,even): A185869
(even,odd): A185870
(even,even): A185871
row 1: A084849
col 1: A000384
col 2: A091823
diag (1,13,...): A102083
diag (4,24,...): A085250
antidiagonal sums: A059722

Examples

			The natural number array A000027 has northwest corner
  1...2...4...7...11
  3...5...8...12..17
  6...9...13..18..24
  10..14..19..25..32
  15..20..26..33..41
The numbers in (odd,odd) positions comprise A185868:
  1....4....11...22...37
  6....13...24...39...58
  15...26...41...60...83
  28...43...62...85...112
		

Crossrefs

Cf. A000027 (as an array), A185872, A185869, A185870, A185871.

Programs

  • Mathematica
    f[n_,k_]:=2n-1+(n+k-2)(2n+2k-3);
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
  • Python
    from math import isqrt, comb
    def A185868(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        x = n-comb(a,2)
        y = a-x+1
        return y*((y+(c:=x<<1)<<1)-7)+x*(c-5)+5 # Chai Wah Wu, Jun 18 2025

Formula

T(n,k) = 2*n-1+(n+k-2)*(2*n+2*k-3).
Showing 1-3 of 3 results.