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.
%I A277070 #19 Sep 15 2022 02:18:03 %S A277070 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, %T A277070 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, %U A277070 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 %N A277070 Row length of A276380(n). %C A277070 a(n) represents the partition size generated by greedy algorithm at A276380(n) such that all parts k are unique and in A003586. %C A277070 See A276380 for further comments about the greedy algorithm. %C A277070 Row n = 1 for n that are in A003586. %C A277070 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). %C A277070 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). %D A277070 V. Dimitrov, G. Jullien, and R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39. %H A277070 Michael De Vlieger, <a href="/A277070/b277070.txt">Table of n, a(n) for n = 1..10000</a> %e A277070 a(n) Terms k in row n of A276380: %e A277070 1 1 %e A277070 1 2 %e A277070 1 3 %e A277070 1 4 %e A277070 2 1,4 %e A277070 1 6 %e A277070 2 1,6 %e A277070 1 8 %e A277070 1 9 %e A277070 2 1,9 %e A277070 2 2,9 %e A277070 1 12 %e A277070 2 1,12 %e A277070 2 2,12 %e A277070 2 3,12 %e A277070 1 16 %e A277070 2 1,16 %e A277070 1 18 %e A277070 2 1,18 %e A277070 2 2,18 %e A277070 2 3,18 %e A277070 2 4,18 %e A277070 3 1,4,18 %e A277070 ... %e A277070 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. %e A277070 a(88) = 3 since A276380(88) = {1,6,81}, but {16,72} and {24,64} are shorter and have A237442(88) = 2 terms. %t A277070 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}] %o A277070 (Python) %o A277070 from itertools import count, takewhile %o A277070 N = 100 %o A277070 def B(p): return list(takewhile(lambda x: x<=N, (p**i for i in count(0)))) %o A277070 B23set = set(b*t for b in B(2) for t in B(3) if b*t <= N) %o A277070 B23lst = sorted(B23set, reverse=True) %o A277070 def a(n): %o A277070 if n in B23set: return 1 %o A277070 big = next(t for t in B23lst if t <= n) %o A277070 return a(n - big) + 1 %o A277070 print([a(n) for n in range(1, N+1)]) # _Michael S. Branicky_, Sep 14 2022 %Y A277070 Cf. A003586, A237442, A276380, A277071. %K A277070 nonn %O A277070 1,5 %A A277070 _Michael De Vlieger_, Sep 27 2016