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

A208244 Number of ways to write n as the sum of a practical number (A005153) and a triangular number (A000217).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 11 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>0.
The author has verified this for n up to 10^8, and also guessed the following refinement: If n>6 is not among 20, 104, 272, 464, 1664, then n can be written as p+q with p an even practical number and q a positive triangular number.
Somu and Tran (2024) proved the conjecture that a(n)>0 for n>0. - Duc Van Khanh Tran, Apr 24 2024

Examples

			a(15)=1 since 15=12+3 with 12 a practical number and 3 a triangular number.
		

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)
    a[n_]:=a[n]=Sum[If[pr[n-k(k+1)/2]==True,1,0],{k,0,(Sqrt[8n+1]-1)/2}]
    Do[Print[n," ",a[n]],{n,1,100}]

A208246 Number of ways to write n = p+q with p prime or practical, and q-4, q, q+4 all practical.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 11 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
Zhi-Wei Sun also made some similar conjectures, below are few examples.
(1) Each integer n>3 can be written as p+q with p prime or practical, and q and q+2 both practical.
(2) Any integer n>12 can be written as p+q with p prime or practical, and q-8, q, q+8 all practical.
(3) The interval [n,2n) contains a practical number p with p-n a triangular number.
(4) Any integer n>1 can be written as x^2+y (x,y>0) with 2x and 2xy both practical.
Note that if x>=y>0 with x practical then xy is also practical.

Examples

			a(11)=1 since 11=3+8 with 3 prime, and 4, 8, 12 all practical.
