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
 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, 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, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS By the conjecture in A256071, a(n) always exists. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 0..10000 EXAMPLE 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. a(26) = 0 since 26 = (-4)*(3*(-4)-1)/2 is a generalized pentagonal number. MATHEMATICA Pen[n_]:=IntegerQ[Sqrt[24n+1]] 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}] CROSSREFS Cf. A000040, A001318, A256071. Sequence in context: A140686 A116580 A096439 * A217552 A128046 A102899 Adjacent sequences:  A256116 A256117 A256118 * A256120 A256121 A256122 KEYWORD nonn AUTHOR Zhi-Wei Sun, Mar 15 2015 STATUS approved

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 August 13 22:57 EDT 2020. Contains 336473 sequences. (Running on oeis4.)