cp's OEIS Frontend

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.

A196228 Number of ways of writing n as sum of a prime and a perfect power.

This page as a plain text file.
%I A196228 #27 Feb 18 2017 14:26:27
%S A196228 0,0,1,1,0,2,1,1,1,1,3,2,1,2,2,1,1,2,2,2,3,1,2,1,1,1,4,2,2,3,1,4,2,2,
%T A196228 3,1,2,5,4,2,2,2,2,3,4,2,3,2,3,2,4,2,2,3,3,4,2,1,2,2,2,4,3,1,2,3,3,5,
%U A196228 4,2,2,3,2,2,5,1,4,2,3,4,2,1,5,3,1,4,4
%N A196228 Number of ways of writing n as sum of a prime and a perfect power.
%C A196228 In this case, perfect power does not include 0.
%C A196228 Different from A133364. The first difference is at n=74, where a(n) = 2 but A133364(n) = 3.
%H A196228 T. D. Noe, <a href="/A196228/b196228.txt">Table of n, a(n) for n = 1..10000</a>
%F A196228 a(n) = Card_{n=i+j where i is in A000040 and j is in A001597}.
%F A196228 G.f.: (Sum_{k>=1} x^prime(k))*(Sum_{k = i^j, i>=1, j>=2} x^k). - _Ilya Gutkovskiy_, Feb 18 2017
%e A196228 a(1) = a(2) = a(5) = a(1549) = a(1771561) = 0, see A119748.
%t A196228 nn = 100; pwrs = Union[{1}, Flatten[Table[Range[2, Floor[nn^(1/ex)]]^ex, {ex, 2, Floor[Log[2, nn]]}]]]; pp = Prime[Range[PrimePi[nn]]]; t = Table[0, {nn}]; Do[ t[[i[[1]]]] = i[[2]], {i, Tally[Sort[Select[Flatten[Outer[Plus, pwrs, pp]], # <= nn &]]]}]; t (* _T. D. Noe_, Sep 29 2011 *)
%Y A196228 Cf. A119748 (zero terms).
%Y A196228 Cf. A000040, A001597, A133364.
%K A196228 easy,nonn
%O A196228 1,6
%A A196228 _Philippe Deléham_, Sep 29 2011
%E A196228 Edited by _Franklin T. Adams-Watters_, Sep 29 2011