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 11-20 of 63 results. Next

A147973 a(n) = -2*n^2 + 12*n - 14.

Original entry on oeis.org

-4, 2, 4, 2, -4, -14, -28, -46, -68, -94, -124, -158, -196, -238, -284, -334, -388, -446, -508, -574, -644, -718, -796, -878, -964, -1054, -1148, -1246, -1348, -1454, -1564, -1678, -1796, -1918, -2044, -2174, -2308, -2446, -2588, -2734, -2884, -3038, -3196, -3358
Offset: 1

Views

Author

Keywords

Comments

-a(n+3) = 2*n^2 - 4, n >= 0, [-4,-2, 4, 14, ...] appears as the first member of the quartet for the square of [n, n+1, n+2, n+3], for n >= 0, in the Clifford algebra Cl_2. The other members are given in A046092(n), A054000(n+1) and A139570(n). The basis of Cl_2 is <1, s1, s2, s12> with s1.s1 = s2.s2 = 1, s12.s12 = -1, s1.s2 = -s2.s1 = s12. See e.g., pp. 5-6, eqs. (2.4)-(2.13) of the S. Gull et al. reference. - Wolfdieter Lang, Oct 15 2014
Related to the previous comment: if one uses the exterior (Grassmann) product with s1.s1 = s2.s2 = s12.s12 = 0 and s1.s2 = -s2.s1 = s12, then the four components of the square of [n, n+1, n+2, n+3] are [A000290(n), A046092(n), A054000(n+1), A139570(n)], n >= 0. - Wolfdieter Lang, Nov 13 2014
2 - a(n)/2 is a square. - Bruno Berselli, Apr 10 2018

Crossrefs

