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

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]

A282192 Number of ways of writing n as a sum of a prime and a squarefree semiprime.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 15 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 30.

Examples

			a(17) = 4 because we have [15, 2], [14, 3], [11, 6] and [10, 7].
		

Crossrefs

Programs

  • Maple
    N:= 200: # for a(0)..a(N)
    P:= select(isprime, [2,seq(i,i=3..N,2)]): nP:= nops(P):
    SFS:= NULL: j:= nP:
    for i from 1 to nP while j > 0 do
      while P[i]*P[j] > N do j:= j-1; if j = 0 then break fi; od:
      SFS:= SFS, op(map(`*`,P[1..min(i-1,j)],P[i]))
    od:
    gS:= add(x^i,i=[SFS]):
    gP:= add(x^P[i],i=1..nP):
    g:= gP*gS:
    [seq(coeff(g,x,i),i=0..N)]; # Robert Israel, Jun 15 2020
  • Mathematica
    nmax = 108; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}] Sum[MoebiusMu[k]^2 Floor[2/PrimeOmega[k]] Floor[PrimeOmega[k]/2] x^k, {k, 2, nmax}], {x, 0, nmax}], x]

A282318 Number of ways of writing n as a sum of a prime and a nonprime squarefree number.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 11 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 10.

Examples

			a(17) = 4 because we have [15, 2], [14, 3], [11, 6] and [10, 7].
		

Crossrefs

