A110654
a(n) = ceiling(n/2), or: a(2*k) = k, a(2*k+1) = k+1.
Original entry on oeis.org
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38
Offset: 0
G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 4*x^8 + 5*x^9 + ...
Cf.
A298648 (number of smallest coverings of dipyramidal graphs by maximal cliques).
-
a110654 = (`div` 2) . (+ 1)
a110654_list = tail a004526_list -- Reinhard Zumkeller, Jul 27 2012
-
[Ceiling(n/2): n in [0..80]]; // Vincenzo Librandi, Nov 04 2014
-
a[ n_] := Ceiling[ n / 2]; (* Michael Somos, Jun 15 2014 *)
a[ n_] := Quotient[ n, 2, -1]; (* Michael Somos, Jun 15 2014 *)
a[0] = 0; a[n_] := a[n] = n - a[n - 1]; Table[a[n], {n, 0, 100}] (* Carlos Eduardo Olivieri, Dec 22 2014 *)
CoefficientList[Series[x^/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
LinearRecurrence[{1, 1, -1}, {0, 1, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
-
a(n)=n\2+n%2;
-
a(n)=(n+1)\2; \\ M. F. Hasler, Nov 17 2008
-
def A110654(n): return n+1>>1 # Chai Wah Wu, Jun 27 2025
-
[floor(n/2) + 1 for n in range(-1,75)] # Zerinvary Lajos, Dec 01 2009
Deleted wrong formula and added formula. -
M. F. Hasler, Nov 17 2008
A155585
a(n) = 2^n*E(n, 1) where E(n, x) are the Euler polynomials.
Original entry on oeis.org
1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792, 0, 22368256, 0, -1903757312, 0, 209865342976, 0, -29088885112832, 0, 4951498053124096, 0, -1015423886506852352, 0, 246921480190207983616, 0, -70251601603943959887872, 0, 23119184187809597841473536, 0
Offset: 0
E.g.f.: 1 + x - 2*x^3/3! + 16*x^5/5! - 272*x^7/7! + 7936*x^9/9! -+ ... = exp(x)/cosh(x).
O.g.f.: 1 + x - 2*x^3 + 16*x^5 - 272*x^7 + 7936*x^9 - 353792*x^11 +- ...
O.g.f.: 1 + x/(1+2*x) + 2!*x^2/((1+2*x)*(1+4*x)) + 3!*x^3/((1+2*x)*(1+4*x)*(1+6*x)) + ...
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- P. Barry, Riordan Arrays, Orthogonal Polynomials as Moments, and Hankel Transforms, J. Int. Seq. 14 (2011) # 11.2.2, example 28.
- Tom Copeland, The Elliptic Lie Triad: Ricatti and KdV Equations, Infinigens, and Elliptic Genera
- Tom Copeland, The Kervaire-Milnor formula
- H. M. Edwards, A normal form for elliptic curves, Bull. Amer. Math. Soc. (N.S.) 44 (2007), no. 3, 393-422. see section 12, pp. 410-411.
- Wenjie Fang, Hsien-Kuei Hwang, and Mihyun Kang, Phase transitions from exp(n^(1/2)) to exp(n^(2/3)) in the asymptotics of banded plane partitions, arXiv:2004.08901 [math.CO], 2020.
- G. Rzadkowski, Bernoulli numbers and solitons-revisited, Journal of Nonlinear Math. Physics, 1711, pp. 121-126.
-
A155585 := n -> 2^n*euler(n, 1): # Peter Luschny, Jan 26 2009
a := proc(n) option remember; `if`(n::even, 0^n, -(-1)^n - add((-1)^k*binomial(n,k) *a(n-k), k = 1..n-1)) end: # Peter Luschny, Jun 01 2016
# Or via the recurrence of the Fubini polynomials:
F := proc(n) option remember; if n = 0 then return 1 fi;
expand(add(binomial(n, k)*F(n-k)*x, k = 1..n)) end:
a := n -> (-2)^n*subs(x = -1/2, F(n)):
seq(a(n), n = 0..30); # Peter Luschny, May 21 2021
-
a[m_] := Sum[(-2)^(m - k) k! StirlingS2[m, k], {k, 0, m}] (* Peter Luschny, Apr 29 2009 *)
poly[q_] := 2^(q-n)/n*FunctionExpand[Sum[Binomial[n, k]*k^q, {k, 0, n}]]; T[q_, r_] := First[Take[CoefficientList[poly[q], n], {r+1, r+1}]]; Table[Sum[T[x, k]*(-1)^k, {k, 0, x-1}], {x, 1, 16}] (* John M. Campbell, Nov 16 2011 *)
f[n_] := (-1)^n 2^(n+1) PolyLog[-n, -1]; f[0] = -f[0]; Array[f, 27, 0] (* Robert G. Wilson v, Jun 28 2012 *)
-
a(n)=if(n==0,1,sum(k=0,n-1,(-1)^(k)*binomial(n-1,k)*a(n-1-k)*a(k)))
-
a(n)=local(X=x+x*O(x^n));n!*polcoeff(exp(X)/cosh(X),n)
-
a(n)=polcoeff(sum(m=0,n,m!*x^m/prod(k=1,m,1+2*k*x+x*O(x^n))),n) \\ Paul D. Hanna, Jul 20 2011
-
{a(n) = local(A); if( n<0, 0, A = x * O(x^n); n! * polcoeff( 1 + sinh(x + A) / cosh(x + A), n))} /* Michael Somos, Jan 16 2012 */
-
a(n)=local(A=1+x);for(i=1,n,A=sum(k=0,n,intformal(subst(A,x,-x)+x*O(x^n))^k/k!));n!*polcoeff(A,n)
for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Nov 25 2013
-
from sympy import bernoulli
def A155585(n): return (((2<<(m:=n+1))-2)*bernoulli(m)<>1) if n&1 else (0 if n else 1) # Chai Wah Wu, Apr 14 2023
-
def A155585(n) :
if n == 0 : return 1
return add(add((-1)^(j+1)*binomial(n+1,k-j)*j^n for j in (0..k)) for k in (1..n))
[A155585(n) for n in (0..26)] # Peter Luschny, Jul 23 2012
-
def A155585_list(n): # Akiyama-Tanigawa algorithm
A = [0]*(n+1); R = []
for m in range(n+1) :
d = divmod(m+3, 4)
A[m] = 0 if d[1] == 0 else (-1)^d[0]/2^(m//2)
for j in range(m, 0, -1) :
A[j - 1] = j * (A[j - 1] - A[j])
R.append(A[0])
return R
A155585_list(30) # Peter Luschny, Mar 09 2014
A153641
Nonzero coefficients of the Swiss-Knife polynomials for the computation of Euler, tangent, and Bernoulli numbers (triangle read by rows).
Original entry on oeis.org
1, 1, 1, -1, 1, -3, 1, -6, 5, 1, -10, 25, 1, -15, 75, -61, 1, -21, 175, -427, 1, -28, 350, -1708, 1385, 1, -36, 630, -5124, 12465, 1, -45, 1050, -12810, 62325, -50521, 1, -55, 1650, -28182, 228525, -555731, 1, -66, 2475, -56364, 685575, -3334386, 2702765, 1
Offset: 0
1
x
x^2 -1
x^3 -3x
x^4 -6x^2 +5
x^5 -10x^3 +25x
x^6 -15x^4 +75x^2 -61
x^7 -21x^5 +175x^3 -427x
- H. Cohen, Number Theory - Volume II: Analytic and Modern Tools, Graduate Texts in Mathematics. Springer-Verlag. [From Peter Bala, Jun 10 2009]
- G. C. Greubel, Table of n, a(n) for the first 76 rows, flattened
- Ayse Yilmaz Ceylan and Yilmaz Simsek, Formulae for Generalization of Touchard Polynomials with Their Generating Functions, Symmetry (2025) Vol. 17, Issue 7, Art. No. 1126. See Eq. 28 and after.
- Kwang-Wu Chen, Algorithms for Bernoulli numbers and Euler numbers, J. Integer Sequences, 4 (2001), #01.1.6.
- Suyoung Choi and Hanchul Park, A new graph invariant arises in toric topology, arXiv preprint arXiv:1210.3776 [math.AT], 2012.
- Leonhard Euler (1735), De summis serierum reciprocarum, Opera Omnia I.14, E 41, 73-86; On the sums of series of reciprocals, arXiv:math/0506415 [math.HO], 2005-2008.
- A. Hodges and C. V. Sukumar, Bernoulli, Euler, permutations and quantum algebras, Proc. R. Soc. A Oct. 2007 vol 463 no. 463 2086 2401-2414. [Added by Tom Copeland, Aug 31 2015]
- Peter Luschny, The Swiss-Knife polynomials.
- Peter Luschny, Swiss-Knife polynomials and Euler numbers
- Wikipedia, Bernoulli number
- J. Worpitzky, Studien über die Bernoullischen und Eulerschen Zahlen, Journal für die reine und angewandte Mathematik, 94 (1883), 203-232.
W_n(k), k=0,1,...
W_0: 1, 1, 1, 1, 1, 1, ........
A000012
W_1: 0, 1, 2, 3, 4, 5, ........
A001477
W_2: -1, 0, 3, 8, 15, 24, ........
A067998
W_3: 0, -2, 2, 18, 52, 110, ........
A121670
W_4: 5, 0, -3, 32, 165, 480, ........
W_n(k), n=0,1,...
k=0: 1, 0, -1, 0, 5, 0, -61, ...
A122045
k=1: 1, 1, 0, -2, 0, 16, 0, ...
A155585
k=2: 1, 2, 3, 2, -3, 2, 63, ...
A119880
k=3: 1, 3, 8, 18, 32, 48, 128, ...
A119881
k=4: 1, 4, 15, 52, 165, 484, ........ [
Peter Luschny, Jul 07 2009]
-
w := proc(n,x) local v,k,pow,chen; pow := (a,b) -> if a = 0 and b = 0 then 1 else a^b fi; chen := proc(m) if irem(m+1,4) = 0 then RETURN(0) fi; 1/((-1)^iquo(m+1,4) *2^iquo(m,2)) end; add(add((-1)^v*binomial(k,v)*pow(v+x+1,n)*chen(k),v=0..k), k=0..n) end:
# Coefficients with zeros:
seq(print(seq(coeff(i!*coeff(series(exp(x*t)*sech(t),t,16),t,i),x,i-n),n=0..i)), i=0..8);
# Recursion
W := proc(n,z) option remember; local k,p;
if n = 0 then 1 else p := irem(n+1,2);
z^n - p + add(`if`(irem(k,2)=1,0,
W(k,0)*binomial(n,k)*(power(z,n-k)-p)),k=2..n-1) fi end:
# Peter Luschny, edited and additions Jul 07 2009, May 13 2010, Oct 24 2011
-
max = 9; rows = (Reverse[ CoefficientList[ #, x]] & ) /@ CoefficientList[ Series[ Exp[x*t]*Sech[t], {t, 0, max}], t]*Range[0, max]!; par[coefs_] := (p = Partition[ coefs, 2][[All, 1]]; If[ EvenQ[ Length[ coefs]], p, Append[ p, Last[ coefs]]]); Flatten[ par /@ rows] (* Jean-François Alcover, Oct 03 2011, after g.f. *)
sk[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n-k), {k, 0, n}]; Table[CoefficientList[sk[n, x], x] // Reverse // Select[#, # =!= 0 &] &, {n, 0, 13}] // Flatten (* Jean-François Alcover, May 21 2013 *)
Flatten@Table[Binomial[n, 2k] EulerE[2k], {n, 0, 12}, {k, 0, n/2}](* Oliver Seipel, Jan 14 2025 *)
-
def A046978(k):
if k % 4 == 0:
return 0
return (-1)**(k // 4)
def A153641_poly(n, x):
return expand(add(2**(-(k // 2))*A046978(k+1)*add((-1)**v*binomial(k,v)*(v+x+1)**n for v in (0..k)) for k in (0..n)))
for n in (0..7): print(A153641_poly(n, x)) # Peter Luschny, Oct 24 2011
A142150
The nonnegative integers interleaved with 0's.
Original entry on oeis.org
0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0
Offset: 0
Cf.
A000004,
A000007,
A000027,
A000217,
A000326,
A001057,
A001477,
A003817,
A008805,
A027656,
A086099,
A142149,
A142151,
A162610,
A191967,
A195034,
A209297.
-
a142150 = uncurry (*) . (`divMod` 2) . (+ 1)
a142150_list = scanl (+) 0 a001057_list
-- Reinhard Zumkeller, Apr 02 2012
-
[n*(1+(-1)^n)/4 : n in [0..100]]; // Wesley Ivan Hurt, Aug 21 2014
-
&cat[[n, 0]: n in [0..50]]; // Vincenzo Librandi, Oct 31 2016
-
A142150:=n->n*(1+(-1)^n)/4: seq(A142150(n), n=0..100); # Wesley Ivan Hurt, Aug 21 2014
-
Table[Mod[Floor[n^2/2], n], {n, 200}] (* Enrique Pérez Herrero, Jul 29 2009 *)
Riffle[Range[0, 50], 0] (* Paolo Xausa, Feb 08 2024 *)
-
a(n)=!bittest(n,0)*n>>1 \\ M. F. Hasler, May 10 2015
-
def A142150(n): return (n+1>>1)*(n&1^1) # Chai Wah Wu, Jan 19 2023
A117966
Balanced ternary enumeration (based on balanced ternary representation) of integers; write n in ternary and then replace 2's with (-1)'s.
Original entry on oeis.org
0, 1, -1, 3, 4, 2, -3, -2, -4, 9, 10, 8, 12, 13, 11, 6, 7, 5, -9, -8, -10, -6, -5, -7, -12, -11, -13, 27, 28, 26, 30, 31, 29, 24, 25, 23, 36, 37, 35, 39, 40, 38, 33, 34, 32, 18, 19, 17, 21, 22, 20, 15, 16, 14, -27, -26, -28, -24, -23, -25, -30, -29, -31, -18, -17, -19, -15, -14, -16, -21, -20, -22, -36
Offset: 0
7 in base 3 is 21; changing the 2 to a (-1) gives (-1)*3+1 = -2, so a(7) = -2. I.e., the number of -2 according to the balanced ternary enumeration is 7, which can be obtained by replacing every -1 by 2 in the balanced ternary representation (or expansion) of -2, which is -1,1.
- D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 2, pp. 173-175; 2nd. ed. pp. 190-193.
-
f:= proc(n) local L,i;
L:= subs(2=-1,convert(n,base,3));
add(L[i]*3^(i-1),i=1..nops(L))
end proc:
map(f, [$0..100]);
# alternate:
N:= 100: # to get a(0) to a(N)
g:= 0:
for n from 1 to ceil(log[3](N+1)) do
g:= convert(series(3*subs(x=x^3,g)*(1+x+x^2)+x/(1+x+x^2),x,3^n+1),polynom);
od:
seq(coeff(g,x,j),j=0..N); # Robert Israel, Nov 17 2015
# third Maple program:
a:= proc(n) option remember; `if`(n=0, 0,
3*a(iquo(n, 3, 'r'))+`if`(r=2, -1, r))
end:
seq(a(n), n=0..3^4-1); # Alois P. Heinz, Aug 14 2019
-
Map[FromDigits[#, 3] &, IntegerDigits[#, 3] /. 2 -> -1 & /@ Range@ 80] (* Michael De Vlieger, Nov 17 2015 *)
-
a(n) = subst(Pol(apply(x->if(x == 2, -1, x), digits(n,3)), 'x), 'x, 3)
vector(73, i, a(i-1)) \\ Gheorghe Coserea, Nov 17 2015
-
def a(n):
if n==0: return 0
if n%3==0: return 3*a(n//3)
elif n%3==1: return 3*a((n - 1)//3) + 1
else: return 3*a((n - 2)//3) - 1
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 06 2017
A034008
a(n) = floor(2^|n-1|/2). Or: 1, 0, followed by powers of 2.
Original entry on oeis.org
1, 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648
Offset: 0
- Richard P. Stanley, Enumerative Combinatorics, Vol. I, Cambridge University Press, 1997, p. 45, exercise 9.
-
A034008:=n->2^(n-2): 1, 0, seq(A034008(n), n=2..50); # Wesley Ivan Hurt, Apr 12 2017
-
a = x/(1 - x); CoefficientList[Series[1/(1 - a^2), {x, 0, 30}], x] (* Geoffrey Critzer, Mar 28 2010 *)
-
a(n)=if(n<2,n==0,2^(n-2))
A130472
A permutation of the integers: a(n) = (-1)^n * floor( (n+1)/2 ).
Original entry on oeis.org
0, -1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10, -11, 11, -12, 12, -13, 13, -14, 14, -15, 15, -16, 16, -17, 17, -18, 18, -19, 19, -20, 20, -21, 21, -22, 22, -23, 23, -24, 24, -25, 25, -26, 26, -27, 27, -28, 28, -29, 29, -30, 30, -31, 31, -32, 32
Offset: 0
Sums of the form Sum_{k=0..n} k^p * q^k:
A059841 (p=0,q=-1), this sequence (p=1,q=-1),
A089594 (p=2,q=-1),
A232599 (p=3,q=-1),
A126646 (p=0,q=2),
A036799 (p=1,q=2),
A036800 (p=2,q=2),
A036827 (p=3,q=2),
A077925 (p=0,q=-2),
A232600 (p=1,q=-2),
A232601 (p=2,q=-2),
A232602 (p=3,q=-2),
A232603 (p=2,q=-1/2),
A232604 (p=3,q=-1/2).
-
[((-1)^n*(2*n+1)-1)/4: n in [0..80]]; // Vincenzo Librandi, Mar 29 2015
-
A130472:=n->ceil(n/2)*(-1)^n; seq(A130472(k), k=0..50); # Wesley Ivan Hurt, Oct 22 2013
-
CoefficientList[Series[(x^2-x)/(1-x^2)^2, {x, 0, 64}], x] (* Geoffrey Critzer, Sep 29 2013 *)
LinearRecurrence[{-1,1,1},{0,-1,1},70] (* Harvey P. Dale, Mar 02 2018 *)
-
a(n)=(-1)^n*n\2 \\ Charles R Greathouse IV, Sep 02 2015
-
[((-1)^n*(2*n+1) - 1)/4 for n in (0..70)] # G. C. Greubel, Mar 31 2021
A181983
a(n) = (-1)^(n+1) * n.
Original entry on oeis.org
0, 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20, 21, -22, 23, -24, 25, -26, 27, -28, 29, -30, 31, -32, 33, -34, 35, -36, 37, -38, 39, -40, 41, -42, 43, -44, 45, -46, 47, -48, 49, -50, 51, -52, 53, -54, 55, -56, 57, -58, 59
Offset: 0
G.f. = x - 2*x^2 + 3*x^3 - 4*x^4 + 5*x^5 - 6*x^6 + 7*x^7 - 8*x^8 + 9*x^9 + ...
- Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 6.
-
a181983 = negate . a038608
a181983_list = [0, 1] ++ map negate
(zipWith (+) a181983_list (map (* 2) $ tail a181983_list))
-- Reinhard Zumkeller, Mar 20 2013
-
[(-1)^(n+1)*n: n in [0..30]]; // G. C. Greubel, Aug 11 2018
-
A181983:=n->-(-1)^n * n; seq(A181983(n), n=0..100); # Wesley Ivan Hurt, Feb 26 2014
-
a[ n_] := -(-1)^n n;
a[ n_] := Sign[n] SeriesCoefficient[ x / (1 + x)^2, {x, 0, Abs @n}];
a[ n_] := Sign[n] (Abs @n)! SeriesCoefficient[ x / Exp[ x], {x, 0, Abs @n}];
CoefficientList[Series[x/(1+x)^2,{x,0,60}],x] (* or *) LinearRecurrence[{-2,-1},{0,1},60] (* or *) Table[If[OddQ[n],n,-n],{n,0,60}] (* Harvey P. Dale, Apr 22 2022 *)
-
{a(n) = -(-1)^n * n};
A240021
Number T(n,k) of partitions of n into distinct parts, where k is the difference between the number of odd parts and the number of even parts; triangle T(n,k), n>=0, read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 1, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 0, 2, 2, 2, 4, 1, 0, 1, 2, 1, 1, 4, 2, 4, 5, 1, 1, 1, 1, 2, 1, 2, 6, 3, 1, 6, 6, 1, 2, 2, 1, 3, 1, 5, 9, 3, 2, 9, 7, 2, 4, 3, 2, 3, 2, 8, 12, 4, 0, 1, 4, 12, 8, 3, 7, 4, 3, 4, 3, 14, 16, 4, 1, 1, 7, 16, 9, 6, 11, 5, 1, 4, 4, 6, 20, 20, 5, 2, 2
Offset: 0
T(12,-3) = 1: [6,4,2].
T(12,-2) = 2: [10,2], [8,4].
T(12,-1) = 1: [12].
T(12,0) = 2: [6,3,2,1], [5,4,2,1].
T(12,1) = 6: [9,2,1], [8,3,1], [7,4,1], [7,3,2], [6,5,1], [5,4,3].
T(12,2) = 3: [11,1], [9,3], [7,5].
T(13,-1) = 6: [10,2,1], [8,4,1], [8,3,2], [7,4,2], [6,5,2], [6,4,3].
T(14,-2) = 3: [12,2], [10,4], [8,6].
Triangle T(n,k) begins:
: n\k : -3 -2 -1 0 1 2 3 ...
+-----+--------------------------
: 0 : 1
: 1 : 1
: 2 : 1
: 3 : 1, 1
: 4 : 1, 0, 0, 1
: 5 : 2, 1
: 6 : 1, 1, 0, 1, 1
: 7 : 1, 3, 1
: 8 : 1, 1, 0, 2, 2
: 9 : 2, 4, 1, 0, 1
: 10 : 2, 1, 1, 4, 2
: 11 : 4, 5, 1, 1, 1
: 12 : 1, 2, 1, 2, 6, 3
: 13 : 1, 6, 6, 1, 2, 2
: 14 : 1, 3, 1, 5, 9, 3
Columns k=0-10 give:
A239241,
A239871(n+1),
A240138,
A240139,
A240140,
A240141,
A240142,
A240143,
A240144,
A240145,
A240146.
-
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1,
expand(b(n, i-1)+`if`(i>n, 0, b(n-i, i-1)*x^(2*irem(i, 2)-1)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
seq(T(n), n=0..20);
-
b[n_, i_] := b[n, i] = If[n>i*(i+1)/2, 0, If[n == 0, 1, Expand[b[n, i-1] + If[i>n, 0, b[n-i, i-1]*x^(2*Mod[i, 2]-1)]]]]; T[n_] := Function[{p}, Table[ Coefficient[p, x, i], {i, Exponent[p, x, Min], Exponent[p, x]}]][b[n, n]]; Table[ T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)
-
N=20; q='q+O('q^N);
e(n) = if(n%2!=0, u, 1/u);
gf = prod(n=1,N, 1 + e(n)*q^n );
V = Vec( gf );
{ for (j=1, #V, \\ print triangle, including leading zeros
for (i=0, N-j, print1(" ")); \\ padding
for (i=-j+1, j-1, print1(polcoeff(V[j], i, u),", "));
print();
); }
/* Joerg Arndt, Apr 01 2014 */
A062392
a(n) = n^4 - (n-1)^4 + (n-2)^4 - ... 0^4.
Original entry on oeis.org
0, 1, 15, 66, 190, 435, 861, 1540, 2556, 4005, 5995, 8646, 12090, 16471, 21945, 28680, 36856, 46665, 58311, 72010, 87990, 106491, 127765, 152076, 179700, 210925, 246051, 285390, 329266, 378015, 431985, 491536, 557040, 628881, 707455, 793170, 886446, 987715
Offset: 0
From _Bruno Berselli_, Oct 30 2017: (Start)
After 0:
1 = -(1) + (2);
15 = -(1 + 2) + (3 + 4 + 5 + 2*3);
66 = -(1 + 2 + 3) + (4 + 5 + 6 + 7 + ... + 11 + 3*4);
190 = -(1 + 2 + 3 + 4) + (5 + 6 + 7 + 8 + ... + 19 + 4*5);
435 = -(1 + 2 + 3 + 4 + 5) + (6 + 7 + 8 + 9 + ... + 29 + 5*6), etc. (End)
- T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
-
a := n -> (2*n^2+n^3-1)*n/2; # Peter Luschny, Jul 12 2009
-
Table[n (n + 1) (n^2 + n - 1)/2, {n, 0, 40}] (* Harvey P. Dale, Oct 19 2011 *)
-
{ a=0; for (n=0, 1000, write("b062392.txt", n, " ", a=n^4 - a) ) } \\ Harry J. Smith, Aug 07 2009
Comments