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.

A234309 a(n) = |{2 < k <= n/2: 2^{phi(k)} + 2^{phi(n-k)} - 1 is prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 23 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For any integer n > 1, 2^k +2^{phi(n-k)} - 1 is prime for some 0 < k < n, and 2^{sigma(j)} + 2^{phi(n-j)} - 1 is prime for some 0 < j < n, where sigma(j) is the sum of all positive divisors of j.
As phi(k) is even for any k > 2, part (i) of the conjecture implies that there are infinitely many primes of the form 4^a + 4^b - 1 with a and b positive integers (cf. A234310). Note that any Mersenne prime greater than 3 has the form 2^{2a+1} - 1 = 4^a + 4^a - 1.

Examples

			a(6) = 1 since 2^{phi(3)} + 2^{phi(3)} - 1 = 2^2 + 2^2 - 1 = 7 is prime.
a(7) = 1 since 2^{phi(3)} + 2^{phi(4)} - 1 = 2^2 + 2^2 - 1 = 7 is prime.
a(8) = 2 since 2^{phi(3)} + 2^{phi(5)} - 1 = 2^2 + 2^4 - 1 = 19 and 2^{phi(4)} + 2^{phi(4)} - 1 = 2^2 + 2^2 - 1 = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2^(EulerPhi[k])+2^(EulerPhi[n-k])-1],1,0],{k,3,n/2}]
    Table[a[n],{n,1,100}]

A234337 a(n) = |{0 < k < n - 2: 4^k + 2^{phi(n-k)} - 1 is prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 23 2013

Keywords

Comments

Conjecture: Let a be 2 or 3 or 4. If n > 3, then a^k + a^{phi(n-k)/2} - 1 is prime for some 0 < k < n - 2.
This conjecture for a = 4 implies that there are infinitely many terms of the sequence A234310. The conjecture for a = 3 implies that there are infinitely many primes of the form 3^k + 3^m - 1 (cf. A234346), where k and m are positive integers.

Examples

			a(4) = 1 since 4^1 + 2^{phi(3)} - 1 = 7 is prime.
a(5) = 2 since 4^1 + 2^{phi(4)} - 1 = 7 and 4^2 + 2^{phi(3)} - 1 = 19 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=4^k+2^(EulerPhi[n-k])-1
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A234475 Number of ways to write n = k + m with 2 < k <= m such that q(phi(k)*phi(m)/4) + 1 is prime, where phi(.) is Euler's totient function and q(.) is the strict partition function (A000009).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
This implies that there are infinitely many primes p with p - 1 a term of A000009.

Examples

			a(6) = 1 since 6 = 3 + 3 with q(phi(3)*phi(3)/4) + 1 = q(1) + 1 = 2 prime.
a(76) = 1 since 76 = 18 + 58 with q(phi(18)*phi(58)/4) + 1 = q(42) + 1 = 1427 prime.
a(197) = 1 since 197 = 4 + 193 with q(phi(4)*phi(193)/4) + 1 = q(96) + 1 = 317789.
a(356) = 1 since 356 = 88 + 268 with q(phi(88)*phi(268)/4) + 1 = q(1320) + 1 = 35940172290335689735986241 prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=PartitionsQ[EulerPhi[k]*EulerPhi[n-k]/4]+1
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,3,n/2}]
    Table[a[n],{n,1,100}]

A234451 Number of ways to write n = k + m with k > 0 and m > 0 such that 2^(phi(k)/2 + phi(m)/6) + 3 is prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 9. Also, any integer n > 13 can be written as k + m with k > 0 and m > 0 such that 2^(phi(k)/2 + phi(m)/6) - 3 is prime.
(ii) Each integer n > 25 can be written as k + m with k > 0 and m > 0 such that 3*2^(phi(k)/2 + phi(m)/8) + 1 (or 3*2^(phi(k)/2 + phi(m)/12) + 1 when n > 38) is prime. Also, any integer n > 14 can be written as k + m with k > 0 and m > 0 such that 3*2^(phi(k)/2 + phi(m)/12) - 1 is prime.
This conjecture implies that there are infinitely many primes in any of the four forms 2^n + 3, 2^n - 3, 3*2^n + 1, 3*2^n - 1.
We have verified the conjecture for n up to 50000.

