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.

A191347 Array read by antidiagonals: ((floor(sqrt(n)) + sqrt(n))^k + (floor(sqrt(n)) - sqrt(n))^k)/2 for columns k >= 0 and rows n >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 4, 3, 1, 1, 0, 8, 7, 4, 2, 1, 0, 16, 17, 10, 8, 2, 1, 0, 32, 41, 28, 32, 9, 2, 1, 0, 64, 99, 76, 128, 38, 10, 2, 1, 0, 128, 239, 208, 512, 161, 44, 11, 2, 1, 0, 256, 577, 568, 2048, 682, 196, 50, 12, 3, 1
Offset: 0

Views

Author

Charles L. Hohn, May 31 2011

Keywords

Examples

			1, 0,  0,   0,    0,    0,     0,      0,       0,        0,        0, ...
1, 1,  2,   4,    8,   16,    32,     64,     128,      256,      512, ...
1, 1,  3,   7,   17,   41,    99,    239,     577,     1393,     3363, ...
1, 1,  4,  10,   28,   76,   208,    568,    1552,     4240,    11584, ...
1, 2,  8,  32,  128,  512,  2048,   8192,   32768,   131072,   524288, ...
1, 2,  9,  38,  161,  682,  2889,  12238,   51841,   219602,   930249, ...
1, 2, 10,  44,  196,  872,  3880,  17264,   76816,   341792,  1520800, ...
1, 2, 11,  50,  233, 1082,  5027,  23354,  108497,   504050,  2341691, ...
1, 2, 12,  56,  272, 1312,  6336,  30592,  147712,   713216,  3443712, ...
1, 3, 18, 108,  648, 3888, 23328, 139968,  839808,  5038848, 30233088, ...
1, 3, 19, 117,  721, 4443, 27379, 168717, 1039681,  6406803, 39480499, ...
1, 3, 20, 126,  796, 5028, 31760, 200616, 1267216,  8004528, 50561600, ...
1, 3, 21, 135,  873, 5643, 36477, 235791, 1524177,  9852435, 63687141, ...
1, 3, 22, 144,  952, 6288, 41536, 274368, 1812352, 11971584, 79078912, ...
1, 3, 23, 153, 1033, 6963, 46943, 316473, 2133553, 14383683, 96969863, ...
...
		

Crossrefs

Row 1 is A000007, row 2 is A011782, row 3 is A001333, row 4 is A026150, row 5 is A081294, row 6 is A001077, row 7 is A084059, row 8 is A108851, row 9 is A084128, row 10 is A081341, row 11 is A005667, row 13 is A141041.
Row 3*2 is A002203, row 4*2 is A080040, row 5*2 is A155543, row 6*2 is A014448, row 8*2 is A080042, row 9*2 is A170931, row 11*2 is A085447.
Cf. A191348 which uses ceiling() in place of floor().

Programs

  • PARI
    T(n, k) = if (n==0, k==0, my(x=sqrtint(n)); sum(i=0, (k+1)\2, binomial(k, 2*i)*x^(k-2*i)*n^i));
    matrix(9,9, n, k, T(n-1,k-1)) \\ Michel Marcus, Aug 22 2019
    
  • PARI
    T(n, k) = if (k==0, 1, if (k==1, sqrtint(n), T(n,k-2)*(n-T(n,1)^2) + T(n,k-1)*T(n,1)*2));
    matrix(9, 9, n, k, T(n-1, k-1)) \\ Charles L. Hohn, Aug 22 2019

Formula

For each row n>=0 let T(n,0)=1 and T(n,1)=floor(sqrt(n)), then for each column k>=2: T(n,k)=T(n,k-2)*(n-T(n,1)^2) + T(n,k-1)*T(n,1)*2. - Charles L. Hohn, Aug 22 2019
T(n, k) = Sum_{i=0..floor((k+1)/2)} binomial(k, 2*i)*floor(sqrt(n))^(k-2*i)*n^i for n > 0, with T(0, 0) = 1 and T(0, k) = 0 for k > 0. - Michel Marcus, Aug 23 2019

A309852 Array read by antidiagonals: ((z+sqrt(x))/2)^k + ((z-sqrt(x))/2)^k for columns k >= 0 and rows n >= 0, where x = 4*n+1 and y = floor(sqrt(x)) and z = y-1+(y mod 2).

Original entry on oeis.org

2, 1, 2, 1, 1, 2, 1, 3, 3, 2, 1, 4, 9, 3, 2, 1, 7, 27, 11, 3, 2, 1, 11, 81, 36, 13, 3, 2, 1, 18, 243, 119, 45, 15, 5, 2, 1, 29, 729, 393, 161, 54, 25, 5, 2, 1, 47, 2187, 1298, 573, 207, 125, 27, 5, 2, 1, 76, 6561, 4287, 2041, 783, 625, 140, 29, 5, 2
Offset: 0

Views

Author

Charles L. Hohn, Aug 20 2019

Keywords

Comments

One of 4 related arrays (the others being A191347, A191348, and A309853) where the two halves of the main formula approach the integers shown and 0 respectively, and also with A309853 where rows represent various Fibonacci series a(n) = a(n-2)*b + a(n-1)*c where b and c are integers >= 0.

