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 31-40 of 86 results. Next

A246081 Paradigm shift sequence for (0,3) production scheme with replacement.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 21, 24, 27, 30, 33, 36, 42, 48, 54, 63, 72, 81, 90, 99, 108, 126, 144, 162, 189, 216, 243, 270, 297, 324, 378, 432, 486, 567, 648, 729, 810, 891, 972, 1134, 1296, 1458, 1701, 1944, 2187, 2430, 2673, 2916, 3402, 3888, 4374, 5103, 5832, 6561, 7290, 8019, 8748
Offset: 1

Views

Author

Jonathan T. Rowell, Aug 13 2014

Keywords

Comments

This sequence is the solution to the following problem: "Suppose you have the choice of using one of three production options: apply a simple incremental action, bundle existing output as an integrated product (which requires p=0 steps), or implement the current bundled action (which requires q=3 steps). The first use of a novel bundle erases (or makes obsolete) all prior actions. How large an output can be generated in n time steps?"
1. A production scheme with replacement R(p,q) eliminates existing output following a bundling action, while an additive scheme A(p,q) retains the output. The schemes correspond according to A(p,q)=R(p-q,q), with the replacement scheme serving as the default presentation.
2. This problem is structurally similar to the Copy and Paste Keyboard problem: Existing sequences (A178715 and A193286) should be regarded as Paradigm-Shift Sequences with production schemes R(1,1) and R(2,1) with replacement, respectively.
3. The ideal number of implementations per bundle, as measured by the geometric growth rate (p+zq root of z), is z = 3.
4. All solutions will be of the form a(n) = (qm+r) * m^b * (m+1)^d.
5. For large n, the sequence is recursively defined.

Crossrefs

Paradigm shift sequences with q=3: A029747, A029750, A246077, A246081, A246085, A246089, A246093, A246097, A246101.
Paradigm shift sequences with p=0: A000792, A246080, A246081, A246082, A246083.

Programs

  • PARI
    Vec(x*(1+x+x^2)^2 * (1-x+x^3) * (1+x+x^2+2*x^3+x^4+x^6) / (1-3*x^9) + O(x^100)) \\ Colin Barker, Nov 19 2016

Formula

a(n) = (qd+r) * d^(C-R) * (d+1)^R, where r = (n-Cp) mod q, Q = floor( (R-Cp)/q ), R = Q mod (C+1), and d = floor (Q/(C+1) ).
a(n) = 3*a(n-9) for all n >= 15.
G.f.: x*(1+x+x^2)^2 * (1-x+x^3) * (1+x+x^2+2*x^3+x^4+x^6) / (1-3*x^9). - Colin Barker, Nov 19 2016

A319909 Number of distinct positive integers that can be obtained by iteratively adding any two or multiplying any two non-1 parts of an integer partition until only one part remains, starting with 1^n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 4, 5, 10, 15, 21, 34, 49, 68, 101, 142, 197, 280, 387, 538, 751, 1045, 1442, 2010, 2772, 3865, 5339, 7396, 10273, 14201, 19693
Offset: 0

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Examples

			We have
   7 = 1+1+1+1+1+1+1,
   8 = (1+1)*(1+1+1)+1+1,
   9 = (1+1)*(1+1)*(1+1)+1,
  10 = (1+1+1+1+1)*(1+1),
  12 = (1+1+1)*(1+1+1+1),
