This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A276420 #19 Jan 05 2025 19:51:41 %S A276420 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, %T A276420 118,124,177,189,257,275,384,404,564,605,833,880,1233,1314,1813,1929, %U A276420 2685,2850,3956,4215,5845,6203,8629,9185,12731,13531,18807,19994 %N A276420 Number of palindromic compositions of n into prime parts. %H A276420 Alois P. Heinz, <a href="/A276420/b276420.txt">Table of n, a(n) for n = 0..10000</a> %H A276420 V. E. Hoggatt, Jr., and Marjorie Bicknell, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/13-4/hoggatt1.pdf">Palindromic compositions</a>, Fibonacci Quart., Vol. 13(4), 1975, pp. 350-356. %F A276420 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 + ... . %e A276420 a(9) = 2 because we have [2,5,2] and [3,3,3]. %e A276420 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]. %p A276420 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); %p A276420 # second Maple program: %p A276420 a:= proc(n) option remember; `if`(n=0 or isprime(n), 1, 0)+ %p A276420 add(`if`(isprime(j), a(n-2*j), 0), j=1..n/2) %p A276420 end: %p A276420 seq(a(n), n=0..60); # _Alois P. Heinz_, Sep 02 2016 %t A276420 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 *) %t A276420 a[n_] := a[n] = If[n == 0 || PrimeQ[n], 1, 0] + %t A276420 Sum[If[PrimeQ[j], a[n - 2*j], 0], {j, 1, n/2}]; %t A276420 a /@ Range[0, 60] (* _Jean-François Alcover_, Jun 01 2021, after _Alois P. Heinz_ *) %Y A276420 Cf. A016116, A023360. %K A276420 nonn %O A276420 0,7 %A A276420 _Emeric Deutsch_, Sep 02 2016