Examples

			Array begins:
  2, 1,  1,   1,    1,    1,     1,      1,       1,       1,        1, ...
  2, 1,  3,   4,    7,   11,    18,     29,      47,      76,      123, ...
  2, 3,  9,  27,   81,  243,   729,   2187,    6561,   19683,    59049, ...
  2, 3, 11,  36,  119,  393,  1298,   4287,   14159,   46764,   154451, ...
  2, 3, 13,  45,  161,  573,  2041,   7269,   25889,   92205,   328393, ...
  2, 3, 15,  54,  207,  783,  2970,  11259,   42687,  161838,   613575, ...
  2, 5, 25, 125,  625, 3125, 15625,  78125,  390625, 1953125,  9765625, ...
  2, 5, 27, 140,  727, 3775, 19602, 101785,  528527, 2744420, 14250627, ...
  2, 5, 29, 155,  833, 4475, 24041, 129155,  693857, 3727595, 20025689, ...
  2, 5, 31, 170,  943, 5225, 28954, 160445,  889087, 4926770, 27301111, ...
  2, 5, 33, 185, 1057, 6025, 34353, 195865, 1116737, 6367145, 36302673, ...
  ...
		

Crossrefs

Row 2 is A000032, row 3 (except the first term) is A000244, row 4 is A006497, row 5 is A206776, row 6 is A172012, row 7 (except the first term) is A000351, row 8 is A087130.

Programs

  • PARI
    T(n, k) = my(x = 4*n+1, y = sqrtint(x), z = y-1+(y % 2)); round(((z+sqrt(x))/2)^k + ((z-sqrt(x))/2)^k);
    matrix(9,9, n, k, T(n-1,k-1)) \\ Michel Marcus, Aug 22 2019
    
  • PARI
    T(n, k) = my(x = 4*n+1, y = sqrtint(x), z=y-1+(y % 2)); v=if(k==0, 2, k==1, z, mapget(m2, n)*((x-z^2)/4) + mapget(m1, n)*z); mapput(m2, n, if(mapisdefined(m1, n), mapget(m1, n), 0)); mapput(m1, n, v); v;
    m1=Map(); m2=Map(); matrix(9, 9, n, k, T(n-1, k-1)) \\ Charles L. Hohn, Aug 26 2019

Formula

For each row n>=0 let x = 4*n+1, y = floor(sqrt(x)), T(n,0)=2, and T(n,1)=y-1+(y % 2), then for each column k>=2: T(n, k-2)*((x-T(n, 1)^2)/4) + T(n, k-1)*T(n, 1). - Charles L. Hohn, Aug 23 2019

A309853 Array read by antidiagonals: ((z+sqrt(x))/2)^k + ((z-sqrt(x))/2)^k for columns k >= 0 and rows n >= 0, where x = 4*n+1 and y = ceiling(sqrt(x)) and z = y+1-(y mod 2).

Original entry on oeis.org

2, 1, 2, 1, 3, 2, 1, 7, 3, 2, 1, 18, 9, 5, 2, 1, 47, 27, 19, 5, 2, 1, 123, 81, 80, 21, 5, 2, 1, 322, 243, 343, 95, 23, 5, 2, 1, 843, 729, 1475, 433, 110, 25, 7, 2, 1, 2207, 2187, 6346, 1975, 527, 125, 39, 7, 2, 1, 5778, 6561, 27305, 9009, 2525, 625, 238, 41, 7, 2
Offset: 0

Views

Author

Charles L. Hohn, Aug 20 2019

Keywords

Comments

One of 4 related arrays (the others being A191347, A191348, and A309852) where the two halves of the main formula approach the integers shown and 0 respectively, and also with A309852 where rows represent various Fibonacci series a(n) = a(n-2)*b + a(n-1)*c where b and c are integers >= 0.

Examples

			2, 1,  1,   1,    1,     1,     1,      1,       1,        1, ...
2, 3,  7,  18,   47,   123,   322,    843,    2207,     5778, ...
2, 3,  9,  27,   81,   243,   729,   2187,    6561,    19683, ...
2, 5, 19,  80,  343,  1475,  6346,  27305,  117487,   505520, ...
2, 5, 21,  95,  433,  1975,  9009,  41095,  187457,   855095, ...
2, 5, 23, 110,  527,  2525, 12098,  57965,  277727,  1330670, ...
2, 5, 25, 125,  625,  3125, 15625,  78125,  390625,  1953125, ...
2, 7, 39, 238, 1471,  9107, 56394, 349223, 2162591, 13392022, ...
2, 7, 41, 259, 1649, 10507, 66953, 426643, 2718689, 17324251, ...
2, 7, 43, 280, 1831, 11977, 78346, 512491, 3352399, 21929320, ...
2, 7, 45, 301, 2017, 13517, 90585, 607061, 4068257, 27263677, ...
...
		

Crossrefs

Row 2 is A005248, row 3 (except the first term) is A000244, row 4 is A228569, row 5 is A159289, row 6 is A003501, row 7 (except the first term) is A000351.

Programs

  • PARI
    T(n, k) = my(x = 4*n+1, y = ceil(sqrt(x)), z = y+1-(y % 2)); round(((z+sqrt(x))/2)^k + ((z-sqrt(x))/2)^k);
    matrix(9, 9, n, k, T(n-1, k-1)) \\ Michel Marcus, Aug 22 2019

Extensions

Revised orientation of n and k to customary T(n, k), by Charles L. Hohn, Sep 27 2024
Showing 1-3 of 3 results.