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-10 of 35 results. Next

A067998 a(n) = n^2 - 2*n.

Original entry on oeis.org

0, -1, 0, 3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 195, 224, 255, 288, 323, 360, 399, 440, 483, 528, 575, 624, 675, 728, 783, 840, 899, 960, 1023, 1088, 1155, 1224, 1295, 1368, 1443, 1520, 1599, 1680, 1763, 1848, 1935, 2024, 2115, 2208, 2303, 2400, 2499, 2600, 2703, 2808, 2915, 3024, 3135, 3248, 3363
Offset: 0

Views

Author

George E. Antoniou, Feb 06 2002

Keywords

Comments

a(n) is essentially the case 0 of the polygonal numbers. The polygonal numbers are defined as P_k(n) = Sum_{i=1..n} ((k-2)*i-(k-3)). Thus P_0(n) = 2*n - n^2 and a(n) = -P_0(n). - Peter Luschny, Jul 08 2011
For n >= 3, the denominator of the probability of winning the prize by switching from the initial choice of doors in a generalized Monty Hall problem with n doors: After a prize has been placed behind exactly one of the n doors at random, a contestant chooses a door. Then the host, who knows where the prize is, deliberately opens exactly one unchosen door that does not hide the prize (picked at random by the host among such doors when there is a choice) and then gives the contestant an opportunity to switch to any other door not yet opened. The numerator of this probability is n-1 (incidentally, gcd(n-1, n*(n-2)) = 1). The probability of winning by switching minus the probability of winning by not switching is thus (n-1)/(n*(n-2)) - 1/n = 1/a(n), which approaches zero as n approaches infinity, but nevertheless makes the switching strategy better for every finite n >= 3. The winning probability is 2/3 from switching in the classic 3-door Monty Hall problem; we have 3/8 and 4/15, respectively, in the 4- and 5-door generalizations. (The above analysis was independent but is consistent with the even more general "N-doors" section of the Wikipedia article, other parts of which make clear the historical importance of wording this problem as carefully as possible. See also A122774.) - Rick L. Shepherd, May 31 2014, clarified Oct 29 2015
For n > 1, a(n) is the largest integer k such that k + n^2 is a multiple of k + n. - Derek Orr, Sep 04 2014

Crossrefs

Essentially the same as A005563.
Cf. A060747 (first differences).
Cf. A000290.

Programs

Formula

a(n) = A005563(n-2) = A005563(-n) = A000290(n-1)-1.
G.f.: x*(3*x-1)/(1-x)^3. - Paul Barry, Mar 27 2007
E.g.f.: exp(x)*(x^2-x). - Paul Barry, Mar 27 2007
a(n) = 2*n + a(n-1) - 3 (with a(0)=0). - Vincenzo Librandi, Aug 08 2010
From Amiram Eldar, Feb 17 2023: (Start)
Sum_{n>=3} 1/a(n) = 3/4.
Sum_{n>=3} (-1)^(n+1)/a(n) = 1/4. (End)

Extensions

Edited and extended by Robert G. Wilson v, Feb 08 2002

A141419 Triangle read by rows: T(n, k) = A000217(n) - A000217(n - k) with 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 12, 14, 15, 6, 11, 15, 18, 20, 21, 7, 13, 18, 22, 25, 27, 28, 8, 15, 21, 26, 30, 33, 35, 36, 9, 17, 24, 30, 35, 39, 42, 44, 45, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55
Offset: 1

Views

Author

Roger L. Bagula, Aug 05 2008

Keywords

Comments

