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-10 of 16 results. Next

A209254 Number of ways to write 2n-1 = p+q with q practical, p and p^4+q^4 both prime.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 1, 2, 2, 3, 2, 4, 3, 1, 3, 1, 1, 4, 2, 5, 5, 1, 4, 1, 2, 4, 3, 1, 6, 3, 4, 4, 5, 1, 6, 7, 2, 4, 3, 4, 2, 4, 5, 1, 2, 3, 7, 5, 2, 4, 8, 4, 6, 5, 1, 2, 2, 3, 8, 3, 1, 5, 6, 2, 4, 7, 4, 8, 4, 2, 7, 6, 3, 4, 3, 1, 6, 6, 1, 7, 6, 2, 8, 9, 5, 7, 3, 3, 10, 7, 3, 9, 14, 1, 9, 4, 3, 4, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 14 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
Zhi-Wei Sun also conjectured that any odd integer greater than one can be written as p+q with q practical, and p and p^2+q^2 both prime. This is a refinement of Ming-Zhi Zhang's problem related to A036468.

Examples

			a(8)=1 since 2*8-1=11+4 with 4 practical, 11 and 11^4+4^4=14897 both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_,i_]:=Pow[n,i]=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n],s+1],1]<=DivisorSigma[1,Product[Pow[n,i],{i,1,s}]]+1,0,1],{s,1,Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[2n-1-Prime[k]]==True&&PrimeQ[Prime[k]^4+(2n-1-Prime[k])^4]==True,1,0],{k,1,PrimePi[2n-1]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A209312 Number of practical numbers p

Original entry on oeis.org

0, 0, 1, 2, 2, 2, 2, 1, 2, 3, 2, 4, 1, 2, 3, 3, 3, 4, 2, 4, 3, 4, 3, 6, 3, 2, 3, 4, 4, 6, 3, 5, 3, 4, 5, 8, 3, 2, 5, 5, 4, 7, 4, 7, 4, 2, 4, 11, 3, 1, 4, 7, 4, 7, 6, 7, 3, 4, 5, 12, 3, 2, 4, 8, 7, 8, 5, 9, 4, 2, 6, 14, 5, 2, 6, 7, 7, 9, 5, 9, 4, 4, 5, 14, 8, 2, 5, 8, 7, 10, 6, 9, 6, 2, 8, 15, 5, 3, 5, 8
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2.
This has been verified for n up to 10^7.
Except for p=1, all practical numbers are even. Thus, (n-p,n+p) prime is possible only if n is odd, and (n-p,n+p) can be practical only if n is even (except for p=1). - M. F. Hasler, Jan 19 2013

Examples

			a(8)=1 since 4, 8-4 and 8+4 are all practical.
a(13)=1 since 6 is practical, and 13-6 and 13+6 are both prime.
		

Crossrefs

Cf. A209321: Indices for which a(n)=2.

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[p]==True&&((PrimeQ[n-p]==True&&PrimeQ[n+p]==True)||(pr[n-p]==True&&pr[n+p]==True)),1,0],{p,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]
  • PARI
    A209312(n)=sum(p=1,n-1, is_A005153(p) && ((is_A005153(n-p) && is_A005153(n+p)) || (isprime(n-p) && isprime(n+p)))) \\ (Could be made more efficient by separating the case of odd and even n.) - M. F. Hasler, Jan 19 2013

A209315 Number of ways to write 2n-1 = p+q with q practical, p and q-p both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
This has been verified for n up to 10^7.
As p+q=2p+(q-p), the conjecture implies Lemoine's conjecture related to A046927.
Zhi-Wei Sun also conjectured that any integer n>2 can be written as p+q, where p is a prime, one of q and q+1 is prime and another of q and q+1 is practical.

