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 13 results. Next

A210479 Primes p with p-1 and p+1 both practical: "Sandwich of the first kind".

Original entry on oeis.org

3, 5, 7, 17, 19, 29, 31, 41, 79, 89, 127, 197, 199, 271, 307, 379, 449, 461, 463, 521, 701, 727, 811, 859, 881, 919, 929, 967, 991, 1217, 1231, 1289, 1301, 1409, 1471, 1481, 1483, 1567, 1721, 1889, 1951, 1999, 2129, 2393, 2441, 2549, 2551, 2729, 2753, 2861, 2969, 3041, 3079, 3319, 3329, 3331, 3499, 3739, 3761, 4049
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 23 2013

Keywords

Comments

When p is a prime with p-1 and p+1 both practical, {p-1, p, p+1} is a sandwich of the first kind introduced by Zhi-Wei Sun. He conjectured that there are infinitely many such sandwiches. See also A210480 for a strong conjecture involving terms in the current sequence.
No term can be congruent to 1 or -1 modulo 12. In fact, if p>3 and 12|p-1, then neither 3 nor 4 divides p+1, hence p+1 is not practical since 4 is not a sum of some distinct divisors of p+1. Similarly, if 12|p+1 then p-1 is not practical.
Conjecture: The sequence a(n)^(1/n) (n=9,10,...) is strictly decreasing to the limit 1. Also, if {b(n)-1,b(n),b(n)+1} is the n-th sandwich of the second kind, then the sequence b(n)^(1/n) (n=1,2,3,...) is strictly decreasing to the limit 1.
This conjecture is similar to Firoozbakht's conjecture for primes.

Examples

			a(1)=3 since 2 and 4 are practical.
a(2)=5 since 4 and 6 are 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)
    n=0
    Do[If[pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True,n=n+1;Print[n," ",Prime[k]]],{k,1,100}]
  • PARI
    is_A210479(p)={is_A005153(p-1) && is_A005153(p+1) && isprime(p)} \\ M. F. Hasler, Jan 23 2013
    
  • PARI
    A210479(n,print_all=0)={forprime(p=3,, is_A005153(p-1) & is_A005153(p+1) & !(print_all & print1(p",")) & !n-- & return(p))} \\ M. F. Hasler, Jan 23 2013

A287681 Twin practical numbers: numbers k such that both k and k+2 are practical numbers.

Original entry on oeis.org

2, 4, 6, 16, 18, 28, 30, 40, 54, 64, 78, 88, 126, 160, 196, 198, 208, 270, 304, 306, 340, 378, 390, 414, 448, 460, 462, 510, 520, 544, 558, 700, 702, 726, 798, 810, 858, 868, 880, 918, 928, 966, 990, 1024, 1120, 1216, 1230, 1240, 1288, 1300, 1350, 1408, 1456
Offset: 1

Views

Author

Amiram Eldar, May 29 2017

Keywords

Comments

Melfi proved that this sequence is infinite.

Crossrefs

Programs

  • Mathematica
    practicalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1 || (n>1 && OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e} = Transpose[f]; Do[If[p[[i]] > 1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]];
    a={}; p1=False; k=2; While[Length[a]<100, p2=practicalQ[k]; If[p1 && p2, a=AppendTo[a,k-2]]; p1 = p2; k+=2];a

A258838 Practical numbers q with q-1 and q+1 twin primes: "Sandwiches of the second kind".

Original entry on oeis.org

4, 6, 12, 18, 30, 42, 60, 72, 108, 150, 180, 192, 198, 228, 240, 270, 312, 348, 420, 432, 462, 522, 570, 600, 660, 810, 828, 858, 882, 1020, 1032, 1050, 1092, 1152, 1230, 1290, 1302, 1320, 1428, 1452, 1482, 1488, 1620, 1722, 1872, 1932, 1950, 1998, 2028, 2088, 2112, 2130, 2142, 2268, 2310, 2340, 2550, 2592, 2688, 2730
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 12 2015

Keywords

Comments

The author introduced two kinds of "sandwiches" in 2013. The conjecture in A258836 essentially says that {a(m)/a(n): m,n = 1,2,3,...} coincides with the set of all positive rational numbers. This implies that the sequence contains infinitely many terms.

Examples

			a(1) = 4 since 4 is practical with 4-1 and 4+1 twin prime.
a(2) = 6 since 6 is practical with 6-1 and 6+1 twin prime.
a(3) = 12 since 12 is practical with 12-1 and 12+1 twin prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=FactorInteger[n]
    Pow[n_,i_]:=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2])
    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_]:=n>0&&(n<3||Mod[n,2]+Con[n]==0)
    SW[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]&&pr[n]
    n=0;Do[If[SW[m],n=n+1;Print[n," ",m]],{m,1,2730}]

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}]

A210444 a(n) = |{0

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 20 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>911.
This implies that for each n=2,3,4,... there is a positive integer k
The conjecture has been verified for n up to 10^6.

Examples

			a(7) = 1 since 6*7 = 42 is practical, and 41 and 43 are twin primes.
		

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[k*n-1]==True&&PrimeQ[k*n+1]==True&&pr[k*n]==True,1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A287682 Triples of practical numbers: numbers n such that n-2, n, n+2 are all practical numbers.

Original entry on oeis.org

4, 6, 18, 30, 198, 306, 462, 702, 1482, 2550, 3330, 4422, 5778, 6102, 6498, 9042, 11178, 11778, 14418, 15498, 17298, 17442, 19458, 20862, 21582, 22878, 23322, 23550, 25230, 26622, 26862, 26910, 27378, 30210, 34542, 36738, 38610, 39006, 39102, 40350, 40662
Offset: 1

Author

Amiram Eldar, May 29 2017

Keywords

Comments

Melfi proved that this sequence is infinite.

Crossrefs

Programs

  • Mathematica
    practicalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1 || (n>1 && OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e} = Transpose[f]; Do[If[p[[i]] > 1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]];
    a={}; p1=False; p2=False; k=2; While[Length[a]<100, p3=practicalQ[k]; If[p1 && p2 && p3, a=AppendTo[a,k-2]]; p1 = p2; p2 = p3; k+=2];a

A210722 Number of ways to write n = (2-(n mod 2))p+q+2^k with p, q-1, q+1 all prime, and p-1, p+1, q all practical.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 29 2013

Keywords

Comments

Conjecture: a(n)>0 except for n = 1,...,8, 10, 520, 689, 740.
Zhi-Wei Sun also guessed that any integer n>6 different from 407 can be written as p+q+F_k, where p is a prime with p-1 and p+1 practical, q is a practical number with q-1 and q+1 prime, and F_k (k>=0) is a Fibonacci number.

Examples

			a(1832)=1 since 1832=2*881+6+2^6 with 5, 7, 881 all prime and 6, 880, 882 all practical.
a(11969)=1 since 11969=127+11778+2^6 with 127, 11777, 11779 all prime and 126, 128, 11778 all practical.
		

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&&pq[n-2^k-(2-Mod[n,2])Prime[j]]==True,1,0],{k,0,Log[2,n]},{j,1,PrimePi[(n-2^k)/(2-Mod[n,2])]}]
    Do[Print[n," ",a[n]],{n,1,100}]
Showing 1-10 of 13 results. Next