As a rectangle, the accumulation array of A051340.
From Clark Kimberling, Feb 05 2011: (Start)
Here all the weights are divided by two where they aren't in Cahn.
As a rectangle, A141419 is in the accumulation chain
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
row 1: A000027
col 1: A000217
diag (1,5,...): A000326 (pentagonal numbers)
diag (2,7,...): A005449 (second pentagonal numbers)
diag (3,9,...): A045943 (triangular matchstick numbers)
diag (4,11,...): A115067
diag (5,13,...): A140090
diag (6,15,...): A140091
diag (7,17,...): A059845
diag (8,19,...): A140672
(End)
Let N=2*n+1 and k=1,2,...,n. Let A_{N,n-1} = [0,...,0,1; 0,...,0,1,1; ...; 0,1,...,1; 1,...,1], an n X n unit-primitive matrix (see [Jeffery]). Let M_n=[A_{N,n-1}]^4. Then t(n,k)=[M_n](1,k), that is, the n-th row of the triangle is given by the first row of M_n. - _L. Edson Jeffery, Nov 20 2011
Conjecture. Let N=2*n+1 and k=1,...,n. Let A_{N,0}, A_{N,1}, ..., A_{N,n-1} be the n X n unit-primitive matrices (again see [Jeffery]) associated with N, and define the Chebyshev polynomials of the second kind by the recurrence U_0(x) = 1, U_1(x) = 2*x and U_r(x) = 2*x*U_(r-1)(x) - U_(r-2)(x) (r>1). Define the column vectors V_(k-1) = (U_(k-1)(cos(Pi/N)), U_(k-1)(cos(3*Pi/N)), ..., U_(k-1)(cos((2*n-1)*Pi/N)))^T, where T denotes matrix transpose. Let S_N = [V_0, V_1, ..., V_(n-1)] be the n X n matrix formed by taking V_(k-1) as column k-1. Let X_N = [S_N]^T*S_N, and let [X_N](i,j) denote the entry in row i and column j of X_N, i,j in {0,...,n-1}. Then t(n,k) = [X_N](k-1,k-1), and row n of the triangle is given by the main diagonal entries of X_N. Remarks: Hence t(n,k) is the sum of squares t(n,k) = sum[m=1,...,n (U_(k-1)(cos((2*m-1)*Pi/N)))^2]. Finally, this sequence is related to A057059, since X_N = [sum_{m=1,...,n} A057059(n,m)*A_{N,m-1}] is also an integral linear combination of unit-primitive matrices from the N-th set. - L. Edson Jeffery, Jan 20 2012
Row sums: n*(n+1)*(2*n+1)/6. - L. Edson Jeffery, Jan 25 2013
n-th row = partial sums of n-th row of A004736. - Reinhard Zumkeller, Aug 04 2014
T(n,k) is the number of distinct sums made by at most k elements in {1, 2, ... n}, for 1 <= k <= n, e.g., T(6,2) = the number of distinct sums made by at most 2 elements in {1,2,3,4,5,6}. The sums range from 1, to 5+6=11. So there are 11 distinct sums. - Derek Orr, Nov 26 2014
A number n occurs in this sequence A001227(n) times, the number of odd divisors of n, see A209260. - Hartmut F. W. Hoft, Apr 14 2016
Conjecture: 2*n + 1 is composite if and only if gcd(t(n,m),m) != 1, for some m. - L. Edson Jeffery, Jan 30 2018
From Peter Munn, Aug 21 2019 in respect of the sequence read as a triangle: (Start)
A number m can be found in column k if and only if A286013(m, k) is nonzero, in which case m occurs in column k on row A286013(m, k).
The first occurrence of m is in row A212652(m) column A109814(m), which is the rightmost column in which m occurs. This occurrence determines where m appears in A209260. The last occurrence of m is in row m column 1.
Viewed as a sequence of rows, consider the subsequences (of rows) that contain every positive integer. The lexicographically latest of these subsequences consists of the rows with row numbers in A270877; this is the only one that contains its own row numbers only once.
(End)

Examples

			As a triangle:
   1,
   2,  3,
   3,  5,  6,
   4,  7,  9, 10,
   5,  9, 12, 14, 15,
   6, 11, 15, 18, 20, 21,
   7, 13, 18, 22, 25, 27, 28,
   8, 15, 21, 26, 30, 33, 35, 36,
   9, 17, 24, 30, 35, 39, 42, 44, 45,
  10, 19, 27, 34, 40, 45, 49, 52, 54, 55;
As a rectangle:
   1   2   3   4   5   6   7   8   9  10
   3   5   7   9  11  13  15  17  19  21
   6   9  12  15  18  21  24  27  30  33
  10  14  18  22  26  30  34  38  42  46
  15  20  25  30  35  40  45  50  55  60
  21  27  33  39  45  51  57  63  69  75
  28  35  42  49  56  63  70  77  84  91
  36  44  52  60  68  76  84  92 100 108
  45  54  63  72  81  90  99 108 117 126
  55  65  75  85  95 105 115 125 135 145