a(12)=1 since 12=4+8 with 4, 8, 12 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)
    a[n_]:=a[n]=Sum[If[pr[k]==True&&pr[k-4]==True&&pr[k+4]==True&&(PrimeQ[n-k]==True||pr[n-k]==True),1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A208249 Number of primes p with n < p < 2n, such that p-1 and p+1 are both practical.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 12 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
Zhi-Wei Sun also made the following conjectures:
(1) For each integer n>6 there is a practical number q with n
(2) For any integer n>231 there is a prime p with n
(3) There are infinitely many twin prime pairs {p,p+2} with p-1,p+1,p+3 all practical.
(4) Any odd number n>1 can be written as p+q (p,q>0) with p practical and p^2+q^2 prime.

Examples

			a(9)=1 since 17 is the only prime 9<p<18 with p-1 and p+1 both practical.
		

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); a[n_] := a[n] = Sum[If[PrimeQ[n+k] == True && pr[n+k-1] == True && pr[n+k+1] == True,1,0], {k,1,n-1}]; Table[a[n],{n,1,100}]

Formula

a(n) = card { p in A000040 | n < p < 2n, p-1 and p+1 are both practical }.

A209253 Number of ways to write 2n-1 as the sum of a Sophie Germain prime and a practical number.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 14 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
This has been verified for n up to 5*10^6.

Examples

			a(40)=1 since 2*40-1=23+56 with 23 a Sophie Germain prime and 56 a practical number.
		

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)
    a[n_]:=a[n]=Sum[If[PrimeQ[2Prime[k]+1]==True&&pr[2n-1-Prime[k]]==True,1,0],{k,1,PrimePi[2n-1]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A209236 List of integers m>0 with m-1 and m+1 both prime, and m-2, m, m+2 all practical.

Original entry on oeis.org

4, 6, 18, 30, 198, 462, 1482, 2550, 3330, 4422, 9042, 11778, 26862, 38610, 47058, 60258, 62130, 65538, 69498, 79902, 96222, 106782, 124542, 143262, 149058, 151902, 184830, 200382, 208962, 225342, 237690, 249858, 251262, 295038, 301182, 312702, 345462, 348462
Offset: 1

Author

Zhi-Wei Sun, Jan 13 2013

Keywords

Comments

Conjecture: a(n) always exists. In other words, there are infinitely many quintuples (m-2, m-1, m, m+1, m+2) with m-1 and m+1 both prime and m-2, m, m+2 all practical.
Note that this sequence is a subsequence of A014574.
Zhi-Wei Sun observed that if m-2, m, m+2 are all practical with m>4 then m is congruent to 2 modulo 4. His PhD student Shan-Shan Du gave the following explanation: If m>4 is a multiple of 4, then m-2 and m+2 are congruent to 2 modulo 4, and one of them is not divisible by 3 and hence not practical (since 4=1+3).
Because all practical numbers greater than 2 are multiples of 4 or 6 (or both), it follows that every term in this sequence after the first is congruent to 6 modulo 12. - Hal M. Switkay, May 03 2022

Examples

			a(3)=18 since {17,19} is a twin prime pair and 16, 18, 20 are practical numbers.
		

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); n=0; t = {}; Do[If[PrimeQ[Prime[k]+2] == True && pr[Prime[k]-1] == True && pr[Prime[k]+1] == True && pr[Prime[k]+3] == True, n = n+1; AppendTo[t, Prime[k]+1]], {k, 100}]; t
  • PARI
    o=3;forprime(p=5,,(2+o==o=p)||next; is_A005153(p-3) & is_A005153(p-1) & is_A005153(p+1) & print1(p-1,",")) \\ M. F. Hasler, Jan 13 2013

A209254 Number of ways to write 2n-1 = p+q with q practical, p and p^4+q^4 both prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 14 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
Zhi-Wei Sun also conjectured that any odd integer greater than one can be written as p+q with q practical, and p and p^2+q^2 both prime. This is a refinement of Ming-Zhi Zhang's problem related to A036468.

Examples

			a(8)=1 since 2*8-1=11+4 with 4 practical, 11 and 11^4+4^4=14897 both prime.
		

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)
    a[n_]:=a[n]=Sum[If[pr[2n-1-Prime[k]]==True&&PrimeQ[Prime[k]^4+(2n-1-Prime[k])^4]==True,1,0],{k,1,PrimePi[2n-1]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A209312 Number of practical numbers p

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2.
This has been verified for n up to 10^7.
Except for p=1, all practical numbers are even. Thus, (n-p,n+p) prime is possible only if n is odd, and (n-p,n+p) can be practical only if n is even (except for p=1). - M. F. Hasler, Jan 19 2013

Examples

			a(8)=1 since 4, 8-4 and 8+4 are all practical.
a(13)=1 since 6 is practical, and 13-6 and 13+6 are both prime.
		

Crossrefs

Cf. A209321: Indices for which a(n)=2.

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)
    a[n_]:=a[n]=Sum[If[pr[p]==True&&((PrimeQ[n-p]==True&&PrimeQ[n+p]==True)||(pr[n-p]==True&&pr[n+p]==True)),1,0],{p,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]
  • PARI
    A209312(n)=sum(p=1,n-1, is_A005153(p) && ((is_A005153(n-p) && is_A005153(n+p)) || (isprime(n-p) && isprime(n+p)))) \\ (Could be made more efficient by separating the case of odd and even n.) - M. F. Hasler, Jan 19 2013

A209315 Number of ways to write 2n-1 = p+q with q practical, p and q-p both prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
This has been verified for n up to 10^7.
As p+q=2p+(q-p), the conjecture implies Lemoine's conjecture related to A046927.
Zhi-Wei Sun also conjectured that any integer n>2 can be written as p+q, where p is a prime, one of q and q+1 is prime and another of q and q+1 is practical.

Examples

			a(9)=1 since 2*9-1=5+12 with 12 practical, 5 and 12-5 both prime.
		

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)
    a[n_]:=a[n]=Sum[If[PrimeQ[p]==True&&pr[2n-1-p]==True&&PrimeQ[2n-1-2p]==True,1,0],{p,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A209320 Number of ways to write 2n = p+q with p and q both prime, p+1 and q-1 both practical.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2.
As p+q=(p+1)+(q-1), this unifies Goldbach's conjecture and its analog involving practical numbers.
The conjecture has been verified for n up to 10^7.

Examples

			a(8) = 2 since 2*8 = 3+13 = 11+5 with 3, 5, 11, 13 all prime and 3+1, 13-1, 11+1, 5-1 all practical.
		

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)
    a[n_]:=a[n]=Sum[If[PrimeQ[2n-Prime[k]]==True&&pr[Prime[k]+1]==True&&pr[2n-Prime[k]-1]==True,1,0],{k,1,PrimePi[2n-2]}]
    Do[Print[n," ",a[n]],{n,1,100}]

A210445 Least positive integer k with k*n practical.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 4, 1, 2, 2, 6, 1, 6, 2, 2, 1, 12, 1, 12, 1, 2, 3, 12, 1, 4, 3, 2, 1, 12, 1, 16, 1, 2, 6, 4, 1, 18, 6, 2, 1, 20, 1, 20, 2, 2, 6, 24, 1, 4, 2, 4, 2, 24, 1, 4, 1, 4, 6, 24, 1, 24, 8, 2, 1, 4, 1, 30, 3, 4, 2, 30, 1, 30, 9, 2, 3, 4, 1, 36, 1, 2, 10, 36, 1, 4, 10, 4, 1, 36, 1, 4, 3, 6, 12, 4, 1, 42, 2, 2, 1
Offset: 1

Author

Zhi-Wei Sun, Jan 20 2013

Keywords

Comments

Conjecture: a(n) < n for all n>1, and a(n) < n/2 for all n>47.
Large values are obtained for prime n: The corresponding subsequence is a(p(n)) = (1, 2, 4, 4, 6, 6, 12, 12, 12, 12, 16, 18, 20, 20, 24, 24, 24, 24, ...), while for composite indices, a(c(n)) = (1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 3, 1, 4, 3, 2, 1, 1, 1, 2, ...). - M. F. Hasler, Jan 21 2013

Examples

			a(10)=2 since 2*10=20 is practical but 1*10=10 is not.
		

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)
    Do[Do[If[pr[k*n]==True,Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",counterexample];Label[aa];Continue,{n,1,100}]
  • PARI
    A210445(n)={for(k=1,n,is_A005153(k*n)&&return(k))} \\ (Would return 0 if a(n)>n.) - M. F. Hasler, Jan 20 2013

Formula

a(n) = 1 iff n is in A005153, therefore a(n) > 1 for all odd n>1. - M. F. Hasler, Jan 21 2013
Showing 1-10 of 19 results. Next