login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242278 Number of non-palindromic n-tuples of 3 distinct elements. 4
0, 6, 18, 72, 216, 702, 2106, 6480, 19440, 58806, 176418, 530712, 1592136, 4780782, 14342346, 43040160, 129120480, 387400806, 1162202418, 3486725352, 10460176056, 31380882462, 94142647386, 282429005040, 847287015120, 2541864234006, 7625592702018, 22876787671992 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..28.

FORMULA

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

a(n) = 3^n - 3^ceiling(n/2).

a(n) = A000244(n) - A056449(n).

G.f.: (6*x) / (1 - 3*x - 3*x^2 + 9*x^3).

a(n) = 6*A167993(n). [Bruno Berselli, Aug 19 2014]

EXAMPLE

For n=3, the a(3)=18 solutions (non-palindromic 3-tuples) are:

{0,0,1}, {0,0,2}, {0,1,1}, {0,1,2}, {0,2,1}, {0,2,2}, {1,0,0}, {1,0,2},

{1,1,0}, {1,1,2}, {1,2,0}, {1,2,2}, {2,0,0}, {2,0,1}, {2,1,0}, {2,1,1},

{2,2,0}, {2,2,1}.

MAPLE

A242278:=n->(1/2)* 3^(n/2) * ((sqrt(3)-1) * (-1)^n - sqrt(3)-1) + 3^n: seq(A242278(n), n=1..28); # Wesley Ivan Hurt, Aug 17 2014.

MATHEMATICA

Table[1/2 * 3^(n/2) * ((Sqrt(3)-1) * (-1)^n - Sqrt(3)-1) + 3^n, {n, 28}]

PROG

(PARI) a(n)=3^n-3^ceil(n/2) \\ Charles R Greathouse IV, Dec 10 2014

CROSSREFS

Cf. A167993, A233411, A242026, A240437.

Sequence in context: A129369 A095853 A027266 * A129796 A129790 A121156

Adjacent sequences:  A242275 A242276 A242277 * A242279 A242280 A242281

KEYWORD

nonn,easy

AUTHOR

Mikk Heidemaa, Aug 16 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 1 03:09 EST 2021. Contains 341732 sequences. (Running on oeis4.)