Since the odd divisors of 15 are 1, 3, 5 and 15, number 15 appears four times in the triangle at t(3+(5-1)/2, 5) in column 5 since 5+1 <= 2*3, t(5+(3-1)/2, 3), t(1+(15-1)/2, 2*1) in column 2 since 15+1 > 2*1, and t(15+(1-1)/2, 1). - _Hartmut F. W. Hoft_, Apr 14 2016
		

References

  • R. N. Cahn, Semi-Simple Lie Algebras and Their Representations, Dover, NY, 2006, ISBN 0-486-44999-8, p. 139.

Crossrefs

Cf. A000330 (row sums), A004736, A057059, A070543.
A144112, A051340, A141419, A185874, A185875, A185876 are accumulation chain related.
A141418 is a variant.
Cf. A001227, A209260. - Hartmut F. W. Hoft, Apr 14 2016
A109814, A212652, A270877, A286013 relate to where each natural number appears in this sequence.
A000027, A000217, A000326, A005449, A045943, A059845, A115067, A140090, A140091, A140672 are rows, columns or diagonals - refer to comments.

Programs

  • Haskell
    a141419 n k =  k * (2 * n - k + 1) `div` 2
    a141419_row n = a141419_tabl !! (n-1)
    a141419_tabl = map (scanl1 (+)) a004736_tabl
    -- Reinhard Zumkeller, Aug 04 2014
  • Maple
    a:=(n,k)->k*n-binomial(k,2): seq(seq(a(n,k),k=1..n),n=1..12); # Muniru A Asiru, Oct 14 2018
  • Mathematica
    T[n_, m_] = m*(2*n - m + 1)/2; a = Table[Table[T[n, m], {m, 1, n}], {n, 1, 10}]; Flatten[a]

Formula

t(n,m) = m*(2*n - m + 1)/2.
t(n,m) = A000217(n) - A000217(n-m). - L. Edson Jeffery, Jan 16 2013
Let v = d*h with h odd be an integer factorization, then v = t(d+(h-1)/2, h) if h+1 <= 2*d, and v = t(d+(h-1)/2, 2*d) if h+1 > 2*d; see A209260. - Hartmut F. W. Hoft, Apr 14 2016
G.f.: y*(-x + y)/((-1 + x)^2*(-1 + y)^3). - Stefano Spezia, Oct 14 2018
T(n, 2) = A060747(n) for n > 1. T(n, 3) = A008585(n - 1) for n > 2. T(n, 4) = A016825(n - 2) for n > 3. T(n, 5) = A008587(n - 2) for n > 4. T(n, 6) = A016945(n - 3) for n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7.r n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7. T(n, 9) = A008591(n - 4) for n > 8. T(n, 10) = A017329(n - 5) for n > 9. T(n, 11) = A008593(n - 5) for n > 10. T(n, 12) = A017593(n - 6) for n > 11. T(n, 13) = A008595(n - 6) for n > 12. T(n, 14) = A147587(n - 7) for n > 13. T(n, 15) = A008597(n - 7) for n > 14. T(n, 16) = A051062(n - 8) for n > 15. T(n, 17) = A008599(n - 8) for n > 16. - Stefano Spezia, Oct 14 2018
T(2*n-k, k) = A070543(n, k). - Peter Munn, Aug 21 2019

Extensions

Simpler name by Stefano Spezia, Oct 14 2018

A140811 a(n) = 6*n^2 - 1.

Original entry on oeis.org

-1, 5, 23, 53, 95, 149, 215, 293, 383, 485, 599, 725, 863, 1013, 1175, 1349, 1535, 1733, 1943, 2165, 2399, 2645, 2903, 3173, 3455, 3749, 4055, 4373, 4703, 5045, 5399, 5765, 6143, 6533, 6935, 7349, 7775, 8213, 8663, 9125, 9599, 10085, 10583, 11093, 11615
Offset: 0

Views

Author

Paul Curtz, Jul 16 2008

Keywords

Comments

