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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A178851 The number of length n sequences on {0,1,2}(ternary sequences) that contain a prime number of 2's. 2
 0, 0, 1, 7, 32, 121, 412, 1317, 4048, 12144, 35904, 105249, 306968, 892217, 2585468, 7468532, 21500800, 61688513, 176477988, 503906221, 1438235592, 4110846808, 11789919200, 33991337521, 98657320240, 288505634480, 850146795840, 2522918119392, 7531922736384 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS a(n) is the number of positive integers less than 3^n that when expressed as a ternary numeral contain a prime number of 2's. a(n)/3^n is the probability that a series of Bernoulli trials with probability of success equal to 1/3 will result in a prime number of successes. Cf. A121497 LINKS Eric M. Schmidt, Table of n, a(n) for n = 0..2000 FORMULA E.g.f.:exp(2x)*(x^2/2!+x^3/3!+x^5/5!+...) a(n) = Sum Binomial(n,p)*2^(n-p) where the sum is taken over the prime numbers. EXAMPLE a(3)=7 because 8,17,20,23,24,25,26 have a prime number of 2's in their ternary notation. MATHEMATICA P=Table[Prime[m], {m, 1, 200}]; Range[0, 20]! CoefficientList[Series[Exp[2x] Sum[x^p/p!, {p, P}], {x, 0, 20}], x] CROSSREFS Sequence in context: A001794 A140289 A133107 * A213163 A249999 A034360 Adjacent sequences:  A178848 A178849 A178850 * A178852 A178853 A178854 KEYWORD nonn AUTHOR Geoffrey Critzer, Dec 27 2010 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.

Last modified June 19 12:42 EDT 2021. Contains 345129 sequences. (Running on oeis4.)