Programs

  • MATLAB
    N = 200; % to get a(0) to a(N)
    Primes = primes(N);
    B = zeros(1,N);
    B(Primes) = 1;
    LPrimes = Primes(Primes .^ 2 < N);
    SF = 1 - B;
    for p = LPrimes
       SF(p^2:p^2:N) = 0;
    end
    C = conv(SF, B);
    C = [0,0,C(1:N-1)] % Robert Israel, Feb 12 2017
  • Mathematica
    nmax = 107; CoefficientList[Series[(Sum[x^Prime[i], {i, 1, nmax}]) (x + Sum[Sign[PrimeNu[j] - 1] MoebiusMu[j]^2 x^j, {j, 2, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (Sum_{i>=1} x^prime(i))*(x + Sum_{j>=2} sgn(omega(j)-1)*mu(j)^2*x^j), where omega(j) is the number of distinct primes dividing j (A001221) and mu(j) is the Moebius function (A008683).

A133364 Number of ways of writing n as a sum of a prime and a square-full number.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Oct 26 2007

Keywords

Comments

This is to square-full numbers A001694 as A098983 is to squarefree numbers A005117 and as A002471 is to squares A000290. Asymptotics of this should relate to A098983.

Examples

			a(3) = 1 because 3=2+1 where 2 is prime and 1 is square-full.
a(4) = 1 because 4=3+1 where 3 is prime and 1 is square-full.
a(5) = 0 because there is no positive solution to 5 = prime+(square-full).
a(6) = 2 because 6=5+1=2+4.
a(7) = 1 because 7=3+4.
a(8) = 1 because 8=7+1.
a(9) = 1 because 9=5+4.
a(10) = 1 because 10=2+8.
a(11) = 3 because 11=2+9=3+8=7+4.
a(12) = 2 because 12=3+9=11+1.
a(13) = 1 because 13=5+8.
a(14) = 2 because 14=5+9=13+1.
a(15) = 2 because 15=7+8=11+4.
a(16) = 1 because 16=7+9.
a(17) = 1 because 17=13+4.
a(18) = 2 because 18=2+16=17+1.
a(19) = 2 because 19=3+16=11+8.
a(20) = 2 because 20=19+1=11+9.
		

Crossrefs

Programs

  • Maple
    isA001694 := proc(n) local digs,i ; digs := ifactors(n)[2] ; for i in digs do if op(2,i) = 1 then RETURN(false) ; fi ; od: RETURN(true) ; end: A133364 := proc(n) local a,p ; a := 0 ; p := 2 ; while p < n do if isA001694(n-p) then a := a+1 ; fi ; p := nextprime(p) ; od: RETURN(a) ; end: seq(A133364(n),n=3..90) ; # R. J. Mathar, Nov 09 2007
  • Mathematica
    a = {}; For[n = 3, n < 100, n++, c = 0; For[j = 1, Prime[j] < n, j++, d = 1; b = FactorInteger[n - Prime[j]]; For[m = 1, m < Length[b] + 1, m++, If[b[[m, 2]] < 2, d = 0]]; If[d == 1, c++ ]]; AppendTo[a, c]]; a (* Stefan Steinerberger, Oct 29 2007 *)

Formula

a(n) = Card{n = i + j where i is in A000040 and j is in A001694}.

Extensions

Corrected and extended by Stefan Steinerberger, Oct 29 2007 and by R. J. Mathar, Nov 09 2007

A282290 Expansion of (Sum_{p prime, i>=2} x^(p^i))*(Sum_{j>=2} mu(j)^2*x^j), where mu() is the Moebius function (A008683).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 11 2017

Keywords

Comments

Number of ways of writing n as a sum of a proper prime power (A246547) and a squarefree number > 1 (A144338).
Conjecture: a(n) > 0 for all n > 8.

Examples

			a(19) = 4 because we have [16, 3], [15, 4], [11, 8] and [10, 9].
		

Crossrefs

Programs

  • Mathematica
    nmax = 110; CoefficientList[Series[Sum[Sign[PrimeOmega[i] - 1] Floor[1/PrimeNu[i]] x^i, {i, 2, nmax}] Sum[MoebiusMu[j]^2 x^j, {j, 2, nmax}], {x, 0, nmax}], x]

Formula

G.f.: (Sum_{p prime, i>=2} x^(p^i))*(Sum_{j>=2} mu(j)^2*x^j).

A283929 Number of ways of writing n as a sum of a twin prime (A001097) and a squarefree semiprime (A006881).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Mar 18 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 30.

Examples

			a(17) = 3 because we have [14, 3], [11, 6] and [10, 7].
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(0) to a(N)
    V:= Vector(N):
    Primes:= select(isprime,[2,seq(i,i=3..N+2)]):
    PS:= convert(Primes,set);
    Twins:= PS intersect map(`-`,PS,2):
    Twins:= Twins union map(`+`,Twins,2):
    Twins:= sort(convert(Twins,list)):
    for i from 1 to nops(Twins) do
      for j from 1 to nops(Primes) while Twins[i]+2*Primes[j] <= N do
        for k from 1 to j-1 do
          v:= Twins[i]+Primes[k]*Primes[j];
          if v > N then break fi;
          V[v]:= V[v]+1;
    od od od:
    0, seq(V[i],i=1..N); # Robert Israel, Mar 29 2017
  • Mathematica
    nmax = 110; CoefficientList[Series[Sum[Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k, {k, 1, nmax}] Sum[MoebiusMu[k]^2 Floor[2/PrimeOmega[k]] Floor[PrimeOmega[k]/2] x^k, {k, 2, nmax}], {x, 0, nmax}], x]
  • PARI
    concat([0, 0, 0, 0, 0, 0, 0, 0, 0], Vec(sum(k=1, 110, (isprime(k) && (isprime(k - 2) || isprime(k + 2)))* x^k) * sum(k=2, 110, moebius(k)^2 * floor(2/bigomega(k)) * floor(bigomega(k)/2) * x^k) + O(x^111))) \\ Indranil Ghosh, Mar 18 2017

Formula

G.f.: (Sum_{k>=1} x^A001097(k))*(Sum_{k>=1} x^A006881(k)).

A287299 Number of ways of writing n as a sum of a proper prime power (A246547) and a nonprime squarefree number (A000469).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, May 23 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 108.

Examples

			a(26) = 3 because we have [25, 1], [22, 4] and [16, 10].
		

Crossrefs

Programs

  • Mathematica
    nmax = 120; CoefficientList[Series[(Sum[Boole[SquareFreeQ[k] && ! PrimeQ[k]] x^k, {k, 1, nmax}]) (Sum[Boole[PrimePowerQ[k] && ! PrimeQ[k]] x^k, {k, 1, nmax}]), {x, 0, nmax}], x]
  • PARI
    x='x+O('x^120); concat([0, 0, 0, 0, 0], Vec(sum(k=1, 120, (issquarefree(k) && !isprime(k))*x^k) * sum(k=1, 120, (isprimepower(k) && !isprime(k))*x^k))) \\ Indranil Ghosh, May 23 2017

Formula

G.f.: (Sum_{k>=1} x^A246547(k))*(Sum_{k>=1} x^A000469(k)).

A280616 Smallest m such that the m - s is a prime for exactly n distinct squarefree numbers s.

Original entry on oeis.org

3, 4, 9, 8, 16, 18, 26, 32, 24, 36, 42, 44, 48, 66, 70, 60, 74, 72, 94, 106, 84, 90, 102, 112, 130, 108, 126, 114, 166, 160, 150, 144, 184, 218, 174, 208, 168, 220, 138, 222, 232, 204, 216, 262, 302, 268, 234, 252, 246, 240, 264, 276, 306, 270, 340, 318, 294, 312, 342, 336, 406, 330, 324
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 06 2017

Keywords

Examples

			a(1) = 3 because 3 - 1 = 2 is prime where 1 is squarefree number.
a(2) = 4 because 4 - 1 = 3 and 4 - 2 = 2 are primes where 1 and 2 are squarefree numbers.
a(3) = 9 because 9 - 2 = 7, 9 - 6 = 3, 9 - 7 = 2 are primes where 2, 6, 7 are squarefree numbers.
		

Crossrefs

Showing 1-8 of 8 results.