Also: The numerators in the j=2 column of the array a(i,j) defined in A140825, where the columns j=0 and j=1 are represented by A000012 and A005408. This could be extended to column j=3: 1, -1, 9, 55, 161, ... The common feature of these sequences derived from a(i,j) is that their j-th differences are constant sequences defined by A091137(j).
a(n) is the set of all k such that 6*k + 6 is a perfect square. - Gary Detlefs, Mar 04 2010
The identity (6*n^2 - 1)^2 - (9*n^2 - 3)*(2*n)^2 = 1 can be written as a(n+1)^2 - A157872(n)*A005843(n+1)^2 = 1. - Vincenzo Librandi, Feb 05 2012
Apart from first term, sequence found by reading the line from 5, in the direction 5, 23, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. - Omar E. Pol, Jul 18 2012
From Paul Curtz, Sep 17 2018: (Start)
Terms from center to right in the following spiral:
.
65--63--61--59
/ \
67 31--29--27 57
/ / \ \
69 33 9---7 25 55
/ / / \ \ \
71 35 11 -1===5==23==53==>
/ / / / / /
37 13 1---3 21 51
\ \ / /
39 15--17--19 49
\ /
41--43--45--47 (End)

References

  • P. Curtz, Intégration numérique des systèmes différentiels à conditions initiales, Note 12, Centre de Calcul Scientifique de l'Armement, Arcueil, 1969, 132 pages, pp. 28-36. CCSA, then CELAR. Now DGA Maitrise de l'Information 35131 Bruz.

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) - a(n-2) + 12.
First differences: a(n+1) - a(n) = A017593(n).
Second differences: A071593(n+1) - A071593(n) = 12.
G.f.: (1-8*x-5*x^2)/(x-1)^3. - Jaume Oliver Lafont, Aug 30 2009
From Vincenzo Librandi, Feb 05 2012: (Start)
a(n) = a(n-1) + 12*n - 6.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n) = A033581(n) - 1. - Omar E. Pol, Jul 18 2012
a(n) = A032528(2*n) - 1. - Adriano Caroli, Jul 21 2013
For n > 0, a(n) = floor(3/(cosh(1/n) - 1)) = floor(1/(n*sinh(1/n) - 1)); for similar formulas for cosine and sine, see A033581. - Clark Kimberling, Oct 19 2014, corrected by M. F. Hasler, Oct 21 2014
a(-n) = a(n). - Paul Curtz, Sep 17 2018
From Amiram Eldar, Feb 04 2021: (Start)
Sum_{n>=1} 1/a(n) = (1 - (Pi/sqrt(6))*cot(Pi/sqrt(6)))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = ((Pi/sqrt(6))*csc(Pi/sqrt(6)) - 1)/2.
Product_{n>=1} (1 + 1/a(n)) = (Pi/sqrt(6))*csc(Pi/sqrt(6)).
Product_{n>=1} (1 - 1/a(n)) = csc(Pi/sqrt(6))*sin(Pi/sqrt(3))/sqrt(2). (End)
a(n) = A003154(n+1) - 2*A016777(n). - Leo Tavares, May 13 2022
E.g.f.: exp(x)*(6*x^2 + 6*x - 1). - Elmo R. Oliveira, Jan 16 2025

Extensions

Edited and extended by R. J. Mathar, Aug 06 2008
Better description Ray Chandler, Feb 03 2009

A141530 a(n) = 4*n^3 - 6*n^2 + 1.

Original entry on oeis.org

1, -1, 9, 55, 161, 351, 649, 1079, 1665, 2431, 3401, 4599, 6049, 7775, 9801, 12151, 14849, 17919, 21385, 25271, 29601, 34399, 39689, 45495, 51841, 58751, 66249, 74359, 83105, 92511, 102601, 113399, 124929, 137215, 150281, 164151, 178849, 194399, 210825, 228151
Offset: 0

Views

Author

Paul Curtz, Aug 12 2008

Keywords

Crossrefs

See Librandi's comment in A078371.

Programs

Formula

a(n) = (2*n-1)*(2*n^2 - 2*n - 1) = A060747(n)*A132209(n-1), n > 1. - R. J. Mathar, Feb 22 2009
G.f.: (1 - 5*x + 19*x^2 + 9*x^3)/(1-x)^4. - Jaume Oliver Lafont, Aug 30 2009
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) with a(0)=1, a(1)=-1, a(2)=9, a(3)=55. - Harvey P. Dale, Nov 30 2011
E.g.f.: (1 - 2*x + 6*x^2 + 4*x^3)*exp(x). - G. C. Greubel, Mar 29 2021

Extensions

Corrected, completed and edited, following an observation from Vincenzo Librandi, by M. F. Hasler, Feb 12 2009
Further edited by N. J. A. Sloane, Feb 13 2009

A048495 a(n) = (n-1)*2^n + 2.

Original entry on oeis.org

