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

A183003 a(n) = A183002(n)/2.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 7, 7, 8, 9, 11, 11, 13, 13, 15, 16, 17, 17, 20, 21, 22, 23, 25, 25, 28, 28, 30, 31, 32, 33, 37, 37, 38, 39, 42, 42, 45, 45, 47, 49, 50, 50, 54, 55, 57, 58, 60, 60, 63, 64, 67, 68, 69, 69, 74, 74, 75, 77, 80, 81, 84, 84, 86, 87, 90, 90, 95, 95, 96, 98, 100, 101, 104, 104, 108, 110, 111, 111, 116, 117, 118, 119, 122, 122, 127, 128, 130, 131, 132, 133, 138, 138, 140, 142, 146
Offset: 1

Views

Author

Omar E. Pol, Jan 27 2011

Keywords

Comments

For n >= 2, a(n) is the number of partitions of n-1 into 3 parts such that the largest part is greater than or equal to the product of the other two. For example, a(9) = 4 since the partitions for 8 would be 1+1+6 = 1+2+5 = 1+3+4 = 2+2+4, but not 2+3+3 since 2*3 > 3. - Wesley Ivan Hurt, Jan 03 2022
Conjecture: partial sums of A072670. - Sean A. Irvine, Jul 14 2022

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[d = DivisorSigma[0, n]; If[OddQ[d], d - 1, d - 2], {n, 100}]]/2
  • PARI
    a(n) = sum(k=1, n, numdiv(k) - 2 + numdiv(k)%2)/2; \\ Michel Marcus, Jan 04 2022

Formula

a(n) = Sum_{k=1..floor((n-1)/3)} Sum_{i=k..floor((n-k-1)/2)} sign(floor((n-i-k-1)/(i*k))). - Wesley Ivan Hurt, Jan 03 2022
a(n) = (1/2) * Sum_{k=1..n} (tau(k)-2 + (tau(k) mod 2)), tau = A000005. - Alois P. Heinz, Jan 04 2022
a(n) ~ n * (log(n) + 2*gamma - 3) / 2, where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 19 2024

A243223 Number of partitions of n into positive summands in arithmetic progression with common difference 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This sequence gives the number of ways to write n as n = a + a+3 + ... + a+3r = (r+1)(2a+3r)/2, with a and r integers > 0.

Examples

			a(15) = 2 because 15 = 6 + 9 = 2 + 5 + 8.
		

Crossrefs

Cf. A072670 (same with common differences = 2).
A243225 gives the integers n that are not such sums for which a(n) = 0.

Formula

a(n) = d1(n) - 1 - f(n) with d1(n) = number of odd divisors of n (A001227) and f(n) = the number of those odd divisors d of n such that d > 1 and d(1+d/3)/2 <= n <= 3d(d-1)/2. f(n) is in A243224.

A347709 Number of distinct rational numbers of the form x * z / y for some factorization x * y * z = n, 1 < x <= y <= z.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 14 2021

Keywords

Comments

This is also the number of distinct possible alternating products of length-3 factorizations of n, where we define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)), and where a factorization of n is a weakly increasing sequence of positive integers > 1 with product n.

Examples

			Representative factorizations for each of the a(360) = 9 alternating products:
   (2,2,90) -> 90
   (2,3,60) -> 40
   (2,4,45) -> 45/2
   (2,5,36) -> 72/5
   (2,6,30) -> 10
   (2,9,20) -> 40/9
  (2,10,18) -> 18/5
  (2,12,15) -> 5/2
   (3,8,15) -> 45/8
		

Crossrefs

