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.

Showing 1-3 of 3 results.

A187785 Number of ways to write n=x+y (x,y>=0) with {6x-1,6x+1} a twin prime pair and y a triangular number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 06 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>48624 not equal to 76106.
We have verified this for n up to 2*10^8. It seems that 723662 is the unique n>76106 which really needs y=0 in the described representation.
Compare the conjecture with another Sun's conjecture associated with A132399.

Examples

			a(9)=1 since 9=3+3(3+1)/2 with 6*3-1 and 6*3+1 both prime.
		

References

  • Zhi-Wei Sun, On sums of primes and triangular numbers, J. Comb. Number Theory 1(2009), no. 1, 65-76.

Crossrefs

Programs

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

A243956 Positive numbers n without a decomposition into a sum n = i+j such that 6i-1, 6i+1, 6j-1, 6j+1 are twin primes.

Original entry on oeis.org

1, 16, 67, 86, 131, 151, 186, 191, 211, 226, 541, 701
Offset: 1

Views

Author

Lear Young, Jun 15 2014

Keywords

Comments

Conjecture: any integer n > 701 has a decomposition into a sum n = i+j such that 6i-1, 6i+1, 6j-1, 6j+1 are twin primes.

Crossrefs

Programs

  • Maple
    b:= n-> isprime(6*n-1) and isprime(6*n+1):
    a:= proc(n) option remember; local i, k, ok;
          for k from 1 +`if`(n=1, 0, a(n-1)) do ok:= true;
            for i to iquo(k, 2) while ok
              do ok:= not(b(i) and b(k-i)) od;
            if ok then return k fi
          od
        end:
    seq(a(n), n=1..12);  # Alois P. Heinz, Jun 20 2014
  • PARI
    l=List();a=select(p->isprime(p-2)&&p>5, primes(2000))\6;
    for(i=1,#a-1,listput(l,2*a[i]);for(j=i+1,#a,listput(l,(a[i]+a[j]))));
    print(setminus(Set(vector(l[#l]/4, i, i)), Set(l)))

A235644 Number of decompositions of 12*n into the sum of two (not necessarily distinct) twin prime pairs.

Original entry on oeis.org

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

Views

Author

Lear Young, Jun 16 2014

Keywords

Comments

In the 1980's, Liang conjectured that (6n)^2 = p_1 + p_2 + p_3 + p_4, where (p_1, p_2) and (p_3, p_4) are twin prime pairs. See reference for more details.
It seems there are at least 2 solutions for the decompositions when n > 701.
If the two twin prime pairs are required to be distinct, the sequence is A187759.

Examples

			a(736) = 2 because 12*736 = 197 + 199 + 4217 + 4219 = 857 + 859 + 3557 + 3559, so there are 2 ways of expressing 12*n as the sum of two twin prime pairs.
		

References

  • Liang Ding Xiang, Problem 93#, Bulletin of Mathematics (Wuhan), 6(1992),41. ISSN 0488-7395.

Crossrefs

Programs

  • PARI
    v=select(p->isprime(p-2)&&p>5, primes(200))\6; l=List(); for(i=1, #v, if(2*v[i]<100, listput(l, 2*v[i])); for(j=i+1, #v, if((v[i]+v[j])<100, listput(l, v[i]+v[j])))); l1=vecsort(l); k=1; for(i=1, 100, s=sum(j=k, #l1, l1[j]==i); print1(s", "); k+=s) \\ Lear Young, Jun 16 2014
    
  • PARI
    v=select(p->isprime(p-2)&&p>5,primes(110))\6;for(i=1, 99, print1(sum(j=1,#v,vecsearch(v,i-v[j])>0 && i-v[j]>=v[j])", "))   \\ change i-v[j]>=v[j] to i-v[j]>v[j] is A187759.  Lear Young, Jun 16 2014
Showing 1-3 of 3 results.