1, 2, 6, 18, 50, 130, 322, 770, 1794, 4098, 9218, 20482, 45058, 98306, 212994, 458754, 983042, 2097154, 4456450, 9437186, 19922946, 41943042, 88080386, 184549378, 385875970, 805306370, 1677721602, 3489660930, 7247757314
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of 1 followed by the odd numbers (2n-1+2*0^n, or abs(A060747)). Binomial transform is A084643. - Paul Barry, Jun 09 2003
Total number of bits of all binary numbers less than 2^n (see example).
Total number of zero bits of all binary numbers less than 2^(n+1). - Olivier Gérard, Feb 25 2014.
Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>2, 4>3} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the second element, and the fourth element is larger than the third element. - Sergey Kitaev, Dec 08 2020

Examples

			a(1)=2 : 0 1
a(2)=6 : 0 1 10 11
a(3)=18 : 0 1 10 11 100 101 110 111
a(4)=50 : 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
...
		

Crossrefs

a(n) = T(1, n), array T given by A048494.

Programs

Formula

a(n) - 1 = Sum_{i=0..n-1} (n-i) * 2^(n-i-1) = n*2^(n-1) + (n-1)*2^(n-2) + (n-2)*2^(n-3) + ... + 1*(2^0). - Matthew Erbst (matt(AT)erbst.org), Apr 19 2006
a(n) = 2 * A002064(n-1), n >= 1. - Omar E. Pol, Sep 30 2012
a(n) = a(n-1) + (2^n - 2^(n-1)) * n = a(n-1) + n*2^(n-1). - Olivier Gérard, Feb 25 2014
G.f.: -(4*x^2-3*x+1) / ((x-1)*(2*x-1)^2). - Colin Barker, Jun 29 2014
E.g.f.: exp(x)*(2 + exp(x)*(2*x - 1)). - Stefano Spezia, Feb 14 2025

Extensions

Better description from John W. Layman, May 04 1999

A141310 The odd numbers interlaced with the constant-2 sequence.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 2, 13, 2, 15, 2, 17, 2, 19, 2, 21, 2, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 43, 2, 45, 2, 47, 2, 49, 2, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97
Offset: 0

Views

Author

Paul Curtz, Aug 02 2008

Keywords

Comments

Similarly, the principle of interlacing a sequence and its first differences leads from A000012 and its differences A000004 to A059841, or from A140811 and its first differences A017593 to a sequence -1, 6, 5, 18, ...
If n is even then a(n) = n + 1 ; otherwise a(n) = 2. - Wesley Ivan Hurt, Jun 05 2013
Denominators of floor((n+1)/2) / (n+1), n > 0. - Wesley Ivan Hurt, Jun 14 2013
a(n) is also the number of minimum total dominating sets in the (n+1)-gear graph for n>1. - Eric W. Weisstein, Apr 11 2018
a(n) is also the number of minimum total dominating sets in the (n+1)-sun graph for n>1. - Eric W. Weisstein, Sep 09 2021
Denominators of Cesàro means sequence of A114112, corresponding numerators are in A354008. - Bernard Schott, May 14 2022
Also, denominators of Cesàro means sequence of A237420, corresponding numerators are in A354280. - Bernard Schott, May 22 2022

Crossrefs

