login
A240437
Number of non-palindromic n-tuples of 5 distinct elements.
3
0, 20, 100, 600, 3000, 15500, 77500, 390000, 1950000, 9762500, 48812500, 244125000, 1220625000, 6103437500, 30517187500, 152587500000, 762937500000, 3814695312500, 19073476562500, 95367421875000, 476837109375000, 2384185742187500, 11920928710937500, 59604644531250000, 298023222656250000
OFFSET
1,2
FORMULA
a(n) = 1/2 * 5^(n/2) * ((sqrt(5)-1) * (-1)^n - sqrt(5)-1) + 5^n.
a(n) = 5^n - 5^ceiling(n/2).
a(n) = A000351(n) - A056451(n).
G.f.: (20*x^2) / (1 - 5*x - 5*x^2 + 25*x^3). [corrected by Peter Luschny, May 13 2019]
EXAMPLE
For n=3 a(3)=100 solutions are:
{0,0,1}, {0,0,2}, {0,0,3}, {0,0,4}, {0,1,1}, {0,1,2}, {0,1,3}, {0,1,4},
{0,2,1}, {0,2,2}, {0,2,3}, {0,2,4}, {0,3,1}, {0,3,2}, {0,3,3}, {0,3,4},
{0,4,1}, {0,4,2}, {0,4,3}, {0,4,4}, {1,0,0}, {1,0,2}, {1,0,3}, {1,0,4},
{1,1,0}, {1,1,2}, {1,1,3}, {1,1,4}, {1,2,0}, {1,2,2}, {1,2,3}, {1,2,4},
{1,3,0}, {1,3,2}, {1,3,3}, {1,3,4}, {1,4,0}, {1,4,2}, {1,4,3}, {1,4,4},
{2,0,0}, {2,0,1}, {2,0,3}, {2,0,4}, {2,1,0}, {2,1,1}, {2,1,3}, {2,1,4},
{2,2,0}, {2,2,1}, {2,2,3}, {2,2,4}, {2,3,0}, {2,3,1}, {2,3,3}, {2,3,4},
{2,4,0}, {2,4,1}, {2,4,3}, {2,4,4}, {3,0,0}, {3,0,1}, {3,0,2}, {3,0,4},
{3,1,0}, {3,1,1}, {3,1,2}, {3,1,4}, {3,2,0}, {3,2,1}, {3,2,2}, {3,2,4},
{3,3,0}, {3,3,1}, {3,3,2}, {3,3,4}, {3,4,0}, {3,4,1}, {3,4,2}, {3,4,4},
{4,0,0}, {4,0,1}, {4,0,2}, {4,0,3}, {4,1,0}, {4,1,1}, {4,1,2}, {4,1,3},
{4,2,0}, {4,2,1}, {4,2,2}, {4,2,3}, {4,3,0}, {4,3,1}, {4,3,2}, {4,3,3},
{4,4,0}, {4,4,1}, {4,4,2}, {4,4,3}.
MAPLE
gf := (20*x^2) / (1 - 5*x - 5*x^2 + 25*x^3): ser := series(gf, x, 26):
seq(coeff(ser, x, n), n=1..25); # Peter Luschny, May 13 2019
MATHEMATICA
Table[1/2 * 5^(n/2) * ((Sqrt[5]-1) * (-1)^n - Sqrt[5]-1) + 5^n, {n, 25}]
PROG
(PARI) concat([0], Vec( ( (20*x^2) / (1 - 5*x - 5*x^2 + 25*x^3) + O(x^30) ) ) ) \\ Joerg Arndt, Aug 18 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mikk Heidemaa, Aug 17 2014
STATUS
approved