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.

Previous Showing 21-30 of 43 results. Next

A325704 If n = prime(i_1)^j_1 * ... * prime(i_k)^j_k, then a(n) is the numerator of the reciprocal factorial sum j_1/i_1! + ... + j_k/i_k!.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 1, 7, 1, 5, 1, 25, 2, 4, 1, 2, 1, 13, 13, 121, 1, 7, 1, 721, 3, 49, 1, 5, 1, 5, 61, 5041, 5, 3, 1, 40321, 361, 19, 1, 37, 1, 241, 7, 362881, 1, 9, 1, 4, 2521, 1441, 1, 5, 7, 73, 20161, 3628801, 1, 8, 1, 39916801, 25, 6, 121, 181, 1
Offset: 1

Views

Author

Gus Wiseman, May 18 2019

Keywords

Comments

Alternatively, if n = prime(i_1) * ... * prime(i_k), then a(n) is the numerator of 1/i_1! + ... + 1/i_k!.

Crossrefs

Programs

  • Mathematica
    Table[Total[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>k/PrimePi[p]!]],{n,100}]//Numerator
  • PARI
    A325704(n) = { my(f=factor(n)); numerator(sum(i=1,#f~,f[i, 2]/(primepi(f[i, 1])!))); }; \\ Antti Karttunen, Nov 17 2019

Formula

a(n) = A318573(A325709(n)).

A351532 Number of integer pairs (i, j), 0 < i, j < n, such that i/(n - i) + j/(n - j) = 1.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 2, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 5, 0, 0, 1, 2, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 2, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 5, 0, 0, 1, 0, 2, 1, 0, 2, 1, 0, 0, 3, 0, 0, 1, 0, 0, 7, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 0, 2, 3
Offset: 1

Views

Author

Lars Blomberg, Feb 14 2022

Keywords

Comments

By symmetry, if (i, j) is a solution then so is (j, i). When j=i we get n = 3i, corresponding to the solution 1/2 + 1/2 = 1. Therefore, when 3|n, a(n) > 0 and odd, otherwise a(n) >= 0 and even.
For n < 10^6, the largest term is a(720720) = 285, and 483188 terms are 0.
Other record terms: a(1081080) = 369, a(2162160) = 457, a(3243240) = 481, a(4324320) = 533, a(5405400) = 559, a(6126120) = 597. Record terms with index >= 360360 appear to occur at indices that are multiples of 180180. - Chai Wah Wu, Feb 15 2022

Examples

			For n = 3: (i, j) = (1, 1), so a(3) = 1. (1/2 + 1/2 = 1)
For n = 18: (i, j) = (3, 8), (6, 6), (8, 3), so a(18) = 3. (3/15 + 8/10 = 1/5 + 4/5 = 1)
For n = 20: (i, j) = (5, 8), (8, 5), so a(20) = 2.
For n = 36: (i, j) = (6, 16), (8, 15), (12, 12), (15, 8), (16, 6), so a(36) = 5.
		

Crossrefs

Programs

  • PARI
    a(n)={my(x=n^2, y=2*n); sum(i=1,(n-1)/2, x-=2*n; y-=3; if(x%y==0,1,0))}
    
  • Python
    from sympy.abc import i, j
    from sympy.solvers.diophantine.diophantine import diop_quadratic
    def A351532(n):
        return sum(1 for d in diop_quadratic(n**2+3*i*j-2*n*(i+j)) if 0 < d[0] < n and 0 < d[1] < n) # Chai Wah Wu, Feb 15 2022

Formula

The original equation can be solved for j giving j = (n(n - 2i)) / (2n - 3i). Varying i from 1 to n-1, a(n) is given by the number of integer values of j, 0 < j < n.

Extensions

Data section extended up to a(105) by Antti Karttunen, Jan 17 2025

A270599 Number of ways to express 1 as the sum of unit fractions with odd denominators such that the sum of those denominators is n.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Mar 26 2016

Keywords

Comments

Number of partitions of n into such odd parts that the sum of their reciprocals is one. - Antti Karttunen, Jul 23 2018
It would be nice to know whether nonzero values may occur only on n of the form 8k+1.

Examples

			1 = 1/3 + 1/3 + 1/3, the sum of denominators is 9, this is the only expression of 1 as unit fractions with odd denominators that sum to 9, so a(9)=1.
1 = 1/15 + 1/5 + 1/5 + 1/5 + 1/3 = 1/9 + 1/9 + 1/9 + 1/3 + 1/3 are the only solutions with odd denominators that sum to 33, thus a(33) = 2. - _Antti Karttunen_, Jul 24 2018
		

Crossrefs

Programs

  • Mathematica
    Array[Count[IntegerPartitions[#, All, Range[1, #, 2]], ?(Total[1/#] == 1 &)] &, 70] (* _Michael De Vlieger, Jul 26 2018 *)
  • PARI
    A270599(n,maxfrom=n,fracsum=0) = if(!n,(1==fracsum),my(s=0, tfs, k=(maxfrom-!(maxfrom%2))); while(k >= 1, tfs = fracsum + (1/k); if(tfs > 1, return(s), s += A270599(n-k,min(k,n-k),tfs)); k -= 2); (s)); \\ Antti Karttunen, Jul 23 2018
    
  • PARI
    \\ More verbose version for computing values of a(n) for large n:
    A270599(n) = if(!(n%2), 0, my(s=0); forstep(k = n, 1, -2, print("A270599(", n, ") at toplevel, k=", k, " s=", s); s += A270599aux(n-k, min(k, n-k), 1/k)); (s));
    A270599aux(n,maxfrom,fracsum) = if(!n,(1==fracsum),my(s=0, tfs, k=(maxfrom-!(maxfrom%2))); while(k >= 1, tfs = fracsum + (1/k); if(tfs > 1, return(s), s += A270599aux(n-k,min(k,n-k),tfs)); k -= 2); (s)); \\ Antti Karttunen, Jul 24 2018
  • Ruby
    def f(n)
      n - 1 + n % 2
    end
    def partition(n, min, max)
      return [[]] if n == 0
      [f(max), f(n)].min.step(min, -2).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def A270599(n)
      ary = [1]
      (2..n).each{|m|
        cnt = 0
        partition(m, 2, m).each{|ary|
          cnt += 1 if ary.inject(0){|s, i| s + 1 / i.to_r} == 1
        }
        ary << cnt
      }
      ary
    end
    

Formula

a(2*k) = 0. - David A. Corneth, Jul 24 2018

Extensions

Name corrected by Antti Karttunen, Jul 23 2018 at the suggestion of David A. Corneth

A316890 Heinz numbers of integer partitions into relatively prime parts whose reciprocal sum is 1.

Original entry on oeis.org

2, 195, 3185, 6475, 10527, 16401, 20445, 20535, 21045, 25365, 46155, 164255, 171941, 218855, 228085, 267883, 312785, 333925, 333935, 335405, 343735, 355355, 414295, 442975, 474513, 527425, 549575, 607475, 633777, 691041, 711321, 722425, 753865, 804837, 822783
Offset: 1

Views

Author

Gus Wiseman, Jul 16 2018

Keywords

Comments

The reciprocal sum of (y_1, ..., y_k) is 1/y_1 + ... + 1/y_k.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Includes 29888089, which is the first perfect power in the sequence and is absent from A316888.

Crossrefs

Programs

  • Mathematica
    Select[Range[2,100000],And[GCD@@PrimePi/@FactorInteger[#][[All,1]]==1,Sum[m[[2]]/PrimePi[m[[1]]],{m,FactorInteger[#]}]==1]&]

A316898 Number of integer partitions of n into relatively prime parts whose reciprocal sum is the reciprocal of an integer.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 4, 1, 3, 1, 1, 1, 3, 1, 8, 3, 1, 1, 9, 2, 11, 3, 3, 3, 5, 2, 7, 6, 4, 7, 12, 5, 14, 6, 11, 12, 25, 11, 27, 17, 15, 19, 25, 9, 37, 20, 21, 19, 31, 19, 38, 33, 26, 37, 38, 36, 64, 39, 46, 53, 63, 39, 80, 63, 65, 66, 94, 59, 105
Offset: 1

Views

Author

Gus Wiseman, Jul 16 2018

Keywords

Comments

The reciprocal sum of (y_1, ..., y_k) is 1/y_1 + ... + 1/y_k.
Records: 1, 2, 4, 8, 9, 11, 12, 14, 25, 27, 37, 38, 64, 80, 94, 105, 119, 154, 184, ..., . - Robert G. Wilson v, Jul 18 2018

Examples

			The a(37) = 8 partitions: (20,12,5), (15,12,10), (24,8,3,2), (15,10,6,6), (20,5,4,4,4), (15,10,6,3,3), (14,7,7,7,2), (10,10,10,5,2).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = 0, lmt = 1 + PartitionsP@ n}, While[k < lmt, s += Length[ Select[ IntegerPartitions[n, {k, k}], GCD @@ # == 1 && IntegerQ[1/Sum[1/m, {m, #}]] &]]; k++]; s]; Array[f, 50] (* slightly modified by Robert G. Wilson v, Jul 17 2018 *) (* or *)
    ric[n_,p_,s_] := If[n==0, If[IntegerQ[1/s] && GCD @@ p == 1, c++], Do[ If[s + 1/i <= 1, ric[n-i, Append[p, i], s + 1/i]], {i, Min[p[[-1]], n], 1, -1}]]; a[n_] := (c=0; Do[ric[n-j, {j}, 1/j], {j, n}]; c); Array[a, 50] (* Giovanni Resta, Jul 18 2018 *)

Extensions

a(51)-a(91) from Robert G. Wilson v, Jul 17 2018

A325703 If n = prime(i_1)^j_1 * ... * prime(i_k)^j_k, then a(n) is the denominator of the reciprocal factorial sum j_1/i_1! + ... + j_k/i_k!.

Original entry on oeis.org

1, 1, 2, 1, 6, 2, 24, 1, 1, 6, 120, 2, 720, 24, 3, 1, 5040, 1, 40320, 6, 24, 120, 362880, 2, 3, 720, 2, 24, 3628800, 3, 39916800, 1, 120, 5040, 24, 1, 479001600, 40320, 720, 6, 6227020800, 24, 87178291200, 120, 6, 362880, 1307674368000, 2, 12, 3, 5040, 720
Offset: 1

Views

Author

Gus Wiseman, May 18 2019

Keywords

Comments

Alternatively, if n = prime(i_1) * ... * prime(i_k), then a(n) is the denominator of 1/i_1! + ... + 1/i_k!.

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t;
        F:= ifactors(n)[2];
        denom(add(t[2]/numtheory:-pi(t[1])!,t=F))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 13 2024
  • Mathematica
    Table[Total[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>k/PrimePi[p]!]],{n,100}]//Denominator

Formula

a(n) = A318574(A325709(n)).

A339627 Number of partitions of n into distinct parts such that the sum of reciprocals of parts is an integer.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Dec 10 2020

Keywords

Comments

Also the number of ways to express an integer as the sum of distinct unit fractions such that the sum of the denominators is n.

Examples

			a(31) = 2 because we have 2 + 4 + 5 + 20 = 1 + 2 + 3 + 10 + 15 = 31 and 1/2 + 1/4 + 1/5 + 1/20 = 1, 1/1 + 1/2 + 1/3 + 1/10 + 1/15 = 2 are integers.
		

Crossrefs

A339628 Number of compositions (ordered partitions) of n into distinct parts such that the sum of reciprocals of parts is an integer.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 120, 0, 0, 0, 0, 24, 144, 144, 120, 0, 0, 0, 24, 240, 720, 0, 0, 0, 120, 720, 240, 1440, 0, 0, 0, 840, 5760, 720, 5160, 744, 240, 720, 1440, 10080, 720, 5760, 5160, 1560, 5760, 2280, 16560, 6000, 7560
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 10 2020

Keywords

Comments

Also the number of ordered ways to express an integer as the sum of distinct unit fractions such that the sum of the denominators is n.

Examples

			a(11) = 6 because we have 2 + 3 + 6 = 2 + 6 + 3 = 3 + 2 + 6 = 3 + 6 + 2 = 6 + 2 + 3 = 6 + 3 + 2 = 11 and 1/2 + 1/3 + 1/6 = 1 is an integer.
		

Crossrefs

A339629 Number of compositions (ordered partitions) of n into distinct parts such that the sum of reciprocals of parts is 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 24, 24, 24, 0, 0, 0, 0, 24, 120, 0, 0, 0, 0, 120, 0, 240, 0, 0, 0, 0, 840, 0, 720, 120, 24, 120, 0, 1440, 0, 720, 720, 120, 840, 0, 2280, 720, 960, 1080, 0, 840, 0, 11760, 0, 5040, 1440, 720
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 10 2020

Keywords

Comments

Also the number of ordered ways to express 1 as the sum of distinct unit fractions such that the sum of the denominators is n.

Examples

			a(11) = 6 because we have 2 + 3 + 6 = 2 + 6 + 3 = 3 + 2 + 6 = 3 + 6 + 2 = 6 + 2 + 3 = 6 + 3 + 2 = 11 and 1/2 + 1/3 + 1/6 = 1.
		

Crossrefs

A316113 a(n) is the least sum of a tuple containing n as an element where the denominator of the sum of reciprocals isn't divisible by any of the prime factors of n.

Original entry on oeis.org

1, 4, 9, 10, 20, 11, 35, 22, 30, 22, 66, 22, 91, 37, 28, 46, 119, 32, 152, 31, 41, 68, 184, 37, 110, 106, 93, 53, 261, 51, 279, 94, 69, 121, 59, 60, 370, 192, 97, 64, 451, 54, 430, 94, 65, 186, 517, 74, 259, 112, 122, 97, 583, 95, 92, 92, 158, 263, 767, 77, 671
Offset: 1

Views

Author

David A. Corneth, Jul 22 2018

Keywords

Examples

			a(12) = 22 because the tuple [3, 3, 4, 12] has the sum of reciprocals 1/3 + 1/3 + 1/4 + 1/12 = 1 of which the denominator is 1 and has no common prime factors with n = 12.
a(25) = 110 because the tuple [5, 5, 25, 25, 50] has the sum of reciprocals 1/5 + 1/5 + 1/25 + 1/25 + 1/50 = 1/2 of which the denominator is 2 and has no common prime factors with n = 25.
		

Crossrefs

Extensions

More terms from Ray Chandler, Oct 02 2018
Previous Showing 21-30 of 43 results. Next