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 A174965 #18 Jul 26 2017 10:01:05 %S A174965 5,3,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, %T A174965 1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1, %U A174965 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 %N A174965 Length of the n-th run of consecutive terms in A000961. %C A174965 Let b(n) be partial sums of this sequence, as b(0) = 0, b(n) = b(n-1) + a(n). Then 2's in this sequence occur at certain positions k so that A000961(b(k))-1 = one of the terms of A006549. E.g., a(6625) = 2, and b(6625) = 6637, with A000961(6637) = 65537, the end of 2-run (65536,65537) in A000961. (The start of that 2-run, 65536, is listed as A006549(12), and 12 = 6637-6625.) - _Antti Karttunen_, Jul 24 2017 %C A174965 Position of 2s: {5, 11, 36, 62, 1068, 6625, 12358, 43566, ...}, %C A174965 position of 3: {2}, position of 5: {1}. All other positions pertain to 1 for A000961(n) <= 10^8. - _Michael De Vlieger_, Jul 25 2017 %H A174965 Antti Karttunen, <a href="/A174965/b174965.txt">Table of n, a(n) for n = 1..9987</a> (computed by using the 10000 term b-file of A000961 computed by T. D. Noe) %e A174965 n a(n) run in A000961 %e A174965 1: 5 (1 2 3 4 5) %e A174965 2: 3 (7 8 9) %e A174965 3: 1 (11) %e A174965 4: 1 (13) %e A174965 5: 2 (16 17) %e A174965 6: 1 (19) %e A174965 7: 1 (23) %e A174965 8: 1 (25) %e A174965 9: 1 (27) %e A174965 10: 1 (29) %e A174965 11: 2 (31 32) %e A174965 12: 1 (37) %e A174965 13: 1 (41) %e A174965 14: 1 (43) %e A174965 15: 1 (47) %e A174965 16: 1 (49) %e A174965 17: 1 (53) %e A174965 18: 1 (59) %e A174965 19: 1 (61) %e A174965 20: 1 (64) %e A174965 21: 1 (67) %e A174965 22: 1 (71) %e A174965 23: 1 (73) %e A174965 24: 1 (79) %e A174965 25: 1 (81) %e A174965 26: 1 (83) %e A174965 27: 1 (89) %e A174965 28: 1 (97) %e A174965 29: 1 (101) %e A174965 30: 1 (103) %e A174965 31: 1 (107) %e A174965 32: 1 (109) %e A174965 33: 1 (113) %e A174965 34: 1 (121) %e A174965 35: 1 (125) %e A174965 36: 2 (127 128) %e A174965 37: 1 (131) %e A174965 38: 1 (137) %e A174965 etc. %t A174965 With[{n = 500}, Function[s, Function[t, Length /@ DeleteCases[Split@ ReplacePart[t, Map[# -> 1 &, s]], k_ /; First@ k == 0]]@ ConstantArray[0, Max@ s]]@ Sort@ Flatten[{{1}}~Join~Array[Function[p, Map[p^# &, Range@ Floor@ Log[p, n]] ][Prime@ #] &, PrimePi@ n]]] (* _Michael De Vlieger_, Jul 25 2017 *) %o A174965 (Scheme, with memoization-macro definec) %o A174965 (definec (A174965 n) (let ((k (+ 1 (Apartsums_of_A174965 (- n 1))))) (let loop ((prev (A000961 k)) (i 1)) (let ((m (A000961 (+ k i)))) (if (= m (+ 1 prev)) (loop m (+ i 1)) i))))) %o A174965 ;; An auxiliary partial sums function not submitted separately: %o A174965 (definec (Apartsums_of_A174965 n) (if (zero? n) n (+ (A174965 n) (Apartsums_of_A174965 (- n 1))))) %o A174965 ;; _Antti Karttunen_, Jul 24 2017 %Y A174965 Cf. A000961, A006549, A057820. %K A174965 nonn %O A174965 1,1 %A A174965 _Pahikkala Jussi_, Apr 02 2010 %E A174965 Terms a(33) & a(36) corrected, more terms added by _Antti Karttunen_, Jul 24 2017