Programs

  • Magma
    [-2*n^2+12*n-14: n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
    
  • Maple
    [-2*n^2+12*n-14$n=1..50]; # Muniru A Asiru, Feb 12 2019
  • Mathematica
    lst={};Do[k=n^2-((n-1)^2+(n-2)^2+(n-3)^2);AppendTo[lst,k],{n,5!}];lst
    Table[-2n^2+12n-14,{n,1,50}] (* Vincenzo Librandi, Jul 10 2012 *)
    LinearRecurrence[{3,-3,1},{-4,2,4},50] (* Harvey P. Dale, Mar 02 2020 *)
  • PARI
    a(n)=-2*n^2+12*n-14 \\ Charles R Greathouse IV, Sep 24 2015
    
  • PARI
    Vec(-2*x*(2 - 7*x + 7*x^2) / (1 - x)^3 + O(x^40)) \\ Colin Barker, Feb 12 2019

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jul 10 2012
a(n) = -2*A008865(n-3). - J. M. Bergot, Jun 25 2018
G.f.: -2*x*(2 - 7*x + 7*x^2)/(1 - x)^3. - Colin Barker, Feb 12 2019
E.g.f.: -2*(exp(x)*(x^2 - 5*x + 7) - 7). - Elmo R. Oliveira, Nov 17 2024

A289192 A(n,k) = n! * Laguerre(n,-k); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 7, 6, 1, 4, 14, 34, 24, 1, 5, 23, 86, 209, 120, 1, 6, 34, 168, 648, 1546, 720, 1, 7, 47, 286, 1473, 5752, 13327, 5040, 1, 8, 62, 446, 2840, 14988, 58576, 130922, 40320, 1, 9, 79, 654, 4929, 32344, 173007, 671568, 1441729, 362880
Offset: 0

Views

Author

Alois P. Heinz, Jun 28 2017

Keywords

Examples

			Square array A(n,k) begins:
:   1,    1,    1,     1,     1,     1, ...
:   1,    2,    3,     4,     5,     6, ...
:   2,    7,   14,    23,    34,    47, ...
:   6,   34,   86,   168,   286,   446, ...
:  24,  209,  648,  1473,  2840,  4929, ...
: 120, 1546, 5752, 14988, 32344, 61870, ...
		

Crossrefs

Rows n=0-2 give: A000012, A000027(k+1), A008865(k+2).
Main diagonal gives A277373.

Programs

  • Maple
    A:= (n,k)-> n! * add(binomial(n, i)*k^i/i!, i=0..n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := n! * LaguerreL[n, -k];
    Table[A[n - k, k], {n, 0, 9}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, May 05 2019 *)
  • PARI
    {T(n, k) = if(n<2, k*n+1, (2*n+k-1)*T(n-1, k)-(n-1)^2*T(n-2, k))} \\ Seiichi Manyama, Feb 03 2021
    
  • PARI
    T(n, k) = n!*pollaguerre(n, 0, -k); \\ Michel Marcus, Feb 05 2021
  • Python
    from sympy import binomial, factorial as f
    def A(n, k): return f(n)*sum(binomial(n, i)*k**i/f(i) for i in range(n + 1))
    for n in range(13): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, Jun 28 2017
    

Formula

A(n,k) = n! * Sum_{i=0..n} k^i/i! * binomial(n,i).
E.g.f. of column k: exp(k*x/(1-x))/(1-x).
A(n, k) = (-1)^n*KummerU(-n, 1, -k). - Peter Luschny, Feb 12 2020
A(n, k) = (2*n+k-1)*A(n-1, k) - (n-1)^2*A(n-2, k) for n > 1. - Seiichi Manyama, Feb 03 2021

A299071 Union_{odd primes p, n >= 3} {T_p(n)}, where T_m(x) = x*T_{m-1}(x) - T_{m-2}(x), m >= 2, T_0(x) = 2, T_1(x) = x (dilated Chebyshev polynomials of the first kind).

Original entry on oeis.org

18, 52, 110, 123, 198, 488, 702, 724, 843, 970, 1298, 1692, 2158, 2525, 3330, 4048, 4862, 5778, 6726, 6802, 7940, 9198, 10084, 10582, 13752, 15550, 17498, 19602, 21868, 24302, 26910, 29698, 30248, 32672, 35838, 39603, 42770, 46548, 50542
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
Sequence avoids numbers of the form T_p(T_2(j)).

Crossrefs

Programs

  • Mathematica
    maxT = 55000; maxn = 12;
    T[0][] = 2; T[1][x] = x;
    T[m_][x_] := T[m][x] = x T[m-1][x] - T[m-2][x];
    TT = Table[T[p][n], {p, Prime[Range[2, maxn]]}, {n, 3, Prime[maxn]}] // Flatten // Union // Select[#, # <= maxT&]&;
    avoid = Table[T[p][T[2][n]], {p, Prime[Range[2, maxn]]}, {n, 3, Prime[maxn] }] // Flatten // Union // Select[#, # <= maxT&]&;
    Complement[TT, avoid] (* Jean-François Alcover, Nov 03 2018 *)

A298878 Union_{p prime, n >= 0} {T_p(n)}, where T_m(x) = x*T_{m-1}(x) - T_{m-2}(x), m >= 2, T_0(x) = 2, T_1(x) = x (dilated Chebyshev polynomials of the first kind).

Original entry on oeis.org

-2, -1, 0, 1, 2, 7, 14, 18, 23, 34, 47, 52, 62, 79, 98, 110, 119, 123, 142, 167, 194, 198, 223, 254, 287, 322, 359, 398, 439, 482, 488, 527, 574, 623, 674, 702, 724, 727, 782, 839, 843, 898, 959, 970, 1022, 1087, 1154, 1223, 1294, 1298, 1367, 1442, 1519, 1598
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].

Crossrefs

A159016 Square array A, read by antidiagonals, with entry n in row k given by A(k,0) = A028387(k) and A(k,n) = A(k,n-1) + floor(sqrt(A(k,n-1))), n>0, k>=0.

Original entry on oeis.org

1, 2, 5, 3, 7, 11, 4, 9, 14, 19, 6, 12, 17, 23, 29, 8, 15, 21, 27, 34, 41, 10, 18, 25, 32, 39, 47, 55, 13, 22, 30, 37, 45, 53, 62, 71, 16, 26, 35, 43, 51, 60, 69, 79, 89, 20, 31, 40, 49, 58, 67, 77, 87, 98, 109, 24, 36, 46, 56, 65, 75, 85, 96, 107, 119, 131
Offset: 0

Views

Author

Philippe Deléham, Apr 02 2009

Keywords

Comments

Permutation of positive integers.

Examples

			Array begins:
...1....2....3....4....6....8...10...13...16...20..
...5....7....9...12...15...18...22...26...31...36..
..11...14...17...21...25...30...35...40...46...52..
..19...23...27...32...37...43...49...56...63...70..
..29...34...39...45...51...58...65...73...81...90..
..41...47...53...60...67...75...83...92..101..111..
..55...62...69...77...85...94..103..113..123..134..
..71...79...87...96..105..115..125..136..147..159..
..89...98..107..117..127..138..149..161..173..186..
.109..119..129..140..151..163..175..188..201..215..
		

Crossrefs

Extensions

Definition corrected by Philippe Deléham, Apr 04 2009
Edited by L. Edson Jeffery, May 28 2013

A101986 Maximum sum of products of successive pairs in a permutation of order n+1.

Original entry on oeis.org

0, 2, 9, 23, 46, 80, 127, 189, 268, 366, 485, 627, 794, 988, 1211, 1465, 1752, 2074, 2433, 2831, 3270, 3752, 4279, 4853, 5476, 6150, 6877, 7659, 8498, 9396, 10355, 11377, 12464, 13618, 14841, 16135, 17502, 18944, 20463, 22061, 23740, 25502
Offset: 0

Views

Author

Eugene McDonnell (eemcd(AT)mac.com), Jan 29 2005

Keywords

Comments

1 3 5 4 2 is the 11th permutation, in lexical order. of order 5. Its reverse 2 4 5 3 1 is the 41st. The earliest permutation of order 6 is the 41st, 1 3 5 6 4 2. This pattern continues as far as I have looked, so its reversal 2 4 6 5 3 1 is the 191st and the earliest permutation of order 7 is the 191st, et cetera.
Comments from Dmitry Kamenetsky, Dec 15 2006: (Start)
This sequence is related to A026035, except here we take the maximum sum of products of successive pairs. Here is a method for generating such permutations. Start with two lists, the first has numbers 1 to n, while the second is empty.
Repeat the following operations until the first list is empty: 1. Move the smallest number of the first list to the leftmost available position in the second list. The move operation removes the original number from the first list. 2. Move the smallest number of the first list to the rightmost available position in the second list. For example when n=8, the permutation is 1, 3, 5, 7, 8, 6, 4, 2. (End)
Convolution of odd numbers and integers greater than 1. - Reinhard Zumkeller, Mar 30 2012
For n>0, a(n) is row 2 of the convolution array A213751. - Clark Kimberling, Jun 20 2012

Examples

			The permutations of order 5 with maximum sum of products is 1 3 5 4 2 and its reverse, since (1*3)+(3*5)+(5*4)+(4*2) is 46. All others are empirically less than 46. So a(4) = 46.
		

Crossrefs

Pairwise sums of A005581.

Programs

  • Haskell
    a101986 n = sum $ zipWith (*) [1,3..] (reverse [2..n+1])
    -- Reinhard Zumkeller, Mar 30 2012
  • J
    0 1 9 2 & p. % 6 & p. (A) NB. the polynomial P such that P(n) is a(n).
    NB. where 0 1 9 2 are the coefficients in ascending order of the numerator of a rational polynomial and 6 is the (constant) coefficient of its denominator. J's primitive function p. produces a polynomial with these coefficients. Division is indicated by % . Thus the J expression (A) is equivalent to the formula above.
    
  • Maple
    a:=n->add((n+j^2),j=1..n): seq(a(n),n=0..41); # Zerinvary Lajos, Jul 27 2006
  • Mathematica
    Table[(n + 9 n^2 + 2 n^3)/6, {n, 0, 41}] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    a(n)=n*(2*n^2+9*n+1)/6 \\ Charles R Greathouse IV, Jan 17 2012
    

Formula

a(n) = n*(2*n^2 + 9*n + 1)/6.
a(n+1) = a(n) + A008865(n+2); a(n) = A160805(n) - 4. [Reinhard Zumkeller, May 26 2009]
G.f.: x*(1+x)*(2-x)/(1-x)^4. - L. Edson Jeffery, Jan 17 2012
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4) for n>3, a(0)=0, a(1)=2, a(2)=9, a(3)=23. - L. Edson Jeffery, Jan 17 2012
a(n) = A000330(n) + A005449(n) - A000217(n). - Richard R. Forberg, Aug 07 2013
a(n) = 1 + sum( A008865(i), i=1..n+1 ). [Bruno Berselli, Jan 13 2015]
a(n) = A000290(n) + A000330(n). - J. M. Bergot, Apr 26 2018

