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!)
 A256119 Least number p that is zero or an odd prime, such that n - p is a generalized pentagonal number. 2

%I

%S 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 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 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 Least number p that is zero or an odd prime, such that n - p is a generalized pentagonal number.

%C By the conjecture in A256071, a(n) always exists.

%H Zhi-Wei Sun, <a href="/A256119/b256119.txt">Table of n, a(n) for n = 0..10000</a>

%e 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 a(26) = 0 since 26 = (-4)*(3*(-4)-1)/2 is a generalized pentagonal number.

%t Pen[n_]:=IntegerQ[Sqrt[24n+1]]

%t 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 Cf. A000040, A001318, A256071.

%K nonn

%O 0,4

%A _Zhi-Wei Sun_, Mar 15 2015

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 April 10 08:09 EDT 2021. Contains 342845 sequences. (Running on oeis4.)