Examples

			a(10) = 1 since 10 = 3 + 7 with 2^(phi(3)/2 + phi(7)/6) + 3 = 7 prime.
a(11) = 1 since 11 = 4 + 7 with 2^(phi(4)/2 + phi(7)/6) + 3 = 7 prime.
a(12) = 2 since 12 = 3 + 9 = 5 + 7 with 2^(phi(3)/2 + phi(9)/6) + 3 = 7 and 2^(phi(5)/2 + phi(7)/6) + 3 = 11 both prime.
a(769) = 1 since 769 = 31 + 738 with 2^(phi(31)/2 + phi(738)/6) + 3 = 2^(55) + 3 prime.
a(787) = 1 since 787 = 112 + 675 with 2^(phi(112)/2 + phi(675)/6) + 3 = 2^(84) + 3 prime.
a(867) = 1 since 867 = 90 + 777 with 2^(phi(90)/2 + phi(777)/6) + 3 = 2^(84) + 3 prime.
a(869) = 1 since 869 = 51 + 818 with 2^(phi(51)/2 + phi(818)/6) + 3 = 2^(84) + 3 prime.
a(913) = 1 since 913 = 409 + 504 with 2^(phi(409)/2 + phi(504)/6) + 3 = 2^(228) + 3 prime.
a(1085) = 1 since 1085 = 515 + 570 with 2^(phi(515)/2 + phi(570)/6) + 3 = 2^(228) + 3 prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=2^(EulerPhi[k]/2+EulerPhi[n-k]/6)+3
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A234503 Number of ways to write n = k + m with k > 0 and m > 0 such that 3^(phi(k)/2 + phi(m)/12) + 2 is prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

It might seem that a(n) > 0 for all n > 14, but a(43905) = 0. If a(n) > 0 infinitely often, then there are infinitely many primes of the form 3^m + 2.
Similarly, it might seem that for n > 26 there is a positive integer k < n such that m = phi(k)/2 + phi(n-k)/12 is an integer with 3^m - 2 prime, but n = 41213 is a counterexample.
See also A234451 and A236358 for similar sequences.

Examples

			a(15) = 1 since 15 = 1 + 14 with 3^(phi(1)/2 + phi(14)/12) + 2 = 3 + 2 = 5 prime.
a(23) = 1 since 23 = 10 + 13 with 3^(phi(10)/2 + phi(13)/12) + 2 = 3^3 + 2 = 29 prime.
a(24) = 1 since 24 = 3 + 21 with 3^(phi(3)/2 + phi(21)/12) + 2 = 3^2 + 2 = 11 prime.
a(37) = 1 since 37 = 9 + 28 with 3^(phi(9)/2 + phi(28)/12) + 2 = 3^4 + 2 = 83 prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=3^(EulerPhi[k]/2+EulerPhi[n-k]/12)+2
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A234388 Primes of the form 2^k*(2^{phi(m)} - 1) + 1, where k and m are positive integers, and phi(.) is Euler's totient function.

Original entry on oeis.org

3, 5, 7, 13, 17, 31, 61, 97, 127, 193, 241, 257, 769, 1009, 1021, 2017, 4093, 7681, 8161, 8191, 12289, 15361, 16369, 16381, 32257, 61441, 64513, 65521, 65537, 131041, 131071, 523777, 524287, 786433, 1032193, 1048573, 4194301, 8257537, 8380417, 16515073, 16760833, 16776961, 16777153, 16777213, 67043329, 132120577, 134215681, 268369921, 536870401, 1073479681, 2013265921, 2113929217, 2146959361, 2147483137, 2147483647, 3221225473, 4293918721, 17175674881, 34359214081, 34359738337
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 25 2013

Keywords

Comments

