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

A304081 Number of ways to write n as p + 2^k + (1+(n mod 2))*5^m, where p is an odd prime, and k and m are nonnegative integers with 2^k + (1+(n mod 2))*5^m squarefree.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 06 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 7.
This has been verified for n up to 2*10^10.
See also A303821, A303934, A303949, A304031 and A304122 for related information, and A304034 for a similar conjecture.
The author would like to offer 2500 US dollars as the prize to the first proof of the conjecture, and 250 US dollars as the prize to the first explicit counterexample. - Zhi-Wei Sun, May 08 2018

Examples

			a(6) = 1 since 6 = 3 + 2^1 + 5^0 with 3 an odd prime and 2^1 + 5^0 = 3 squarefree.
a(15) = 1 since 15 = 5 + 2^3 + 2*5^0 with 5 an odd prime and 2^3 + 2*5^0 = 2*5 squarefree.
a(35) = 1 since 35 = 29 + 2^2 + 2*5^0 with 29 an odd prime and 2^2 + 2*5^0 = 2*3 squarefree.
a(91) = 1 since 91 = 17 + 2^6 + 2*5^1 with 17 an odd prime and 2^6 + 2*5^1 = 2*37 squarefree.
a(9574899) = 1 since 9574899 = 9050609 + 2^19 + 2*5^0 with 9050609 an odd prime and 2^19 + 2*5^0 = 2*5*13*37*109 squarefree.
a(6447154629) = 2 since 6447154629 = 6447121859 + 2^15 + 2*5^0 with 6447121859 prime and 2^15 + 2*5^0 = 2*5*29*113 squarefree, and 6447154629 = 5958840611 + 2^15 + 2*5^12 with 5958840611 prime and 2^15 + 2*5^12 = 2*17*41*433*809 squarefree.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>2&&PrimeQ[n];
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+(1+Mod[n,2])*5^m]&&PQ[n-2^k-(1+Mod[n,2])*5^m],r=r+1],{k,0,Log[2,n]},{m,0,If[2^k==n,-1,Log[5,(n-2^k)/(1+Mod[n,2])]]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A303821 Number of ways to write 2*n as p + 2^x + 5^y, where p is a prime, and x and y are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 01 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. Moreover, for any integer n > 4, we can write 2*n as p + 2^x + 5^y, where p is an odd prime, and x and y are positive integers.
This has been verified for n up to 10^10.
See also A303934 and A304081 for further refinements, and A303932 and A304034 for similar conjectures.

Examples

			a(2) = 1 since 2*2 = 2 + 2^0 + 5^0 with 2 prime.
a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 prime.
a(5616) = 2 since 2*5616 = 9059 + 2^11 + 5^3 = 10979 + 2^7 + 5^3 with 9059 and 10979 both prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A303934 Number of ways to write 2*n as p + 2^k + 5^m with p prime and 2^k + 5^m squarefree, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 03 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for all n = 2..10^10.
Note that a(n) <= A303821(n).

Examples

			a(2) = 1 since 2*2 = 2 + 2^0 + 5^0 with 2 prime and 2^0 + 5^0 squarefree.
a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 prime and 2^1 + 5^0 squarefree.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[SquareFreeQ[2^k+5^m]&&PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A304331 Number of integers k > 1 such that n - F(k) is a positive squarefree number, where F(k) denotes the k-th Fibonacci number A000045(k).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 11 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. In other words, every n = 2,3,... can be written as the sum of a positive Fibonacci number and a positive squarefree number.
This has been verified for n up to 10^10.
See also A304333 for a similar conjecture involving Lucas numbers.

Examples

			a(2) = 1 with 2 - F(2) = 1 squarefree.
a(53) = 2 with 53 - F(3) = 3*17 and 53 - F(9) = 19 both squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Fibonacci[n];
    tab={};Do[r=0;k=2;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]

A304333 Number of positive integers k such that n - L(k) is a positive squarefree number, where L(k) denotes the k-th Lucas number A000204(k).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 11 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for n up to 5*10^9.
See also A304331 for a similar conjecture involving Fibonacci numbers.
For all n, a(n) <= A130241(n). - Antti Karttunen, May 13 2018

Examples

			a(2) = 1 with 2 - L(1) = 1 squarefree.
a(3) = 1 with 3 - L(1) = 2 squarefree.
a(67) = 2 with 67 - L(1) = 2*3*11 and 67 - L(7) = 2*19 both squarefree.
		

Crossrefs

Programs

  • Maple
    a := proc(n) local count, lucas, newcas;
    count := 0; lucas := 1; newcas := 2;
    while lucas < n do
        if numtheory:-issqrfree(n - lucas) then count := count + 1 fi;
        lucas, newcas := lucas + newcas, lucas;
    od;
    count end:
    seq(a(n), n=1..90); # Peter Luschny, May 15 2018
  • Mathematica
    f[n_]:=f[n]=LucasL[n];
    tab={};Do[r=0;k=1;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]
  • PARI
    A304333(n) = { my(u1=1,u2=3,old_u1,c=0); if(n<=2,n-1,while(u1Antti Karttunen, May 13 2018

A304522 Number of ordered ways to write n as the sum of a Fibonacci number and a positive odd squarefree number.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 3, 3, 4, 2, 4, 3, 4, 3, 4, 3, 5, 2, 4, 1, 3, 2, 2, 3, 4, 2, 5, 3, 5, 4, 4, 4, 4, 4, 5, 3, 5, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 6, 3, 5, 3, 6, 3, 5, 3, 4, 3, 4, 4, 5, 4, 5, 3, 6, 4, 6, 3, 4, 3, 5, 3, 4, 3, 4, 1, 4, 4, 5, 4, 5, 3, 7
Offset: 1

Views

Author

Zhi-Wei Sun, May 13 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 27, 83, 31509.
This conjecture implies that any integer n > 1 not equal to 83 can be written as the sum of a positive Fibonacci number and a positive odd squarefree number, which has been verified for n up to 10^10. Note that 83 = 0 + 83 = 1 + 2*41, where 0 and 1 are Fibonacci numbers, and 83 and 2*41 are squarefree.
The author would like to offer 1000 US dollars as the prize for the first complete solution to his conjecture that any positive integer is the sum of a Fibonacci number and a positive odd squarefree number.
See also A304331, A304333 and A304523 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0 + 1 with 0 a Fibonacci number and 1 odd and squarefree.
a(2) = 1 since 2 = 1 + 1 with 1 = A000045(1) = A000045(2) a Fibonacci number and 1 odd and squarefree.
a(27) = 1 since 27 = 8 + 19 with 8 = A000045(6) a Fibonacci number and 19 odd and squarefree.
a(83) = 1 since 83 = 0 + 83 with 0 = A000045(0) a Fibonacci number and 83 odd and squarefree.
a(31509) = 1 since 31509 = 10946 + 20563 with 10946 = A000045(21) a Fibonacci number and 20563 odd and squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Fibonacci[n];
    QQ[n_]:=QQ[n]=n>0&&Mod[n,2]==1&&SquareFreeQ[n];
    tab={};Do[r=0;k=0;Label[bb];If[f[k]>=n,Goto[aa]];If[QQ[n-f[k]],r=r+1];k=k+1+Boole[k==1];Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]

A304523 Number of ordered ways to write n as the sum of a Lucas number (A000032) and a positive odd squarefree number.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 2, 2, 1, 3, 1, 4, 2, 3, 2, 4, 3, 3, 3, 4, 3, 4, 3, 3, 1, 2, 1, 4, 2, 4, 3, 4, 3, 4, 3, 3, 3, 5, 3, 5, 2, 5, 2, 4, 2, 5, 2, 5, 2, 4, 2, 5, 3, 2, 3, 6, 3, 5, 3, 6, 2, 5, 2, 5, 1, 6, 3, 5, 3, 5, 3, 3, 3, 5, 3, 4, 3, 6, 3, 4, 3, 5, 2, 5, 4, 5, 4, 6
Offset: 1

Views

Author

Zhi-Wei Sun, May 13 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 11, 13, 27, 29, 67, 139, 193, 247, 851.
It has been verified that a(n) > 0 for all n = 2..5*10^9.
See also A304331, A304333 and A304522 for similar conjectures.

Examples

			a(3) = 1 since 3 = A000032(0) + 1 with 1 odd and squarefree.
a(27) = 1 since 27 = A000032(3) + 23 with 23 odd and squarefree.
a(29) = 1 since 29 = A000032(6) + 11 with 11 odd and squarefree.
a(67) = 1 since 67 = A000032(0) + 5*13 with 5*13 odd and squarefree.
a(247) = 1 since 247 = A000032(6) + 229 with 229 odd and squarefree.
a(851) = 1 since 851 = A000032(0) + 3*283 with 3*283 odd and squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=LucasL[n];
    QQ[n_]:=QQ[n]=n>0&&Mod[n,2]==1&&SquareFreeQ[n];
    tab={};Do[r=0;k=0;Label[bb];If[k>0&&f[k]>=n,Goto[aa]];If[QQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]

A304032 Number of ways to write 2*n as p + 2^k + 3^m with p prime and 2^k + 3^m a product of at most two distinct primes, where k and m are nonnegative integers.

Original entry on oeis.org

0, 1, 1, 3, 4, 4, 4, 6, 6, 5, 8, 9, 4, 6, 7, 4, 9, 10, 6, 9, 10, 6, 11, 14, 7, 9, 11, 5, 10, 9, 6, 12, 10, 3, 11, 15, 7, 12, 16, 7, 9, 14, 9, 12, 14, 8, 12, 16, 5, 12, 18, 10, 12, 16, 9, 12, 19, 10, 13, 17, 6, 10, 15, 6, 10, 16, 10, 12, 15, 10, 17, 20, 8, 14, 15, 8, 11, 18, 9, 12
Offset: 1

Views

Author

Zhi-Wei Sun, May 04 2018

Keywords

Comments

The even number 58958 cannot be written as p + 2^k + 3^m with p and 2^k + 3^m both prime.
Clearly, a(n) <= A303702(n). We note that a(n) > 0 for all n = 2..5*10^8.
See also A304034 for a related conjecture.

Examples

			a(3) = 1 since 2*3 = 3 + 2^1 + 3^0 with 3 = 2^1 + 3^0 prime.
		

References

  • J. R. Chen, On the representation of a larger even integer as the sum of a prime and the product of at most two primes, Sci. Sinica 16(1973), 157-176.

Crossrefs

Programs

  • Mathematica
    qq[n_]:=qq[n]=SquareFreeQ[n]&&Length[FactorInteger[n]]<=2;
    tab={};Do[r=0;Do[If[qq[2^k+3^m]&&PrimeQ[2n-2^k-3^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[3,2n-2^k]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A304689 Number of nonnegative integers k such that n - F(k)*F(k+1) is positive and squarefree, where F(k) denotes the k-th Fibonacci number A000045(k).

Original entry on oeis.org

1, 2, 3, 2, 2, 2, 4, 3, 2, 1, 3, 3, 3, 2, 3, 4, 4, 2, 3, 3, 4, 3, 4, 2, 3, 2, 2, 3, 3, 3, 3, 4, 2, 3, 4, 4, 4, 3, 4, 3, 5, 3, 5, 4, 4, 3, 4, 4, 3, 2, 2, 3, 5, 3, 3, 2, 5, 3, 5, 2, 5, 4, 4, 2, 2, 4, 4, 4, 3, 4, 5, 4, 5, 4, 4, 3, 4, 3, 5, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 1, 4, 3, 5, 3, 5, 2, 5, 3, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, May 17 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 10, 90, 66690, 67452, 22756020.

Examples

			a(1) = 1 with 1 - F(0)*F(1) = 1 squarefree.
a(10) = 1 with 10 - F(0)*F(1) = 2*5 squarefree.
a(90) = 1 with 90 - F(1)*F(2) = 89 squarefree.
a(66690) = 1 with 66690 - F(10)*F(11) = 66690 - 55*89 = 5*17*727 squarefree.
a(67452) = 1 with 67452 - F(1)*F(2) = 37*1823 squarefree.
a(22756020) = 1 with 22756020 - F(2)*F(3) = 2*11378009 squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Fibonacci[n]*Fibonacci[n+1];
    QQ[n_]:=QQ[n]=SquareFreeQ[n];
    tab={};Do[r=0;k=0;Label[bb];If[f[k]>=n,Goto[aa]];If[QQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,100}];Print[tab]

A304720 Number of nonnegative integers k such that n - (4^k - k) is positive and squarefree.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 1, 3, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 1, 3, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 2, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 4, 2, 3, 3, 3, 1, 2, 2, 4, 2, 2, 3, 3, 2, 2, 3, 3, 1, 3, 2, 4, 1, 3, 2, 4, 2, 3, 2, 3
Offset: 1

Views

Author

Zhi-Wei Sun, May 17 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for n up to 2*10^10.
See A304721 for the values of n with a(n) = 1.
See A281192 for N such that none of N - 1 or N + 1 is squarefree: then n = N + 2 is such that n - 1 and n - 3 are not squarefree, i.e., one cannot take k = 0 or k = 1 in the present definition, and k > 1 is required to satisfy the conjecture. - M. F. Hasler, May 23 2018

Examples

			a(2) = 1 with 2 - (4^0 - 0) = 1 squarefree.
a(178) = 1 with 178 - (4^0 - 0) = 3*59 squarefree.
a(245) = 1 with 245 - (4^2 - 2) = 3*7*11 squarefree.
a(9196727) = 1 with 9196727 - (4^6 - 6) = 19*211*2293 squarefree.
a(16130577) = 1 with 16130577 - (4^9 - 9) = 2*7934221 squarefree.
a(38029402) = 1 with 38029402 - (4^1 - 1) = 1153*32983 squarefree.
a(180196927) = 1 with 180196927 - (4^11 - 11) = 2*139*227*2789 squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=4^n-n;
    tab={};Do[r=0;k=0;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,100}];Print[tab]
Showing 1-10 of 15 results. Next