Extensions

Edited by Bruno Berselli, Jan 13 2015
Name edited by Alois P. Heinz, Feb 02 2019

A229012 T(n,k) = number of arrays of median of three adjacent elements of some length n+2 0..k array, with no adjacent equal elements in the latter.

Original entry on oeis.org

2, 3, 2, 4, 7, 2, 5, 14, 15, 2, 6, 23, 46, 31, 2, 7, 34, 101, 130, 57, 2, 8, 47, 186, 359, 332, 105, 2, 9, 62, 307, 794, 1145, 830, 193, 2, 10, 79, 470, 1527, 3002, 3527, 2054, 353, 2, 11, 98, 681, 2666, 6635, 10860, 10735, 5108, 653, 2, 12, 119, 946, 4335, 13040, 27379
Offset: 1

Views

Author

R. H. Hardin, Sep 10 2013

Keywords

Comments

Table starts
.2...3.....4......5......6.......7.......8........9.......10.......11........12
.2...7....14.....23.....34......47......62.......79.......98......119.......142
.2..15....46....101....186.....307.....470......681......946.....1271......1662
.2..31...130....359....794....1527....2666.....4335.....6674.....9839.....14002
.2..57...332...1145...3002....6635...13040....23515....39698....63605.....97668
.2.105...830...3527..10860...27379...60180...119653...220318...381749....629586
.2.193..2054..10735..38768..111311..273124...597477..1197190..2238005...3954490
.2.353..5108..32907.139456..456029.1248872..3004839..6549040.13200731..24974126
.2.653.12790.101635.506236.1888383.5780144.15315095.36345246.79063593.160271154

