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.

A256071 Number of ordered ways to write n = p + x*(3*x-1)/2, where p is prime or zero, and x is an integer.

This page as a plain text file.
%I A256071 #33 Apr 07 2015 12:05:42
%S A256071 1,1,2,2,2,3,1,4,2,2,2,1,4,2,3,3,1,3,4,3,3,1,3,2,4,3,3,1,3,4,2,4,2,3,
%T A256071 2,3,2,3,4,3,2,3,4,5,3,4,3,2,4,3,1,3,3,5,4,3,2,3,4,5,3,2,4,4,4,2,3,2,
%U A256071 5,4,3,3,4,5,5,3,4,3,3,4,5,4,4,5,3,3,3,3,6,3,3,2,2,4,7,3,3,3,4,5,3
%N A256071 Number of ordered ways to write n = p + x*(3*x-1)/2, where p is prime or zero, and x is an integer.
%C A256071 Conjecture: a(n) > 0 for all n. Moreover, each nonnegative integer n is either an odd prime, or a generalized pentagonal number, or the sum of an odd prime and a generalized pentagonal number.
%C A256071 This is similar to the author's earlier conjecture on sums of primes and triangular numbers (see the reference and also A132399).
%C A256071 The conjecture has been verified for all n = 0..10^9.
%D A256071 Zhi-Wei Sun, On sums of primes and triangular numbers, J. Comb. Number Theory 1(2009), 65-76.
%H A256071 Zhi-Wei Sun, <a href="/A256071/b256071.txt">Table of n, a(n) for n = 0..10000</a>
%H A256071 Zhi-Wei Sun, <a href="http://arxiv.org/abs/0803.3737">On sums of primes and triangular numbers</a>, arXiv:0803.3737 [math.NT], 2008-2009.
%H A256071 Zhi-Wei Sun, <a href="http://arxiv.org/abs/0905.0635">On universal sums of polygonal numbers</a>, arXiv:0905.0635 [math.NT], 2009-2015.
%e A256071 a(11) = 1 since 11 = 11 + 0*(3*0-1)/2 with 11 prime.
%e A256071 a(15) = 1 since 15 = 0 + (-3)*(3*(-3)-1)/2.
%e A256071 a(50) = 1 since 50 = 43 + (-2)*(3*(-2)-1)/2 with 43 prime.
%t A256071 P[n_]:=(n==0)||PrimeQ[n]
%t A256071 Do[r=0;Do[If[P[n-x(3x-1)/2],r=r+1],{x,-Floor[(Sqrt[24n+1]-1)/6],Floor[(Sqrt[24n+1]+1)/6]}];Print[n," ",r];Label[aa];Continue,{n,0,100}]
%o A256071 (PARI) a(n)=if(n==0, return(1)); sum(x=1,(1+sqrt(24*n+1))\6, isprime(n-x*(3*x-1)/2))+sum(x=0,(sqrt(24*n+1)-1)\6, isprime(n-x*(3*x+1)/2))+ispolygonal(n,5)+(x->3*x^2+x==2*n)(round((sqrt(24*n+1)-1)/6)) \\ _Charles R Greathouse IV_, Apr 07 2015
%Y A256071 Cf. A000040, A001318, A132399, A256119.
%K A256071 nonn
%O A256071 0,3
%A A256071 _Zhi-Wei Sun_, Mar 13 2015