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.

A219782 Number of ways to write n=x+y (0

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 3, 2, 3, 1, 1, 0, 2, 0, 2, 1, 3, 1, 2, 1, 3, 2, 4, 2, 2, 1, 1, 2, 4, 2, 3, 2, 4, 3, 0, 1, 2, 2, 1, 0, 4, 1, 4, 1, 6, 2, 1, 2, 6, 1, 3, 0, 1, 3, 5, 2, 7, 2, 1, 2, 4, 1, 3, 3, 5, 2, 1, 2, 2, 2, 4, 0, 3, 1, 5, 2, 4, 3, 2, 3, 2, 3, 2, 1, 4, 3, 3, 2, 3, 2, 7, 1, 5, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 27 2012

Keywords

Comments

Conjecture: a(n)>0 if n is not among 1, 8, 10, 18, 20, 41, 46, 58, 78, 116, 440.
Zhi-Wei Sun also made the following general conjecture:
For any k=0,1,2,4,5,6,... and positive odd integer m, each sufficiently large integer n can be written as x+y (0
For example, if n>6 is different from 24 then n can be written as x+y with x,y positive, and xy-n and xy+n both prime; if n>308 then n can be written as x+y with x,y positive, and 3n^2-xy and 3n^2+xy both prime.

Examples

			a(9)=2 since 9=1+8=4+5 with 9^2+1*8, 9^2-1*8, 9^2+4*5, 9^2-4*5 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[n^2-k(n-k)]==True&&PrimeQ[n^2+k(n-k)]==True,1,0],{k,1,n/2}]
    Do[Print[n," ",a[n]],{n,1,10000}]