so a(7) = 5.
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    mexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_?(#>1&),mie___,y_?(#>1&),afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Length[mexos[Table[1,{n}]]],{n,30}]

A118851 Product of parts in n-th partition in Abramowitz and Stegun order.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 4, 3, 4, 2, 1, 5, 4, 6, 3, 4, 2, 1, 6, 5, 8, 9, 4, 6, 8, 3, 4, 2, 1, 7, 6, 10, 12, 5, 8, 9, 12, 4, 6, 8, 3, 4, 2, 1, 8, 7, 12, 15, 16, 6, 10, 12, 16, 18, 5, 8, 9, 12, 16, 4, 6, 8, 3, 4, 2, 1, 9, 8, 14, 18, 20, 7, 12, 15, 16, 20, 24, 27, 6, 10, 12, 16, 18, 24, 5, 8, 9, 12, 16, 4
Offset: 0

Views

Author

Alford Arnold, May 01 2006

Keywords

Comments

Let Theta(n) denote the set of norm values corresponding to all the partitions of n. The following results hold regarding this set: (i) Theta(n) is a subset of Theta(n+1); (ii) A prime p will appear as a norm only for partitions of n>=p; (iii) There exists a prime p not in Theta(n) for all n>=6; (iv) Let h(k) be the prime floor function which gives the greatest prime less than or equal to the k, then the prime p=h(n+1) does not belong to Theta(n); and (v) The primes not in the set Theta(n) are A000720(A000792(n)) - A000720(n). - Abhimanyu Kumar, Nov 25 2020

Examples

			a(9) = 4 because the 9th partition is [2,2] and 2*2 = 4.
Table T(n,k) starts:
  1;
  1;
  2, 1;
  3, 2,  1;
  4, 3,  4,  2,  1;
  5, 4,  6,  3,  4, 2,  1;
  6, 5,  8,  9,  4, 6,  8,  3,  4,  2, 1;
  7, 6, 10, 12,  5, 8,  9, 12,  4,  6, 8, 3, 4,  2,  1;
  8, 7, 12, 15, 16, 6, 10, 12, 16, 18, 5, 8, 9, 12, 16, 4, 6, 8, 3, 4, 2, 1;
		

References

  • Abramowitz and Stegun, Handbook (1964) page 831.

Crossrefs

Cf. A000041 (row lengths), A006906 (row sums).

Programs

  • PARI
    C(sig)={vecprod(sig)}
    Row(n)={apply(C, [Vecrev(p) | p<-partitions(n)])}
    { for(n=0, 7, print(Row(n))) } \\ Andrew Howroyd, Oct 19 2020

Formula

a(n) = A085643(n)/A048996(n).
T(n,k) = A005361(A036035(n,k)). - Andrew Howroyd, Oct 19 2020

Extensions

Corrected and extended by Franklin T. Adams-Watters, May 26 2006

A353506 Number of integer partitions of n whose parts have the same product as their multiplicities.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 17 2022

Keywords

Examples

			The a(0) = 1 through a(18) = 2 partitions:
  n= 0: ()
  n= 1: (1)
  n= 2:
  n= 3:
  n= 4: (211)
  n= 5:
  n= 6: (3111) (2211)
  n= 7:
  n= 8: (41111)
  n= 9:
  n=10: (511111)
  n=11: (32111111)
  n=12: (6111111) (22221111)
  n=13: (322111111)
  n=14: (71111111) (4211111111)
  n=15:
  n=16: (811111111) (4411111111) (42211111111)
  n=17: (521111111111) (332111111111) (322211111111)
  n=18: (9111111111) (333111111111)
For example, the partition y = (322111111) has multiplicities (1,2,6) with product 12, and the product of parts is also 3*2*2*1*1*1*1*1*1 = 12, so y is counted under a(13).
		

Crossrefs

LHS (product of parts) is ranked by A003963, counted by A339095.
RHS (product of multiplicities) is ranked by A005361, counted by A266477.
For shadows instead of prime exponents we have A008619, ranked by A003586.
Taking sum instead of product of parts gives A266499.
For shadows instead of prime indices we have A353398, ranked by A353399.
These partitions are ranked by A353503.
Taking sum instead of product of multiplicities gives A353698.
A008284 counts partitions by length.
A098859 counts partitions with distinct multiplicities, ranked by A130091.
A353507 gives product of multiplicities (of exponents) in prime signature.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Times@@#==Times@@Length/@Split[#]&]],{n,0,30}]
  • PARI
    a(n) = {my(nb=0); forpart(p=n, my(s=Set(p), v=Vec(p)); if (vecprod(vector(#s, i, #select(x->(x==s[i]), v))) == vecprod(v), nb++);); nb;} \\ Michel Marcus, May 20 2022

Extensions

a(71)-a(100) from Alois P. Heinz, May 20 2022

A370809 Greatest number of multisets that can be obtained by choosing a prime factor of each part of an integer partition of n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 4, 4, 6, 4, 6, 6, 6, 6, 8, 6, 8, 8, 9, 8, 10, 9, 12, 10, 12, 12, 12, 12, 16, 13, 16, 16, 18, 16, 20, 18, 20, 20, 24, 20, 24, 24, 24, 26, 30, 26, 30, 30, 32, 32, 36, 32, 36, 36, 40, 38, 42, 40, 45, 44, 48
Offset: 0

Views

Author

Gus Wiseman, Mar 05 2024

Keywords

Examples

			For the partition (10,6,3,2) there are 4 choices: {2,2,2,3}, {2,2,3,3}, {2,2,3,5}, {2,3,3,5} so a(21) >= 4.
For the partitions of 6 we have the following choices:
  (6): {{2},{3}}
  (51): {}
  (42): {{2,2}}
  (411): {}
  (33): {{3,3}}
  (321): {}
  (3111): {}
  (222): {{2,2,2}}
  (2211): {}
  (21111): {}
  (111111): {}
So a(6) = 2.
		

Crossrefs

For just all divisors (not just prime factors) we have A370808.
The version for factorizations is A370817, for all divisors A370816.
A000041 counts integer partitions, strict A000009.
A006530 gives greatest prime factor, least A020639.
A027746 lists prime factors, A112798 indices, length A001222.
A355741, A355744, A355745 choose prime factors of prime indices.
A368413 counts non-choosable factorizations, complement A368414.
A370320 counts non-condensed partitions, ranks A355740.
A370592, A370593, A370594, `A370807 count non-choosable partitions.

Programs

  • Mathematica
    Table[Max[Length[Union[Sort /@ Tuples[If[#==1,{},First/@FactorInteger[#]]& /@ #]]]&/@IntegerPartitions[n]],{n,0,30}]

Extensions

Terms a(31) onward from Max Alekseyev, Sep 17 2024

A212721 Triangle read by rows: n-th row gives distinct products of partitions of n (A000041).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 27, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 14 2012

Keywords

Comments

A034891(n) = length of n-th row;
A000792(n) = largest term of n-th row;
for n>5: A007918(n) = smallest number <= A000792(n) not occurring in n-th row.

Examples

			A000041(6)=11, the 11 partitions and their products of 6:
   1: (1,1,1,1,1,1)   ->   1 * 1 * 1 * 1 * 1 * 1 = 1
   2: (1,1,1,1,2)     ->   1 * 1 * 1 * 1 * 2     = 2
   3: (1,1,1,3)       ->   1 * 1 * 1 * 3         = 3
   4: (1,1,2,2)       ->   1 * 1 * 2 * 2         = 4
   5: (1,1,4)         ->   1 * 1 * 4             = 4
   6: (1,2,3)         ->   1 * 2 * 3             = 6
   7: (1,5)           ->   1 * 5                 = 5
   8: (2,2,2)         ->   2 * 2 * 2             = 8
   9: (2,4)           ->   2 * 4                 = 8
  10: (3,3)           ->   3 * 3                 = 9
  11: (6)             ->                           6,
sorted and duplicates removed: T(6,1..8)=[1,2,3,4,5,6,8,9], A034891(6)=8.
The triangle begins:
   0 |  [1]
   1 |  [1]
   2 |  [1,2]
   3 |  [1,2,3]
   4 |  [1,2,3,4]
   5 |  [1,2,3,4,5,6]
   6 |  [1,2,3,4,5,6,8,9]
   7 |  [1,2,3,4,5,6,7,8,9,10,12]
   8 |  [1,2,3,4,5,6,7,8,9,10,12,15,16,18]
   9 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,24,27]
  10 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,30,32,36].
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a212721 n k = a212721_row n !! (k-1)
    a212721_row = nub . sort . (map product) . ps 1 where
       ps x 0 = [[]]
       ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    a212721_tabf = map a212721_row [0..]
    
  • Mathematica
    row[n_] := Union[Times @@@ IntegerPartitions[n]];
    Table[row[n], {n, 0, 10}] (* Jean-François Alcover, Jun 29 2019 *)
  • Sage
    [sorted(list(set([mul(p) for p in Partitions(n)]))) for n in range(11)] # Peter Luschny, Dec 13 2015

A319912 Number of distinct pairs (m, y), where m >= 1 and y is an integer partition of n, such that m can be obtained by iteratively adding any two or multiplying any two non-1 parts of y until only one part (equal to m) remains.

Original entry on oeis.org

1, 2, 3, 5, 12, 30, 53, 128, 247, 493, 989, 1889, 3434, 6390, 11526, 20400, 35818, 62083, 106223, 180170
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Examples

			The a(6) = 30 pairs:
  1 <= (1)
  2 <= (2)
  2 <= (1,1)
  3 <= (3)
  3 <= (2,1)
  3 <= (1,1,1)
  4 <= (4)
  4 <= (2,2)
  4 <= (3,1)
  4 <= (2,1,1)
  4 <= (1,1,1,1)
  5 <= (5)
  5 <= (3,2)
  5 <= (4,1)
  5 <= (2,2,1)
  5 <= (3,1,1)
  5 <= (2,1,1,1)
  5 <= (1,1,1,1,1)
  6 <= (6)
  6 <= (3,2)
  6 <= (3,3)
  6 <= (4,2)
  6 <= (5,1)
  6 <= (2,2,1)
  6 <= (2,2,2)
  6 <= (3,1,1)
  6 <= (3,2,1)
  6 <= (4,1,1)
  6 <= (2,1,1,1)
  6 <= (2,2,1,1)
  6 <= (3,1,1,1)
  6 <= (1,1,1,1,1)
  6 <= (2,1,1,1,1)
  6 <= (1,1,1,1,1,1)
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    mexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_?(#>1&),mie___,y_?(#>1&),afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Total[Length/@mexos/@IntegerPartitions[n]],{n,20}]

A370816 Greatest number of multisets that can be obtained by choosing a divisor of each factor in an integer factorization of n into unordered factors > 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 7, 2, 4, 4, 7, 2, 7, 2, 7, 4, 4, 2, 11, 3, 4, 5, 7, 2, 8, 2, 10, 4, 4, 4, 12, 2, 4, 4, 11, 2, 8, 2, 7, 7, 4, 2, 17, 3, 7, 4, 7, 2, 11, 4, 11, 4, 4, 2, 15, 2, 4, 7, 14, 4, 8, 2, 7, 4, 8, 2, 20, 2, 4, 7, 7, 4, 8, 2, 17, 7, 4, 2
Offset: 1

Views

Author

Gus Wiseman, Mar 06 2024

Keywords

Examples

			For the factorizations of 12 we have the following choices:
  (2*2*3): {{1,1,1},{1,1,2},{1,1,3},{1,2,2},{1,2,3},{2,2,3}}
    (2*6): {{1,1},{1,2},{1,3},{1,6},{2,2},{2,3},{2,6}}
    (3*4): {{1,1},{1,2},{1,3},{1,4},{2,3},{3,4}}
     (12): {{1},{2},{3},{4},{6},{12}}
So a(12) = 7.
		

Crossrefs

The version for partitions is A370808, for just prime factors A370809.
For just prime factors we have A370817.
A000005 counts divisors.
A001055 counts factorizations, strict A045778.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A368413 counts non-choosable factorizations, complement A368414.
A370813 counts non-divisor-choosable factorizations, complement A370814.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Max[Length[Union[Sort/@Tuples[Divisors/@#]]]&/@facs[n]],{n,100}]

A371166 Positive integers with fewer divisors (A000005) than distinct divisors of prime indices (A370820).

Original entry on oeis.org

7, 13, 19, 23, 29, 37, 43, 47, 53, 61, 71, 73, 74, 79, 89, 91, 95, 97, 101, 103, 106, 107, 111, 113, 122, 131, 137, 139, 141, 142, 143, 145, 149, 151, 159, 161, 163, 167, 169, 173, 178, 181, 183, 185, 193, 197, 199, 203, 209, 213, 214, 215, 219, 221, 223, 226
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices begin:
     7: {4}       101: {26}      163: {38}      223: {48}
    13: {6}       103: {27}      167: {39}      226: {1,30}
    19: {8}       106: {1,16}    169: {6,6}     227: {49}
    23: {9}       107: {28}      173: {40}      229: {50}
    29: {10}      111: {2,12}    178: {1,24}    233: {51}
    37: {12}      113: {30}      181: {42}      239: {52}
    43: {14}      122: {1,18}    183: {2,18}    247: {6,8}
    47: {15}      131: {32}      185: {3,12}    251: {54}
    53: {16}      137: {33}      193: {44}      257: {55}
    61: {18}      139: {34}      197: {45}      259: {4,12}
    71: {20}      141: {2,15}    199: {46}      262: {1,32}
    73: {21}      142: {1,20}    203: {4,10}    263: {56}
    74: {1,12}    143: {5,6}     209: {5,8}     265: {3,16}
    79: {22}      145: {3,10}    213: {2,20}    267: {2,24}
    89: {24}      149: {35}      214: {1,28}    269: {57}
    91: {4,6}     151: {36}      215: {3,14}    271: {58}
    95: {3,8}     159: {2,16}    219: {2,21}    281: {60}
    97: {25}      161: {4,9}     221: {6,7}     293: {62}
		

Crossrefs

The RHS is A370820, for prime factors instead of divisors A303975.
For (equal to) instead of (less than) we have A371165, counted by A371172.
For (greater than) instead of (less than) we have A371167.
For prime factors on the LHS we get A371168, counted by A371173.
Other equalities: A319899, A370802 (A371130), A371128, A371177 (A371178).
Other inequalities: A370348 (A371171), A371169, A371170.
A000005 counts divisors.
A001221 counts distinct prime factors.
A027746 lists prime factors, A112798 indices, length A001222.
A239312 counts divisor-choosable partitions, ranks A368110.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A370320 counts non-divisor-choosable partitions, ranks A355740.
A370814 counts divisor-choosable factorizations, complement A370813.

Programs

  • Mathematica
    Select[Range[100],Length[Divisors[#]] < Length[Union@@Divisors/@PrimePi/@First/@FactorInteger[#]]&]

Formula

A000005(a(n)) < A370820(a(n)).

A007600 Minimal number of subsets in a separating family for a set of n elements.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Let j = ceiling(log_3(n))-1. Then a(n) = 3j+1 if 3^j < n <= 4*3^(j-1); 3j+2 if 4*3^(j-1) < n <= 2*3^j; 3j+3 if 2*3^j < n <= 3^(j+1). - Ralf Stephan, Apr 28 2003
"In 1973, The Hungarian mathematician G. O. H. Katona posed the general problem of determining, for a set of n elements, the minimum number f(n) of subsets in a separating family. This problem was solved in early Feb, 1982, by the gifted Chinese mathematician Cai Mao-Cheng (Academia Sinica, Peking), during an extended visit to the University of Waterloo." [Honsberger]
Honsberger gives a misattribution: the problem was first solved by Andrew Chi-Chih Yao. - Vincent Vatter, Apr 24 2006

References

  • Ross Honsberger, Mathematical Gems III, Dolciani Mathematical Expositions No. 9, Mathematical Association of America, 1985, Cai Mao-Cheng's Solution to Katona's Problem on Families of Separating Subsets, Chapter 18, pages 224 - 239.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Positions of increases are in A007601. This is a left inverse of A000792.

Programs

  • Maple
    for n from 1 to 5 do C[n]:=n; od; C[6]:=5;
    for i from 2 to 5 do
       for m from 2*3^(i-1)+1 to 3^i do C[m]:=3*i; od:
       for m from 3^i+1 to 4*3^(i-1) do C[m]:=3*i+1; od:
       for m from 4*3^(i-1)+1 to 2*3^i do C[m]:=3*i+2; od:
    od:
    [seq(C[i],i=1..120)]; # N. J. A. Sloane, May 05 2011
  • Mathematica
    f[n_] := Min[ Table[2p + 3Ceiling[Log[3, n/2^p]], {p, 0, 2}]]; Table[ f[n], {n, 80}] (* Robert G. Wilson v, Jan 15 2005 *)
  • PARI
    a(n) = vecmin(vector(3, i, my(k=i-1); 2*k + 3*ceil(log(n/2^k)/log(3)))); \\ Michel Marcus, Dec 18 2022

Formula

a(n) = Min_{k=0..2} 2*k + 3*ceiling(log_3(n/2^k)).
a(A000792(n)) = n, for n>1; Andrew Chi-Chih Yao attributes this observation to D. E. Muller. - Vincent Vatter, Apr 24 2006
a(n) = ceiling(3*log_3(n)) if n belongs to A000792. - Mehmet Sarraç, Dec 17 2022
Previous Showing 31-40 of 86 results. Next