Allowing factorizations of any length <= 3 gives A033273.
Positions of positive terms are A033942.
Positions of 0's are A037143.
The length-2 version is A072670.
Allowing any length gives A347460, reverse A038548.
Allowing any odd length gives A347708.
A001055 counts factorizations (strict A045778, ordered A074206).
A122179 counts length-3 factorizations.
A292886 counts knapsack factorizations, by sum A293627.
A301957 counts distinct subset-products of prime indices.
A304792 counts distinct subset-sums of partitions, positive A276024.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[altprod/@Select[facs[n],Length[#]==3&]]],{n,100}]
  • PARI
    A347709(n) = { my(rats=List([])); fordiv(n,z,my(yx=n/z); fordiv(yx, y, my(x = yx/y); if((y <= z) && (x <= y) && (x > 1), listput(rats,x*z/y)))); #Set(rats); }; \\ Antti Karttunen, Jan 29 2025

Extensions

More terms from Antti Karttunen, Jan 29 2025

A334739 Number of unordered factorizations of n with 2 different parts > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 3, 0, 1, 1, 2, 0, 3, 0, 3, 1, 1, 0, 5, 0, 1, 1, 3, 0, 3, 0, 5, 1, 1, 1, 6, 0, 1, 1, 5, 0, 3, 0, 3, 3, 1, 0, 8, 0, 3, 1, 3, 0, 5, 1, 5, 1, 1, 0, 6, 0, 1, 3, 6, 1, 3, 0, 3, 1, 3, 0, 10, 0, 1, 3, 3, 1, 3, 0, 8, 2, 1, 0, 6, 1, 1, 1, 5, 0, 6, 1, 3, 1, 1, 1, 10, 0, 3, 3, 6
Offset: 1

Views

Author

Jacob Sprittulla, May 09 2020

Keywords

Comments

a(n) depends only on the prime signature of n. E.g., a(12)=a(75), since 12=2^2*3 and 75=5^2*3 share the same prime signature (2,1).

Examples

			a(24) = 5 = #{ (12,2), (6,4), (8,3), (6,2,2), (3,2,2,2) }.
		

Crossrefs

Cf. A334740 (3 different parts), A072670 (2 parts), A122179 (3 parts), A211159 (2 distinct parts), A122180 (3 distinct parts), A001055, A045778.

Programs

  • R
    maxe  <- function(n,d)  { i=0; while( n%%(d^(i+1))==0 )  { i=i+1 }; i }
    uhRec <- function(n,l=1)  {
      uh = 0
      if( n<=0 ) {
        return(0)
      } else if(n==1) {
        return(ifelse(l==0,1,0))
      } else if(l<=0) {
        return(0)
      } else if( (n>=2) && (l>=1) )  {
        for(d in 2:n)  {
          m = maxe(n,d)
          if(m>=1)  for(i in 1:m)  for(j in 1:min(i,l))   {
            uhj = uhRec( n/d^i, l-j )
            uh  = uh +  log(d)/log(n) * (-1)^(j+1) * choose(i,j) * uhj
          }
        }
        return(round(uh,3))
      }
    }
    n=100; l=2; sapply(1:n,uhRec,l)    # A334739
    n=100; l=3; sapply(1:n,uhRec,l)    # A334740

Formula

(Joint) D.g.f.: Product_{n>=2} ( 1 + t/(n^s-1) ).
Recursion: a(n) = h_2(n), where h_l(n) * log(n) = Sum_{ d^i | n } Sum_{j=1..l} (-1)^(j+1) * h_{l-j}(n/d^i) * log(d), with h_l(n)=1 if n=1 and l=0 otherwise h_l(n)=0.

A334740 Number of unordered factorizations of n with 3 different parts > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 8, 0, 0, 0, 1
Offset: 1

Views

Author

Jacob Sprittulla, May 09 2020

Keywords

Comments

a(n) depends only on the prime signature of n. E.g. a(12)=a(75), since 12=2^2*3 and 75=5^2*3 share the same prime signature (2,1).

Examples

			a(48) = 3 = #{ (6,4,2), (8,3,2), (4,3,2,2) }.
		

Crossrefs

Cf. A334739 (2 different parts), A072670 (2 parts), A122179 (3 parts), A211159 (2 distinct parts), A122180 (3 distinct parts), A001055, A045778

Programs

  • R
    maxe  <- function(n, d)  { i=0; while( n%%(d^(i+1))==0 )  { i=i+1 }; i }
    uhRec <- function(n, l=1)  {
      uh = 0
      if( n<=0 ) {
        return(0)
      } else if(n==1) {
        return(ifelse(l==0, 1, 0))
      } else if(l<=0) {
        return(0)
      } else if( (n>=2) && (l>=1) )  {
        for(d in 2:n)  {
          m = maxe(n, d)
          if(m>=1)  for(i in 1:m)  for(j in 1:min(i, l))   {
            uhj = uhRec( n/d^i, l-j )
            uh  = uh +  log(d)/log(n) * (-1)^(j+1) * choose(i, j) * uhj
          }
        }
        return(round(uh, 3))
      }
    }
    n=100; l=2; sapply(1:n, uhRec, l)    # A334739
    n=100; l=3; sapply(1:n, uhRec, l)    # A334740

A350497 Sum of the largest parts in all the partitions of n into 3 parts whose largest part is greater than or equal to the product of the other two.

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 7, 12, 19, 27, 32, 48, 55, 68, 84, 109, 120, 149, 162, 196, 223, 249, 266, 323, 359, 392, 430, 484, 509, 586, 614, 678, 728, 775, 831, 952, 989, 1044, 1106, 1219, 1261, 1379, 1424, 1520, 1627, 1698, 1748, 1919, 2009, 2124, 2213, 2332, 2392, 2552, 2655, 2827
Offset: 0

Views

Author

Wesley Ivan Hurt, Jan 03 2022

Keywords

Examples

			a(7) = 12 since we have 7 = 1+1+5 = 1+2+4 = 1+3+3, and the sum of the largest parts in each partition is 5+4+3 = 12. The partition 2+2+3 is not included since 2*2 > 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(n - i - k) Sign[Floor[(n - i - k)/(i*k)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
    Table[Total[Select[IntegerPartitions[n,{3}],#[[1]]>=Times@@Rest[#]&][[All,1]]],{n,0,60}] (* Harvey P. Dale, Aug 22 2022 *)
  • PARI
    first(n) = my(res=vector(n, i, [0, 0])); for(i = 1, n\2, for(j = i, n\i, c = i + j + i * j; if(c <= n, res[c][1]++; res[c][2] += i*j))); forstep(i = n, 1, -1, for(j = i + 1, n, res[j][2] += ((j-i) * res[i][1] + res[i][2]))); concat(0, vector(#res, i, res[i][2])) \\ David A. Corneth, Jan 07 2022

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((n-i-k)/(i*k))) * (n-i-k).

Extensions

a(0) = 0 prepended by David A. Corneth, Jan 09 2022

A350534 Sum of the largest parts of the partitions of n into 3 parts whose largest part is equal to the product of the other two.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 4, 4, 0, 11, 0, 6, 8, 16, 0, 18, 0, 21, 12, 10, 0, 40, 16, 12, 16, 31, 0, 52, 0, 36, 20, 16, 24, 88, 0, 18, 24, 74, 0, 76, 0, 51, 60, 22, 0, 121, 36, 60, 32, 61, 0, 100, 40, 108, 36, 28, 0, 198, 0, 30, 88, 125, 48, 124, 0, 81, 44, 140, 0, 243, 0, 36, 104
Offset: 0

Views

Author

Wesley Ivan Hurt, Jan 04 2022

Keywords

Examples

			a(13) = 6 since we have 13 = 1+6+6, whose largest part is 6. Partitions not counted: 1+1+11, 1+2+10, 1+3+9, 1+4+8, 1+5+7, 2+2+9, 2+3+8, 2+4+7, 2+5+6, 3+3+7, 3+4+6, 3+5+5, 4+4+5.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(n - i - k) KroneckerDelta[(n - i - k), (i*k)], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 0, 100}]
  • PARI
    first(n) = {my(res = vector(n)); for(i = 1, n \ 2, for(j = i, n\i, c = i + j + i*j; if(c <= n, res[c] += i*j))); concat(0, res)} \\ David A. Corneth, Jan 07 2022

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} [n-i-k = i*k] * (n-i-k), where [ ] is the Iverson bracket.

A172292 Triangle read by rows: T(n, k) = (2*n+1)*(2*k+1), n>=1, 1<=k<=n.

Original entry on oeis.org

9, 15, 25, 21, 35, 49, 27, 45, 63, 81, 33, 55, 77, 99, 121, 39, 65, 91, 117, 143, 169, 45, 75, 105, 135, 165, 195, 225, 51, 85, 119, 153, 187, 221, 255, 289, 57, 95, 133, 171, 209, 247, 285, 323, 361, 63, 105, 147, 189, 231, 273, 315, 357, 399, 441, 69, 115, 161
Offset: 1

Views

Author

Vincenzo Librandi, Nov 24 2010

Keywords

Comments

A number m belongs to this sequence if and only if it is odd and composite.
First column: A016945(n, n>=1), second column: A017329(n, n>=2), third column: A147587(n, n>=3). - Vincenzo Librandi, Nov 20 2012
The number of occurrences of m corresponds to the number of nontrivial factorizations of m, i.e., A072670(m-1). - Daniel Forgues, Apr 22 2014

Examples

			Triangle begins:
9;
15, 25;
21, 35,  49;
27, 45,  63,  81;
33, 55,  77,  99,  121;
39, 65,  91,  117, 143, 169;
45, 75,  105, 135, 165, 195, 225;
51, 85,  119, 153, 187, 221, 255, 289;
57, 95,  133, 171, 209, 247, 285, 323, 361;
63, 105, 147, 189, 231, 273, 315, 357, 399, 441; etc.
Number of occurrences:
  63 = 9*7 = 21*3 has two nontrivial factorizations, thus occurs twice.
		

Crossrefs

Programs

  • Magma
    [4*n*k + 2*n + 2*k + 1: k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 20 2012
  • Mathematica
    t[n_,k_]:= 4 n*k + 2n + 2k + 1; Table[t[n, k], {n,15}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 20 2012 *)

Formula

T(n, k) = A144562(n,k)*2+3 read by rows. (Was old name.)
T(n, k) = 2*A083487(n, k)+1. - Daniel Forgues, Sep 20 2011

A235726 Lexicographically earliest sequence of positive integers such that a(nm) != a(n + m) for all positive integers n and m such that nm != n + m.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Apr 18 2017

Keywords

Comments

a(n) != a(n-1) because a(n*1) = a((n-1)+1).
Records appear at: a(1) = 1, a(2) = 2, a(8) = 3, a(16) = 4, a(64) = 5, a(1024) = 6, a(4080) = 7, a(320000) = 8.
From Robert Israel, Apr 19 2017: (Start)
a(n) = 1 iff n is odd.
If n == 2 (mod 4), then a(n) = 2.
(End)

Examples

			For n = 8,
a(8) != 1 because a(1 + 7) != a(1 * 7);
a(8) != 2 because a(2 * 4) != a(2 + 4);
a(8) = 3.
		

Crossrefs

Cf. A072670.

Programs

  • Haskell
    a 1 = 1
    a 4 = 2
    a n = head $ filter (`notElem` disallowedValues) [1..] where
      disallowedValues = map a $ (n-1) : filter ( n `mod` d == 0) [1..n]
          divisorSum d = d + n `div` d
  • Maple
    N:= 100: # to get a(1) to a(N)
    A[1]:= 1: A[2]:= 2: A[3]:= 1: A[4]:= 2:
    for n from 5 to N do
       if n::odd then A[n]:= 1
       else
         A[n]:= min({$2..n} minus {seq(A[q+n/q], q=numtheory:-divisors(n) minus {1,n})});
       fi
    od:
    seq(A[i],i=1..N); # Robert Israel, Apr 19 2017
Previous Showing 21-29 of 29 results.