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.

A256119 Least number p that is zero or an odd prime, such that n - p is a generalized pentagonal number.

This page as a plain text file.
%I A256119 #7 Mar 15 2015 14:39:47
%S A256119 0,0,0,3,3,0,5,0,3,7,3,11,0,11,7,0,11,5,3,7,5,19,0,11,17,3,0,5,13,3,
%T A256119 23,5,17,7,19,0,29,11,3,13,0,19,7,3,29,5,11,7,13,23,43,0,17,13,3,29,5,
%U A256119 0,7,19,3,59,5,23,7,43,31,41,11,29,0,31,37,3,17,5,19,0,43,53,3,11,5,13,7,59,29,17,11,19,13,79,0,23,17,3,19,5,41,7,0
%N A256119 Least number p that is zero or an odd prime, such that n - p is a generalized pentagonal number.
%C A256119 By the conjecture in A256071, a(n) always exists.
%H A256119 Zhi-Wei Sun, <a href="/A256119/b256119.txt">Table of n, a(n) for n = 0..10000</a>
%e A256119 a(21) = 19 since 21 is not a generalized pentagonal number, and 19 is the least odd prime p with 21 - p a generalized pentagonal number.
%e A256119 a(26) = 0 since 26 = (-4)*(3*(-4)-1)/2 is a generalized pentagonal number.
%t A256119 Pen[n_]:=IntegerQ[Sqrt[24n+1]]
%t A256119 Do[If[Pen[n],Print[n," ",0];Goto[aa]];Do[If[Pen[n-Prime[k]],Print[n," ",Prime[k]];Goto[aa]],{k,2,PrimePi[n]}];Label[aa];Continue,{n,0,100}]
%Y A256119 Cf. A000040, A001318, A256071.
%K A256119 nonn
%O A256119 0,4
%A A256119 _Zhi-Wei Sun_, Mar 15 2015