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]
    				

A261641 Number of practical numbers q such that n+(n mod 2)-q and n-(n mod 2)+q are both practical numbers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 27 2015

Keywords

Comments

Conjecture: a(n) > 0 except for n = 2. Also, for any integer n > 3, there is a practical number q such that n-(n mod 2)-q and n+(n mod 2)+q are both practical numbers.
This is an analog of the author's conjecture in A261627, and it is stronger than Margenstern's conjecture proved by Melfi in 1996.

Examples

			a(15) = 1 since 4, 15-(4-1) = 12 and 15+(4-1) = 18 are all practical.
a(2206) = 1 since 2106, 2206-2106 = 100 and 2206+2106 = 4312 are 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)
    Do[r=0;Do[If[pr[q]&&pr[n+Mod[n,2]-q]&&pr[n-Mod[n,2]+q],r=r+1],{q,1,n}];Print[n," ",r];Continue,{n,1,80}]

A261653 Number of primes p < n such that n-p-1 and n+p+1 are both prime or both practical.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6. Also, for any integer n > 2, there is a prime p < n such that n-(p-1) and n+(p-1) are both prime or both practical.
Note that 1 is the only odd practical number and 2 is the only even prime.

Examples

			a(31) = 1 since 11, 31-11-1 = 19 and 31+11+1 = 43 are all prime.
a(38) = 17 since 17 is prime, and 38-17-1 = 20 and 38+17+1 = 56 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)
    p[n_]:=Prime[n]
    Do[r=0;Do[If[(PrimeQ[n-p[k]-1]&&PrimeQ[n+p[k]+1])||(pr[n-p[k]-1]&&pr[n+p[k]+1]),r=r+1],{k,1,PrimePi[n-1]}];Print[n," ",r];Continue,{n,1,80}]
Previous Showing 11-13 of 13 results.