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.

Previous Showing 11-13 of 13 results.

A211165 Number of ways to write n as the sum of a prime p with p-1 and p+1 both practical, a prime q with q+2 also prime, and a Fibonacci number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 30 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>5.
This has been verified for n up to 300000.
Note that for n=406 we cannot represent n in the given way with q+1 practical.

Examples

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

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
    q[n_]:=q[n]=PrimeQ[n]==True&&PrimeQ[n+2]==True
    a[n_]:=a[n]=Sum[If[k!=2&&Fibonacci[k]
    				

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}]
Previous Showing 11-13 of 13 results.