Examples

			Some solutions for n=4 k=4
..1....1....0....3....4....1....2....3....2....3....3....1....1....0....2....2
..4....1....1....1....3....0....2....1....0....0....2....3....4....4....0....1
..0....1....3....3....3....2....0....1....4....2....2....4....1....1....3....3
..3....2....3....1....0....0....1....3....3....1....0....3....4....4....2....3
		

Crossrefs

Row 2 is A008865(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: [order 13]
k=3: [order 27]
k=4: [order 46]
k=5: [order 69]
k=6: [order 95] for n>97
Empirical for row n:
n=1: a(n) = 1*n + 1
n=2: a(n) = 1*n^2 + 2*n - 1
n=3: a(n) = 1*n^3 + 3*n^2 - 3*n + 1
n=4: a(n) = (2/3)*n^4 + (10/3)*n^3 - (5/3)*n^2 + (2/3)*n - 1
n=5: [polynomial of degree 5]
n=6: [polynomial of degree 6]
n=7: [polynomial of degree 7]

A057897 Numbers which can be written as m^k-k, with m, k > 1.

Original entry on oeis.org

2, 5, 7, 12, 14, 23, 24, 27, 34, 47, 58, 61, 62, 77, 79, 98, 119, 121, 122, 142, 167, 194, 213, 223, 238, 248, 252, 254, 287, 322, 340, 359, 398, 439, 482, 503, 509, 527, 574, 621, 623, 674, 723, 726, 727, 782, 839, 898, 959, 997, 1014, 1019, 1022, 1087, 1154
Offset: 1

Views

Author

Henry Bottomley, Sep 26 2000

Keywords

Comments

It may be that positive integers can be written as m^k-k (with m and k > 1) in at most one way [checked up to 10000].
All numbers < 10^16 of this form have a unique representation. The uniqueness question leads to a Pillai-like exponential Diophantine equation a^x-b^y = x-y for x > y > 1 and b > a > 1, which appears to have no solutions. - T. D. Noe, Oct 06 2004

Crossrefs

Cf. A099225 (numbers of the form m^k+k, with m and k > 1), A074981 (n such that there is no solution to Pillai's equation), A099226 (numbers that can be represented as both a^x+x and b^y-y, for some a, b, x, y > 1).

Programs

  • Mathematica
    nLim=1000; lst={}; Do[k=2; While[n=m^k-k; n<=nLim, AppendTo[lst, n]; k++ ], {m, 2, Sqrt[nLim]}]; Union[lst] (* T. D. Noe, Oct 06 2004 *)
  • PARI
    ok(n)={my(e=2); while(2^e <= n+e, if(ispower(n+e, e), return(1)); e++); 0} \\ Andrew Howroyd, Oct 20 2020
    
  • PARI
    upto(lim)={my(p=logint(lim,2)); while(logint(lim+p+1,2)>p, p++); Vec(Set(concat(vector(p-1, e, e++; vector(sqrtnint(lim+e,e)-1, m, (m+1)^e-e)))))} \\ Andrew Howroyd, Oct 20 2020

A212835 T(n,k)=Number of 0..k arrays of length n+1 with 0 never adjacent to k.

Original entry on oeis.org

2, 7, 2, 14, 17, 2, 23, 50, 41, 2, 34, 107, 178, 99, 2, 47, 194, 497, 634, 239, 2, 62, 317, 1106, 2309, 2258, 577, 2, 79, 482, 2137, 6306, 10727, 8042, 1393, 2, 98, 695, 3746, 14407, 35954, 49835, 28642, 3363, 2, 119, 962, 6113, 29114, 97127, 204994, 231521
Offset: 1

Views

Author

R. H. Hardin May 28 2012

Keywords

Comments

Table starts
.2.....7......14.......23........34.........47.........62..........79
.2....17......50......107.......194........317........482.........695
.2....41.....178......497......1106.......2137.......3746........6113
.2....99.....634.....2309......6306......14407......29114.......53769
.2...239....2258....10727.....35954......97127.....226274......472943
.2...577....8042....49835....204994.....654797....1758602.....4159927
.2..1393...28642...231521...1168786....4414417...13667858....36590017
.2..3363..102010..1075589...6663906...29760487..106226618...321839625
.2..8119..363314..4996919..37994674..200635007..825593474..2830847119
.2.19601.1293962.23214443.216628994.1352612477.6416514026.24899654327

Examples

			Some solutions for n=5 k=4
..1....4....1....1....1....3....2....1....1....4....3....1....0....2....2....3
..1....3....0....4....2....4....1....1....2....2....3....4....1....3....3....1
..1....3....3....1....3....3....2....2....2....4....3....3....1....1....0....3
..1....3....0....4....2....3....3....3....4....2....2....0....4....4....2....1
..1....4....0....3....2....2....3....3....4....4....0....1....4....3....4....2
..1....2....0....4....3....1....0....2....4....2....3....2....1....4....3....4
		

Crossrefs

Column 2 is A001333(n+2)
Column 3 is A055099(n+1)
Column 4 is A126473(n+1)
Column 5 is A126501(n+1)
Column 6 is A126528(n+1)
Row 1 is A008865(n+1)

Formula

Empirical for column k: a(n) = k*a(n-1) +(k-1)*a(n-2)
Empirical for rows:
n=1: a(k) = k^2 + 2*k - 1
n=2: a(k) = k^3 + 3*k^2 - k - 1
n=3: a(k) = k^4 + 4*k^3 - 4*k + 1
n=4: a(k) = k^5 + 5*k^4 + 2*k^3 - 8*k^2 + k + 1
n=5: a(k) = k^6 + 6*k^5 + 5*k^4 - 12*k^3 - 3*k^2 + 6*k - 1
n=6: a(k) = k^7 + 7*k^6 + 9*k^5 - 15*k^4 - 13*k^3 + 15*k^2 - k - 1
n=7: a(k) = k^8 + 8*k^7 + 14*k^6 - 16*k^5 - 30*k^4 + 24*k^3 + 8*k^2 - 8*k + 1

A195437 Triangle formed by: 1 even, 2 odd, 3 even, 4 odd... starting with 2.

Original entry on oeis.org

2, 5, 7, 10, 12, 14, 17, 19, 21, 23, 26, 28, 30, 32, 34, 37, 39, 41, 43, 45, 47, 50, 52, 54, 56, 58, 60, 62, 65, 67, 69, 71, 73, 75, 77, 79, 82, 84, 86, 88, 90, 92, 94, 96, 98, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 122, 124, 126, 128, 130, 132
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 12 2011

Keywords

Comments

A127366(T(n,k)) mod 2 = 1;
T(n,k) mod 2 + A000196(T(n,k)) mod 2 = 1;
complement of A133280.

Crossrefs

Cf. A002522 (left edge), A008865 (right edge), A011379 (row sums), A002939 (central terms).

Programs

  • Haskell
    a195437 n k = a195437_tabl !! n !! k
    a195437_tabl = tail $ g 1 1 [0..] where
       g m j xs = (filter ((== m) . (`mod` 2)) ys) : g (1 - m) (j + 2) xs'
         where (ys,xs') = splitAt j xs
    b195437 = bFile' "A195437" (concat $ take 101 a195437_tabl) 0
    -- Reinhard Zumkeller, Nov 23 2011 (fixed), Oct 12 2011
  • Mathematica
    p[n_,k_]:=NestList[#+2&,n,k-1]; Module[{nn=6,ev,od},ev=p@@@Partition[Riffle[Table[ 4n^2-4n+2,{n,nn}],Range[ 1,2nn,2]],2];od=p@@@Partition[Riffle[Table[4n^2+1,{n,nn}],Range[ 2,2nn+1,2]],2];Sort[Flatten[Join[ev,od]]]] (* Harvey P. Dale, Aug 27 2023 *)
Previous Showing 11-20 of 63 results. Next