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

A277070 Row length of A276380(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 3, 2, 3, 3, 1, 2, 2, 2, 2
Offset: 1

Views

Author

Michael De Vlieger, Sep 27 2016

Keywords

Comments

a(n) represents the partition size generated by greedy algorithm at A276380(n) such that all parts k are unique and in A003586.
See A276380 for further comments about the greedy algorithm.
Row n = 1 for n that are in A003586.
A237442(n) represents the smallest possible partition size such that all k are distinct and in A003586. The reference defines the "canonic" representation of n in the "dual-base number system", i.e., base(2,3), essentially as those which have length A237442(n).
a(n) differs from A237442(n) at n = 41, 43, 59, 86, 88, 91, 113, 118, 123, 135, 155, 172, 176, 177, 182, 185, 209, 215, 226, 236, 239, 248, ... (i.e., A277071).

Examples

			a(n) Terms k in row n of A276380:
1    1
1    2
1    3
1    4
2    1,4
1    6
2    1,6
1    8
1    9
2    1,9
2    2,9
1    12
2    1,12
2    2,12
2    3,12
1    16
2    1,16
1    18
2    1,18
2    2,18
2    3,18
2    4,18
3    1,4,18
...
a(41) = 3 since A276380(41) = {1,4,36}, but {9,32} is the shortest possible partition of 41 such that all terms are distinct and in A003586.
a(88) = 3 since A276380(88) = {1,6,81}, but {16,72} and {24,64} are shorter and have A237442(88) = 2 terms.
		

References

  • V. Dimitrov, G. Jullien, and R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39.

Crossrefs

Programs

  • Mathematica
    Table[Length@ DeleteCases[Append[Abs@ Differences@ #, Last@ #], k_ /; k == 0] &@ NestWhileList[# - SelectFirst[# - Range[0, # - 1], Block[{m = #, n = 6}, While[And[m != 1, ! CoprimeQ[m, n]], n = GCD[m, n]; m = m/n]; m == 1] &] &, n, # > 1 &], {n, 100}]
  • Python
    from itertools import count, takewhile
    N = 100
    def B(p): return list(takewhile(lambda x: x<=N, (p**i for i in count(0))))
    B23set = set(b*t for b in B(2) for t in B(3) if b*t <= N)
    B23lst = sorted(B23set, reverse=True)
    def a(n):
        if n in B23set: return 1
        big = next(t for t in B23lst if t <= n)
        return a(n - big) + 1
    print([a(n) for n in range(1, N+1)]) # Michael S. Branicky, Sep 14 2022

A237442 a(n) is the least number of 3-smooth numbers that add up to n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 1, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Lei Zhou, Feb 07 2014

Keywords

Comments

Any number can be written as the sum of several 3-smooth numbers. The 3-smooth numbers themselves are the sum of 1 3-smooth number. Others will need more. Any number n could be written as the sum of n ones (the smallest 3-smooth number), which takes the greatest number of 3-smooth numbers. This sequence gives the minimum number of 3-smooth numbers that is needed to add up to n.
The index of first appearance of n in this sequence: 1, 5, 23, 431, ... . The first four terms are also 2-1, 3*2-1, 3*2^3-1, 3^3*2^4-1 respectively.
The smallest numbers which require 5 and 6 addends are 18431 and 3448733, respectively. - Giovanni Resta, Feb 09 2014
From Michael De Vlieger, Sep 30 2016: (Start)
Length of shortest partition of n such all elements are unique and in A003586.
Also a "canonic" representation of n in a dual-base number system (i.e., base(2,3)), as defined by the reference as having the lowest number of terms. The greedy algorithm defined in A276380 does not always render the canonic representation. a(41) = {1,4,36}, but {9,32} is the shortest possible partition of 41 such that all terms are in A003586. (End)

Examples

			n = 23, 23 is not 3-smooth. We have 23 = 1+22 = 2+21 = ... = 11+12.  None of the 11 pairs are both 3-smooth. However, we can find 23 = 1+4+18, a sum of three 3-smooth numbers. So a(23) = 3.
a(7) = 2 since the shortest partition of 7 such that all the terms are in A003586 and none are repeated is {4,3}. - _Michael De Vlieger_, Sep 30 2016
		

References

  • V. Dimitrov, G. Jullien, and R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39.

Crossrefs

Programs

  • Mathematica
    SplitN[m_, mt_, a_, s_, aa_, ss_] := Block[{i, j, f, g, a0, s0, a1 = aa, s1 = ss, a2, s2, found = 0}, i = mt + 1; While[i--; (found == 0) && (i >= (m/3)), a0 = a; If[f = FactorInteger[i]; f[[Length[f], 1]] <= 3, j = m - i; s0 = s; If[g = FactorInteger[j]; g[[Length[g], 1]] <= 3, If[i >= j, a0++; AppendTo[s0, i]; If[j > 0, a0++; AppendTo[s0, j]]; If[ar > a0, ar = a0; If[a1 > a0, a1 = a0; s1 = s0]; found = 1]], a0++; AppendTo[s0, i]; If[ar > a0, {a2, s2} = SplitN[j, Min[i, j], a0, s0, a1, s1]; If[a1 > a2, a1 = a2; s1 = s2]]]]]; {a1, s1}]; (*This finds the shortest 3-smooth train in decreasing order that sums to n*) Table[ar = n; {ac, sc} = SplitN[n, n, 0, {}, n, {}]; ac, {n, 1, 87}]
    a[n_] := Block[{p = Select[Range@n, FactorInteger[#][[-1, 1]] < 4 &], k = 1},
    While[{} == Quiet@ IntegerPartitions[n, {k}, p, 1], k++]; k]; Array[a, 100] (* faster, Giovanni Resta, Feb 09 2014 *)
  • PARI
    A237442(n)={n+9>#M237442 && M237442=Vec(M237442,n+999); if(M237442[n], M237442[n], vecmax(factor(n)[,1]) < 5, M237442[n]=1, my(m=99, k=n\2); until(m==2||!k--, m=min(A237442(k)+A237442(n-k),m)); M237442[n]=m)} \\ M. F. Hasler, Sep 14 2022

A277071 Numbers n for which A277070(n) does not equal A237442(n).

Original entry on oeis.org

41, 43, 59, 86, 88, 91, 113, 118, 123, 135, 155, 172, 176, 177, 182, 185, 209, 215, 226, 236, 239, 248, 261, 267, 270, 273, 275, 279, 307, 310, 311, 337, 339, 344, 347, 352, 354, 364, 365, 367, 369, 370, 371, 377, 383, 405, 407, 418, 425, 427, 430, 452, 455, 465, 472, 473, 475, 478, 479, 496, 499
Offset: 1

Views

Author

Michael De Vlieger, Sep 27 2016

Keywords

Comments

These are numbers n for which the greedy algorithm A276380(n) produces a partition of n with more than A237442(n) terms that are all unique and in A003586.
A276380(n) = A237442(n) if n is in A003586. There may be more than one partition of n that has terms that are unique and in A003586. The first n in a(n) with that quality is n = 88.
A277070(n)-A237442(n) = 1 at {41, 43, 59, 86, 88, 91, 113, 118, ...}
A277070(n)-A237442(n) = 2 at {279, 371, 558, 837, 1116, 1240, 1267, ...}
A277070(n)-A237442(n) = 3 at {2777, 5554, ...}

Examples

			41 is in the sequence because A276380(41) = {1,4,36}, thus A277070(41) = 3, but A237442(41) = 2. The partition of 41 with unique terms that are all in A003586 is {9,32}.
88 is in the sequence because A276380(88) = {1,6,81}, thus A277070(88) = 3, but A237442(41) = 2. There are 2 partitions of 88 with unique terms that are all in A003586: {16,72} and {24,64}.
		

References

  • V. Dimitrov, G. Jullien, R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ DeleteCases[Append[Abs@ Differences@ #, Last@ #], k_ /; k == 0] &@ NestWhileList[# - SelectFirst[# - Range[0, # - 1], Module[{a = #, b = 6}, While[And[a != 1, ! CoprimeQ[a, b]], b = GCD[a, b]; a = a/b]; a == 1] &] &, n, # > 1 &]; g[n_] := Block[{p = Select[Range@ n, FactorInteger[#][[-1, 1]] < 4 &], k = 1}, While[{} == Quiet@ IntegerPartitions[n, {k}, p, 1], k++]; k]; Select[Range@ 500, f@ # != g@ # &] (* function g after Giovanni Resta at A237442 *)

A347860 Irregular triangle T(n,k) where row n is the partition of n with the least number of 3-smooth parts such that the product of parts is minimal.

Original entry on oeis.org

1, 2, 3, 4, 4, 1, 6, 6, 1, 8, 9, 9, 1, 9, 2, 12, 12, 1, 12, 2, 12, 3, 16, 16, 1, 18, 18, 1, 18, 2, 18, 3, 18, 4, 18, 4, 1, 24, 24, 1, 24, 2, 27, 27, 1, 27, 2, 27, 3, 27, 4, 32, 32, 1, 32, 2, 32, 3, 36, 36, 1, 36, 2, 36, 3, 36, 4, 32, 9, 36, 6, 27, 16, 36, 8, 36, 9
Offset: 1

Views

Author

Michael De Vlieger, Feb 23 2022

Keywords

Comments

Let k = 2^a * 3^b be a part such that n is the sum of at least one such k. Then we may represent k at (a,b) on a Cartesian grid. In Dimitrov, et al., these k are known as "digits" in a 2-dimensional number base system. Since these partitions have the least number of parts (digits) in order to represent n, in Dimitrov this is called a "canonic form" for n in base (2,3).
These numbers represent an extreme representation where the digits tend to be spread farthest apart in the plot described above.
Additionally, this canonic representation of n is often identical to the greedy representation of n shown by row n in A276380.

Examples

			Triangle begins:
   1;
   2;
   3;
   4;
   4, 1;   (product smaller than (3,2))
   6;
   6, 1;   (product smaller than (4,3))
   8;
   9;
   9, 1;   (product least of {(9,1), (8,2), (6,4)})
   9, 2;   (product smaller than (8,3))
  12;
  ...
		

References

  • Vassil Dimitrov, Graham Jullien, and Roberto Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press (2012), 35-39.

Crossrefs

Programs

  • Mathematica
    nn = 45; ss = Union@ Flatten@ Table[2^a*3^b, {a, 0, Log2[nn]}, {b, 0, Log[3, nn/(2^a)]}]; Table[Block[{k = 1, w, t = TakeWhile[ss, # <= n &]}, While[{} == Set[w, IntegerPartitions[n, {k}, t]], k++]; MinimalBy[w, Times @@ # &][[1]]], {n, nn}] // Flatten

Formula

A237442(n) = length of row n.

A348599 Irregular triangle T(n,k) where row n is the partition of n with the least number of 3-smooth parts such that the product of parts is maximal.

Original entry on oeis.org

1, 2, 3, 4, 3, 2, 6, 4, 3, 8, 9, 6, 4, 8, 3, 12, 9, 4, 8, 6, 9, 6, 16, 9, 8, 18, 16, 3, 12, 8, 12, 9, 16, 6, 9, 8, 6, 24, 16, 9, 18, 8, 27, 16, 12, 27, 2, 18, 12, 27, 4, 32, 24, 9, 18, 16, 27, 8, 36, 36, 1, 32, 6, 27, 12, 24, 16, 32, 9, 24, 18, 27, 16, 32, 12, 27, 18
Offset: 1

Views

Author

Michael De Vlieger, Feb 23 2022

Keywords

Comments

Let k = 2^a * 3^b be a part such that n is the sum of at least one such k. Then we may represent k at (a,b) on a Cartesian grid. In Dimitrov, et al., these k are known as "digits" in a 2-dimensional number base system. Since these partitions have the least number of parts (digits) in order to represent n, in Dimitrov this is called a "canonic form" for n in base (2,3).
These numbers represent an extreme representation where the digits tend to be placed close together.

Examples

			Triangle begins:
   1;
   2;
   3;
   4;
   3, 2;    (product larger than (4,1))
   6;
   4, 3;    (product larger than (6,1))
   8;
   9;
   6, 4;    (product greatest of {(9,1), (8,2), (6,4)})
   8, 3;    (product larger than (9,2))
  12;
  ...
		

References

  • Vassil Dimitrov, Graham Jullien, and Roberto Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press (2012), 35-39.

Crossrefs

Programs

  • Mathematica
    nn = 45; ss = Union@ Flatten@ Table[2^a*3^b, {a, 0, Log2[nn]}, {b, 0, Log[3, nn/(2^a)]}]; Table[Block[{k = 1, w, t = TakeWhile[ss, # <= n &]}, While[{} == Set[w, IntegerPartitions[n, {k}, t]], k++]; MaximalBy[w, Times @@ # &][[1]]], {n, nn}] // Flatten

Formula

A237442(n) = length of row n.

A277045 Irregular triangle T(n,k) read by rows giving the number of partitions of length k such that all of the members of the partition are distinct and in A003586.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Sep 27 2016

Keywords

Comments

If n is in A003586, then T(n,1) = 1, else T(n,1) = 0.
T(n,k) also is the number of ways of representing n involving k 1's in the base(2,3) or "dual-base number system" (i.e., base(2,3)).
The number of "canonic" representations of n in a dual-base number system as defined by the reference as having the lowest number of terms, appears in the first column of the triangle with a value greater than 0.
A237442(n) = the least k with a nonzero value.

Examples

			Triangle starts:
1
1
1,1
1,1
0,2
1,1,1
0,2,1
1,1,1
1,2,2
0,3,1,1
0,2,3
1,2,3,1
0,2,4,1
0,2,3,2
0,2,4,3
1,1,4,2,1
0,2,4,3
1,2,4,4,1
0,2,5,4,1
0,3,3,5,1
...
Row n = 10 has terms {0,3,1,1} because 10 is not in A003586 thus k = 1 has value 0. The partitions of 10 that have distinct members that are in A003586 are {{1,9},{2,8},{4,6},{1,3,6},{1,2,3,4}}, thus there are 3 partitions of length k = 2, 1 of length k = 3, and 1 with k = 4. A237442(10) = 2.
		

References

  • V. Dimitrov, G. Jullien, R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39.

Crossrefs

Programs

  • Mathematica
    nn = 6^6; t = Sort@ Select[Flatten@ KroneckerProduct[2^Range[0, Ceiling@ Log2@ nn], 3^Range[0, Ceiling@ Log[3, nn]]], # <= nn &]; Table[BinCounts[#, {1, Max@ # + 1, 1}] &@ Map[Length, #] &@ Select[Subsets@ TakeWhile[t, # <= n &], Total@ # == n &], {n, 40}]
Showing 1-6 of 6 results.