Conjecture: (i) Any integer n > 1 can be written as k + m with k > 0 and m > 0 such that 2^k*(2^{phi(m)} - 1) + 1 is prime.
(ii) Each integer n > 2 can be written as k + m with k > 0 and m > 0 such that 2^k*(2^{phi(m)} - 1) - 1 is prime.
Part (i) of the conjecture implies that this sequence has infinitely many terms. See also A234399.
Note that the sequence contains all Fermat primes and Mersenne primes since 2^k + 1 = 2^k*(2^{phi(1)} - 1) + 1 and 2^p - 1 = 2*(2^{phi(p)} - 1) + 1, where k is a positive integer and p is a prime.

Examples

			a(1) = 3 since 2*(2^{phi(1)} - 1) + 1 = 3 is prime.
a(2) = 5 since 2^2*(2^{phi(1)} - 1) + 1 = 5 is prime.
a(3) = 7 since 2*(2^{phi(3)} - 1) + 1 = 7 is prime.
		

Crossrefs

Programs

  • Mathematica
    S:=Intersection[Union[Table[EulerPhi[k],{k,1,5000}]],Table[k,{k,1,500}]]
    n=0;Do[If[MemberQ[S,k]&&PrimeQ[2^m-2^(m-k)+1],n=n+1;Print[n," ",2^m-2^(m-k)+1]],{m,1,500},{k,1,m-1}]

A234399 a(n) = |{0 < k < n: 2^k*(2^phi(n-k) - 1) + 1 is prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 25 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
See also the conjecture in A234388.
The conjecture is false. a(5962) = 0. - Jason Yuen, Nov 04 2024

Examples

			a(7) = 2 since 2^1*(2^phi(6)-1) + 1 = 2*3 + 1 = 7 and 2^2*(2^phi(5)-1) + 1 = 4*15 + 1 = 61 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=f[n,k]=2^k*(2^(EulerPhi[n-k])-1)+1
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
  • PARI
    a(n) = sum(k=1,n-1,ispseudoprime(2^k*(2^eulerphi(n-k)-1)+1)) \\ Jason Yuen, Nov 04 2024

A236360 Numerator of the mean of all parts of all partitions of n.

Original entry on oeis.org

1, 4, 3, 5, 7, 66, 35, 88, 135, 35, 56, 44, 1313, 63, 220, 48, 1683, 3465, 4655, 1254, 4158, 7348, 28865, 2700, 48950, 10556, 13545, 14872, 132385, 168120, 212102, 89056, 111573, 209270, 520905, 323586, 800569, 988570, 1216215, 35560, 1827903, 744436
Offset: 1

Views

Author

Clark Kimberling, Jan 24 2014

Keywords

Comments

The arithmetic mean, M(n), of all parts of all partitions of n can be approximated by n^e(n), as typified by these pairs:
n ..... 100 .... 1000 .... 2000 .... 3000 .... 4000 .... 5000
e(n) .. 0.331 .. 0.3410 .. 0.3447 .. 0.3468 .. 0.3483 .. 0.3495

Examples

			First eight means:  1, 4/3, 3/2, 5/3, 7/4, 66/35, 35/18, 88/43.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0$2],
          `if`(i<1, [0$3], b(n, i-1)+`if`(i>n, [0$3],
           (l-> l+[0, l[1]*i, l[1]])(b(n-i, i)))))
        end:
    a:= n-> numer((l->l[2]/l[3])(b(n$2))):
    seq(a(n), n=1..50);  # Alois P. Heinz, Feb 06 2014
  • Mathematica
    f[n_] := Sum[DivisorSigma[0, m] PartitionsP[n - m], {m, 1, n}]; u =  PartitionsP[Range[50]] Range[50]; t = Table[u[[n]]/f[n], {n, 1, 50}]
    Numerator[t]    (*A236360*)
    Denominator[t]  (*A234361*)
    means = Map[Mean[Flatten[IntegerPartitions[#]]] &, Range[50]]; pwrLaw = a x^b; fit = FindFit[means, pwrLaw, {a, b}, x]; Show[{ListPlot[means], Plot[Function[{x}, Evaluate[pwrLaw /. fit]][x], {x, 1, Length[means]}]}]
    fit  (* Peter J. C. Moses, Jan 22 2014 *)

Formula

M(n) = A066186(n)/A006128(n).
Showing 1-8 of 8 results.