Programs

  • Maple
    a:= n-> n+1-(n-1)*(n mod 2): seq(a(n), n=0..96); # Wesley Ivan Hurt, Jun 05 2013
  • Mathematica
    Flatten[Table[{2 n - 1, 2}, {n, 40}]] (* Alonso del Arte, Jun 15 2013 *)
    Riffle[Range[1, 79, 2], 2] (* Alonso del Arte, Jun 14 2013 *)
    Table[((-1)^n (n - 1) + n + 3)/2, {n, 0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
    Table[Floor[(n + 1)/2]/(n + 1), {n, 0, 20}] // Denominator (* Eric W. Weisstein, Apr 11 2018 *)
    LinearRecurrence[{0, 2, 0, -1}, {2, 3, 2, 5}, {0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
    CoefficientList[Series[(1 + 2 x + x^2 - 2 x^3)/(-1 + x^2)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Apr 11 2018 *)
  • PARI
    A141310(n) = if(n%2,2,1+n); \\ (for offset=0 version) - Antti Karttunen, Oct 02 2018
    
  • PARI
    A141310off1(n) = if(n%2,n,2); \\ (for offset=1 version) - Antti Karttunen, Oct 02 2018
    
  • Python
    def A141310(n): return 2 if n % 2 else n + 1 # Chai Wah Wu, May 24 2022

Formula

a(2n) = A005408(n). a(2n+1) = 2.
First differences: a(n+1) - a(n) = (-1)^(n+1)*A109613(n-1), n > 0.
b(2n) = -A008586(n), and b(2n+1) = A060747(n), where b(n) = a(n+1) - 2*a(n).
a(n) = 2*a(n-2) - a(n-4). - R. J. Mathar, Feb 23 2009
G.f.: (1+2*x+x^2-2*x^3)/((x-1)^2*(1+x)^2). - R. J. Mathar, Feb 23 2009
From Wesley Ivan Hurt, Jun 05 2013: (Start)
a(n) = n + 1 - (n - 1)*(n mod 2).
a(n) = (n + 1) * (n - floor((n+1)/2))! / floor((n+1)/2)!.
a(n) = A000142(n+1) / A211374(n+1). (End)

Extensions

Edited by R. J. Mathar, Feb 23 2009
Term a(45) corrected, and more terms added by Antti Karttunen, Oct 02 2018

A165747 a(n) = 1-2n.

Original entry on oeis.org

1, -1, -3, -5, -7, -9, -11, -13, -15, -17, -19, -21, -23, -25, -27, -29, -31, -33, -35, -37, -39, -41, -43, -45, -47, -49, -51, -53, -55, -57, -59, -61, -63, -65, -67, -69, -71, -73, -75, -77, -79, -81, -83, -85, -87, -89, -91, -93, -95, -97, -99, -101, -103
Offset: 0

Views

Author

Philippe Deléham, Sep 26 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[1 - 2 n, {n, 0, 100}] (* G. C. Greubel, Apr 07 2016 *)
  • PARI
    x='x+O('x^99); Vec((1-3*x)/(1-x)^2) \\ Altug Alkan, Apr 07 2016

Formula

a(n) = -A060747(n).
a(n) = 2*a(n-1) - a(n-2), a(0)= 1, a(1)= -1.
G.f.: (1-3x)/(1-x)^2.
a(n) = Sum_{k, 0<=k<=n} A112555(n,k)*(-2)^(n-k).
E.g.f.: (1-2*x)*exp(x). - G. C. Greubel, Apr 07 2016

A159964 a(n) = 2^n*(1-n).

Original entry on oeis.org

1, 0, -4, -16, -48, -128, -320, -768, -1792, -4096, -9216, -20480, -45056, -98304, -212992, -458752, -983040, -2097152, -4456448, -9437184, -19922944, -41943040, -88080384, -184549376, -385875968, -805306368, -1677721600, -3489660928
Offset: 0

Views

Author

Paul Barry, Apr 28 2009

Keywords

Comments

Hankel transform of A124791. Binomial transform of -A060747.
{1} U A159964 is a composition of generating functions of A165747 and A000012, with H=G(F(x)) with F(x) for A000012 and G(x) for A165747. - Oboifeng Dira, Aug 29 2019

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-4},{1,0},30] (* Harvey P. Dale, May 02 2016 *)

Formula

G.f.: (1-4x)/(1-2x)^2.
a(n) = -A058922(n). - Jeffrey R. Goodwin, Nov 11 2011
E.g.f.: U(0) where U(k)= 1 - 2*x/(2 - 4/(2 - (k+1)/U(k+1))) ; (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 18 2012
a(n) = Sum_{k=0..n} (1-2k) * C(n,k). - Wesley Ivan Hurt, Sep 23 2017
From Amiram Eldar, Jan 13 2021: (Start)
Sum_{n>=2} 1/a(n) = -log(2)/2.
Sum_{n>=2} (-1)^n/a(n) = -log(3/2)/2. (End)

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

Original entry on oeis.org

-1, 4, 15, 32, 55, 84, 119, 160, 207, 260, 319, 384, 455, 532, 615, 704, 799, 900, 1007, 1120, 1239, 1364, 1495, 1632, 1775, 1924, 2079, 2240, 2407, 2580, 2759, 2944, 3135, 3332, 3535, 3744, 3959, 4180, 4407, 4640, 4879, 5124, 5375, 5632, 5895, 6164, 6439, 6720, 7007, 7300, 7599
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 22 2016

Keywords

Comments

In general, the ordinary generating function for the values of quadratic polynomial p*n^2 + q*n + k, is (k + (p + q - 2*k)*x + (p - q + k)*x^2)/(1 - x)^3.
From Bruno Berselli, Mar 25 2016: (Start)
This sequence and A140676 provide all integer m such that 3*m + 4 is a square.
Numbers related to A135713 by A135713(n) = n*a(n) - Sum_{k=0..n-1} a(k).
After -1, second bisection of A184005. (End)

Examples

			a(0) = 3*0^2 + 2*0 - 1 = -1;
a(1) = 3*1^2 + 2*1 - 1 =  4;
a(2) = 3*2^2 + 2*2 - 1 = 15;
a(3) = 3*3^2 + 2*3 - 1 = 32, etc.
		

Crossrefs

Programs

  • GAP
    List([0..50], n -> 3*n^2+2*n-1); # Bruno Berselli, Feb 16 2018
  • Magma
    [3*n^2+2*n-1: n in [0..50]]; // Bruno Berselli, Mar 25 2016
    
  • Mathematica
    Table[3 n^2 + 2 n - 1, {n, 0, 50}]
    LinearRecurrence[{3, -3, 1}, {-1, 4, 15}, 51]
  • Maxima
    makelist(3*n^2+2*n-1, n, 0, 50); /* Bruno Berselli, Mar 25 2016 */
    
  • PARI
    Vec((-1 + 7*x)/(1 - x)^3 + O(x^60)) \\ Michel Marcus, Mar 22 2016
    
  • PARI
    lista(nn) = {for(n=0, nn, print1(3*n^2 + 2*n - 1, ", ")); } \\ Altug Alkan, Mar 25 2016
    
  • PARI
    vector(50, n, n--; 3*n^2+2*n-1) \\ Bruno Berselli, Mar 25 2016
    
  • Sage
    [3*n^2+2*n-1 for n in (0..50)] # Bruno Berselli, Mar 25 2016
    

Formula

G.f.: (-1 + 7*x)/(1 - x)^3.
E.g.f.: exp(x)*(-1 + 5*x + 3*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A033428(n) + A060747(n).
a(n) = A045944(n) - 1 = A056109(n) - 2.
a(-n) = A140676(n-1), with A140676(-1) = -1.
Sum_{n>=0} 1/a(n) = 3*(log(3) - 2)/8 - Pi/(8*sqrt(3)) = -0.564745312278736...
a(n) = Sum_{i = n-1..2*n-1} (2*i + 1). - Bruno Berselli, Feb 16 2018
a(n) = A000290(n+1) + 2*A000290(n) - 2. - Leo Tavares, May 28 2023
Sum_{n>=0} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) + 3/4. - Amiram Eldar, Jul 20 2023

A269501 Subsequence immediately following the instances of n in the sequence is n, n-1, ..., 1, n+1, n+2, ....

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The sequence includes every ordered pair of positive integers exactly once as consecutive terms of the sequence. Through n = k^2, it has every pair i,j with 0 < i,j <= k.
Can be regarded as an irregular triangle where row k contains 1, k, k, k-1, k, k-2, ..., 2, k, with 2n-1 terms.
See A305615 for an essentially identical sequence: a(n) = A305615(n)+1. - N. J. A. Sloane, Jul 03 2018

Examples

			The first 3 occurs as a(5), so a(6) = 3, the first term of 3, 2, 1, 4, 5, 6, .... The second 3 is thus a(6), so a(7) = 2. The third 3 is a(8), so a(9) = 1. The fourth 3 is a(12), now we start incrementing, and a(13) = 4.
The triangle starts:
  1
  1, 2, 2
  1, 3, 3, 2, 3
  1, 4, 4, 3, 4, 2, 4
  1, 5, 5, 4, 5, 3, 5, 2, 5
		

Crossrefs

Cf. A003059, A060747 (row lengths), A000326 (row sums), A097291, A269780.
See also A315615.

Programs

  • PARI
    a(n) = my(r = if(n<=0, 0, sqrtint(n-1)+1));if((n-r)%2,r,(r^2-n)/2 + 1)

Formula

Let r = ceiling(sqrt(n)) = A003059(n). If n and r have the same parity, a(n) = (r^2-n)/2 + 1; otherwise a(n) = r.
Showing 1-10 of 35 results. Next