The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A276420 Number of palindromic compositions of n into prime parts. 2
 1, 0, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 5, 6, 8, 7, 12, 14, 16, 17, 26, 27, 36, 40, 55, 56, 81, 88, 118, 124, 177, 189, 257, 275, 384, 404, 564, 605, 833, 880, 1233, 1314, 1813, 1929, 2685, 2850, 3956, 4215, 5845, 6203, 8629, 9185, 12731, 13531, 18807, 19994 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,7 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..10000 V. E. Hoggatt, Jr., and Marjorie Bicknell, Palindromic compositions, Fibonacci Quart., Vol. 13(4), 1975, pp. 350-356. FORMULA G.f.: g(z) = (1+F(z))/(1-F(z^2)), where F(z) = Sum_{p prime} z^p = z^2 + z^3 + z^5 + z^7 + ... . EXAMPLE a(9) = 2 because we have [2,5,2] and [3,3,3]. a(12) = 5 because we have [5,2,5], [2,3,2,3,2], [3,2,2,2,3], [3,3,3,3], and [2,2,2,2,2,2]. MAPLE F := sum(z^ithprime(j), j=1..90): F2:=sum(z^(2*ithprime(j)), j=1..90): g:= (1+F)/(1-F2): gser:=series(g, z=0, 55): seq(coeff(gser, z, n), n=0..50); # second Maple program: a:= proc(n) option remember; `if`(n=0 or isprime(n), 1, 0)+ add(`if`(isprime(j), a(n-2*j), 0), j=1..n/2) end: seq(a(n), n=0..60); # Alois P. Heinz, Sep 02 2016 MATHEMATICA Table[Count[Flatten[Map[Permutations, Select[IntegerPartitions@ n, Times @@ Boole@ Map[PrimeQ, #] > 0 &]], 1], w_ /; Reverse@ w == w], {n, 0, 40}] (* Michael De Vlieger, Sep 02 2016 *) a[n_] := a[n] = If[n == 0 || PrimeQ[n], 1, 0] + Sum[If[PrimeQ[j], a[n - 2*j], 0], {j, 1, n/2}]; a /@ Range[0, 60] (* Jean-François Alcover, Jun 01 2021, after Alois P. Heinz *) CROSSREFS Cf. A016116, A023360. Sequence in context: A214628 A355806 A032576 * A239494 A349388 A347663 Adjacent sequences: A276417 A276418 A276419 * A276421 A276422 A276423 KEYWORD nonn AUTHOR Emeric Deutsch, Sep 02 2016 STATUS approved

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

Last modified October 3 09:41 EDT 2023. Contains 365854 sequences. (Running on oeis4.)