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

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

Views

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.
		

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

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]
    				

A211190 Number of ways to write 2n = p+2q+3r with p,q,r terms of A210479.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 03 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8. Moreover, for positive integers a<=b<=c, all integers n>=3(a+b+c) with n-a-b-c even can be written as a*p+b*q+c*r with p,q,r terms of A210479, if and only if (a,b,c) is among the following 6 triples: (1,2,3), (1,2,4), (1,2,8), (1,2,9), (1,3,5), (1,3,8).
The author also conjectured that if n>8 is odd, different from 201 and 447, and not congruent to 1 or -1 modulo 12, then n can be written as a sum of three terms of A210479.

Examples

			a(10)=1 since 2*10=5+2*3+3*3 with 3 and 5 terms of A210479.
		

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)
    p[k_]:=p[k]=pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True
    q[n_]:=q[n]=PrimeQ[n]==True&&pr[n-1]==True&&pr[n+1]==True
    a[n_]:=a[n]=Sum[If[p[j]==True&&p[k]==True&&q[2n-2Prime[j]-3Prime[k]]==True,1,0],{j,1,PrimePi[n]},{k,1,PrimePi[(2n-2Prime[j])/3]}]
    Do[Print[n," ",a[n]],{n,1,100}]
Showing 1-3 of 3 results.