Examples

			a(9)=1 since 2*9-1=5+12 with 12 practical, 5 and 12-5 both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[PrimeQ[p]==True&&pr[2n-1-p]==True&&PrimeQ[2n-1-2p]==True,1,0],{p,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A209320 Number of ways to write 2n = p+q with p and q both prime, p+1 and q-1 both practical.

Original entry on oeis.org

0, 0, 1, 2, 3, 2, 2, 2, 2, 3, 4, 5, 3, 2, 3, 3, 5, 7, 3, 3, 4, 4, 5, 8, 4, 3, 5, 2, 4, 8, 3, 4, 6, 2, 4, 7, 3, 4, 7, 2, 4, 9, 4, 4, 9, 5, 3, 9, 3, 5, 8, 3, 4, 10, 4, 6, 8, 5, 4, 14, 2, 4, 8, 2, 6, 10, 4, 4, 7, 4, 4, 10, 5, 4, 8, 3, 4, 9, 5, 5, 7, 3, 3, 13, 6, 5, 7, 4, 2, 11, 5, 5, 9, 4, 2, 9, 3, 6, 10, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2.
As p+q=(p+1)+(q-1), this unifies Goldbach's conjecture and its analog involving practical numbers.
The conjecture has been verified for n up to 10^7.

Examples

			a(8) = 2 since 2*8 = 3+13 = 11+5 with 3, 5, 11, 13 all prime and 3+1, 13-1, 11+1, 5-1 all practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[PrimeQ[2n-Prime[k]]==True&&pr[Prime[k]+1]==True&&pr[2n-Prime[k]-1]==True,1,0],{k,1,PrimePi[2n-2]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210528 Number of ways to write 2n = p+q (p<=q) with p, q and p^6+q^6 all practical.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 3, 3, 3, 5, 3, 6, 2, 5, 4, 6, 3, 7, 3, 5, 4, 5, 3, 8, 3, 6, 6, 7, 4, 9, 4, 6, 6, 6, 3, 10, 4, 7, 8, 8, 3, 12, 4, 7, 9, 8, 4, 12, 5, 10, 8, 9, 4, 14, 3, 9, 8, 11, 4, 13, 4, 11, 9, 9, 4, 15, 4, 10, 9, 11, 5, 13, 4, 12, 11, 11, 5, 17, 4, 10, 11, 11, 4, 15, 4, 12, 11, 11, 3, 16, 3, 11, 12, 13
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 27 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>0. Moreover, for any positive integers m and n, if m is greater than one or n is not among 17, 181, 211, 251, 313, 337, then 2n can be written as p+q with p, q and p^{3m}+q^{3m} all practical.
This conjecture implies that for each m=1,2,3,... there are infinitely many practical numbers of the form p^{3m}+q^{3m} with p and q both practical.

Examples

			a(3)=1 since 2*3=2+4 with 2, 4 and 2^6+4^6=4160 all practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[k]==True&&pr[2n-k]==True&&pr[k^6+(2n-k)^6]==True,1,0],{k,1,n}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210445 Least positive integer k with k*n practical.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 4, 1, 2, 2, 6, 1, 6, 2, 2, 1, 12, 1, 12, 1, 2, 3, 12, 1, 4, 3, 2, 1, 12, 1, 16, 1, 2, 6, 4, 1, 18, 6, 2, 1, 20, 1, 20, 2, 2, 6, 24, 1, 4, 2, 4, 2, 24, 1, 4, 1, 4, 6, 24, 1, 24, 8, 2, 1, 4, 1, 30, 3, 4, 2, 30, 1, 30, 9, 2, 3, 4, 1, 36, 1, 2, 10, 36, 1, 4, 10, 4, 1, 36, 1, 4, 3, 6, 12, 4, 1, 42, 2, 2, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 20 2013

Keywords

Comments

Conjecture: a(n) < n for all n>1, and a(n) < n/2 for all n>47.
Large values are obtained for prime n: The corresponding subsequence is a(p(n)) = (1, 2, 4, 4, 6, 6, 12, 12, 12, 12, 16, 18, 20, 20, 24, 24, 24, 24, ...), while for composite indices, a(c(n)) = (1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 3, 1, 4, 3, 2, 1, 1, 1, 2, ...). - M. F. Hasler, Jan 21 2013

Examples

			a(10)=2 since 2*10=20 is practical but 1*10=10 is not.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    Do[Do[If[pr[k*n]==True,Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",counterexample];Label[aa];Continue,{n,1,100}]
  • PARI
    A210445(n)={for(k=1,n,is_A005153(k*n)&&return(k))} \\ (Would return 0 if a(n)>n.) - M. F. Hasler, Jan 20 2013

Formula

a(n) = 1 iff n is in A005153, therefore a(n) > 1 for all odd n>1. - M. F. Hasler, Jan 21 2013

A210531 Number of nonnegative integers k

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 4, 2, 2, 2, 3, 2, 2, 4, 5, 4, 2, 3, 7, 5, 1, 2, 7, 4, 2, 7, 5, 6, 1, 5, 9, 4, 4, 6, 9, 9, 2, 5, 12, 9, 3, 5, 6, 8, 5, 6, 13, 4, 2, 8, 6, 11, 6, 11, 14, 8, 2, 4, 7, 4, 5, 7, 29, 8, 3, 5, 8, 11, 4, 13, 16, 13, 2, 7, 12, 13, 6, 10, 16, 10, 6, 15, 9, 13, 3, 9, 20, 11, 8, 11, 20, 9, 2, 8, 22, 14, 6, 15, 15
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>0. Moreover, if n>0 is different from 74, 138, 166, 542, then n+k^3 is practical for some 0<=k<=sqrt(n)*log(n); if n is not equal to 102, then n+k and n+k^3 are both practical for some k=0,...,n-1.
Zhi-Wei Sun also conjectured that any integer n>1 can be written as x^3+y (x,y>0) with 2x and 4xy both practical.

Examples

			a(22)=1 since 22+2^3=30 is practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[n+k^3]==True,1,0],{k,0,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210480 Number of primes p

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 23 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>3.
This is stronger than Goldbach's conjecture and the author's conjecture that any odd number greater than one is the sum of a prime and a practical number. Also, it implies that there are infinitely many primes p with p-1 and p+1 both practical.
The author has verified this new conjecture for n up to 10^7.

Examples

			a(1846)=1 since 1846=1289+557 with 1289 and 557 both prime, and 1288 and 1290 both practical.
a(15675)=1 since 15675=919+14756 with 919 prime, and 918, 920, 14756 all practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True&&(PrimeQ[n-Prime[k]]==True||pr[n-Prime[k]]==True),1,0],{k,1,PrimePi[n-1]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210533 Number of ways to write 2n = x+y (x,y>0) with x-1 and x+1 both prime, and x and x^3+y^3 both practical.

Original entry on oeis.org

0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 1, 5, 3, 5, 5, 5, 3, 6, 5, 6, 6, 6, 3, 6, 2, 7, 7, 6, 6, 7, 1, 6, 8, 8, 3, 8, 4, 6, 8, 7, 4, 8, 4, 8, 8, 6, 5, 8, 5, 6, 9, 7, 3, 9, 6, 8, 9, 8, 5, 9, 3, 7, 9, 7, 5, 9, 2, 7, 9, 7, 4, 10, 4, 8, 10, 8, 5, 10, 8, 7, 10, 10, 6, 10, 4, 9, 11, 8, 7, 11, 6, 11, 12, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2. Moreover, for each m=2,3,4,... any sufficiently large even integer can be written as x+y (x,y>0) with x-1 and x+1 both prime, and x and x^m+y^m both practical.

Examples

			a(17)=1 since 2*17=12+22 with 11 and 13 both prime, and 12 and 12^3+22^3=12376 both practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[PrimeQ[2k-1]==True&&PrimeQ[2k+1]==True&&pr[2k]==True&&pr[(2k)^3+(2n-2k)^3]==True,1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210681 Number of ways to write 2n = p+q+r (p<=q) with p, q, r-1, r+1 all prime and p-1, p+1, q-1, q+1, r all practical.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 3, 3, 2, 2, 3, 5, 6, 4, 3, 2, 4, 7, 10, 8, 5, 3, 5, 8, 12, 10, 6, 2, 3, 6, 11, 12, 6, 4, 3, 5, 9, 10, 6, 5, 4, 5, 8, 8, 5, 7, 7, 6, 8, 7, 6, 6, 8, 6, 7, 8, 5, 7, 8, 6, 7, 7, 4, 6, 7, 5, 6, 8, 4, 8, 6, 4, 5, 7, 5, 5, 8, 5, 6, 8, 6, 4, 7, 6, 6, 7, 5, 3, 7, 3, 4, 8, 6, 8, 5, 4, 3, 7, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 29 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4.
This conjecture involves two kinds of sandwiches introduced by the author, and it is much stronger than the Goldbach conjecture for odd numbers. We have verified the conjecture for n up to 10^7.
Zhi-Wei Sun also made the following conjectures:
(1) Any even number greater than 10 can be written as the sum of four elements in the set
S = {prime p: p-1 and p+1 are both practical}.
Also, every n=3,4,5,... can be represented as the sum of a prime in S and two triangular numbers.
(2) Each integer n>7 can be written as p + q + x^2 (or p + q + x(x+1)/2), where p is a prime with p-1 and p+1 both practical, and q is a practical number with q-1 and q+1 both prime.
(3) Every n=3,4,... can be written as the sum of three elements in the set
T = {x: 6x is practical with 6x-1 and 6x+1 both prime}.
(4) Any integer n>6 can be represented as the sum of two elements of the set S and one element of the set T.
(5) Each odd number greater than 11 can be written in the form 2p+q+r, where p and q belong to S, and r is a practical number with r-1 and r+1 both prime.

Examples

			a(5)=1 since 2*5=3+3+4 with 3 and 5 both prime, and 2 and 4 both practical.
a(6)=2 since 2*6=3+3+6=3+5+4 with 3,5,7 all prime and 2,4,6 all practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    pp[k_]:=pp[k]=pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True
    pq[n_]:=pq[n]=PrimeQ[n-1]==True&&PrimeQ[n+1]==True&&pr[n]==True
    a[n_]:=a[n]=Sum[If[pp[j]==True&&pp[k]==True&&pq[2n-Prime[j]-Prime[k]]==True,1,0],{j,1,PrimePi[n-1]},{k,j,PrimePi[2n-Prime[j]]}]
    Do[Print[n," ",a[n]],{n,1,100}]
Showing 1-10 of 16 results. Next