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-6 of 6 results.

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

A258836 Least practical number q with q-1 and q+1 twin prime such that n = q'/q for some practical number q' with q'-1 and q'+1 twin prime.

Original entry on oeis.org

4, 6, 4, 18, 6, 12, 6, 30, 12, 6, 18, 6, 150, 30, 4, 12, 60, 4, 12, 12, 42, 30, 240, 18, 6, 12, 4, 270, 12, 6, 42, 6, 6, 30, 12, 12, 180, 6, 60, 6, 30, 150, 30, 30, 4, 18, 2550, 4, 18, 12, 42, 6, 150, 30, 12, 60, 4, 6, 60, 4, 462, 180, 1230, 18, 30, 108, 60, 180, 12, 6, 30, 6, 570, 420, 462, 180, 6, 4, 198, 42, 522, 600, 1050, 42, 12, 12, 4, 60, 432, 18, 12, 60, 30, 60, 6, 12, 150, 60, 30, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 11 2015

Keywords

Comments

Conjecture: a(n) exists for any n > 0. Moreover, any positive rational number r can be written as q'/q, where q and q' are terms of A258838 (i.e., q is practical with q-1 and q+1 twin prime, and q' is practical with q'-1 and q'+1 twin prime).
This implies that there are infinitely many "sandwiches of the second kind" (i.e., triples {q-1,q,q+1} with q practical and q-1 and q+1 twin prime).
I have verified the conjecture for all those rational numbers r = n/m with m,n = 1,...,1000. -Zhi-Wei Sun, Jun 15 2015

Examples

			a(1) = 4 since 1 = 4/4 with 4 practical and 4-1 and 4+1 twin prime.
a(2) = 6 since 2 = 12/6, 6 is practical with 6-1 and 6+1 twin prime, and 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]
    Do[k=0;Label[bb];k=k+1;If[PrimeQ[Prime[k]+2]&&pr[Prime[k]+1]&&SW[n*(Prime[k]+1)],Goto[aa],Goto[bb]];
    Label[aa];Print[n," ",Prime[k]+1];Continue,{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}]

A257922 Practical numbers m with m-1 and m+1 both prime, and prime(m)-1 and prime(m)+1 both practical.

Original entry on oeis.org

4, 522, 1932, 5100, 6132, 6552, 8220, 18312, 18540, 22110, 29568, 45342, 70488, 70950, 92220, 105360, 109662, 114600, 116532, 117192, 123552, 128982, 131838, 132762, 136710, 148302, 149160, 166848, 177012, 183438, 197340, 206280, 233550, 235008, 257868, 272808, 273900, 276780, 279708, 286590
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 12 2015

Keywords

Comments

Conjecture: The sequence contains infinitely many terms. In other words, there are infinitely many positive integers n such that {prime(n)-1, prime(n), prime(n)+1} is a "sandwich of the first kind" (A210479) and {n-1, n, n+1} is a "sandwich of the second kind" (A258838).
This implies that there are infinitely many sandwiches of the first kind and also there are infinitely many sandwiches of the second kind.

Examples

			a(1) = 4 since 4 is paractical with 4-1 and 4+1 twin prime, and prime(4)-1 = 6 and prime(4)+1 = 8 are both practical.
a(2) = 522 since 522 is paractical with 522-1 and 522+1 twin prime, and prime(522)-1 = 3738 and prime(522)+1 = 3740 are both practical.
		

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)
    n=0;Do[If[PrimeQ[Prime[k]+2]&&pr[Prime[k]+1]&&pr[Prime[Prime[k]+1]-1]&&pr[Prime[Prime[k]+1]+1],n=n+1;Print[n," ",Prime[k]+1]],{k,1,24962}]

A257924 Primes p with p-1, p+1, prime(p)-1 and prime(p)+1 all practical.

Original entry on oeis.org

3, 7, 31, 89, 199, 8009, 11551, 20129, 23549, 38609, 47501, 67231, 96221, 97001, 103409, 111871, 120473, 131071, 143261, 146681, 168869, 174761, 183091, 193951, 196181, 208279, 208961, 219727, 229769, 237691, 238519, 240641, 247759, 270271, 290249, 291101, 293201, 337039, 340577, 352831
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 13 2015

Keywords

Comments

Conjecture: The sequence contains infinitely many terms. In other words, there are infinitely many prime numbers p such that {p-1, p, p+1} and {prime(p)-1, prime(p), prime(p)+1} are both "sandwiches of the first kind" (A210479).

Examples

			a(1) = 3 since 3 is prime with 3-1, 3+1, prime(3)-1 = 4 and prime(3)+1 = 6 all practical.
a(3) = 31 since 31 is prime with 31-1, 31+1, prime(31)-1 = 126 and prime(31)+1 = 128 all practical.
		

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)
    n=0;Do[If[pr[Prime[k]-1]&&pr[Prime[k]+1]&&pr[Prime[Prime[k]]-1]&&pr[Prime[Prime[k]]+1],n=n+1;Print[n," ",Prime[k]]],{k,1,30201}]

A370395 Numbers k that are neither squarefree nor prime powers sandwiched between twin primes.

Original entry on oeis.org

12, 18, 60, 72, 108, 150, 180, 192, 198, 228, 240, 270, 312, 348, 420, 432, 522, 600, 660, 810, 828, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1278, 1320, 1428, 1452, 1488, 1608, 1620, 1668, 1788, 1872, 1932, 1950, 1998, 2028, 2088, 2112, 2142, 2268, 2340, 2550
Offset: 1

Views

Author

Michael De Vlieger, Mar 27 2024

Keywords

Comments

Contains A113839 \ {4}.
This sequence contains 1062, 1278, 1608 while A258838 does not; A258838 includes 4, 6, 30, 42, 462, 570, etc.

Examples

			The number 12 is neither squarefree nor a prime power but comes between primes 11 and 13.
The number 30 is squarefree, though it comes between primes 29 and 31, it is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[1 + Select[Prime@ Range[100], PrimeQ[# + 2] &], Nor[SquareFreeQ[#], PrimePowerQ[#]] &]

Formula

Intersection of A014574 and A126706.
Showing 1-6 of 6 results.