|
|
A174965
|
|
Length of the n-th run of consecutive terms in A000961.
|
|
1
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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
Position of 2s: {5, 11, 36, 62, 1068, 6625, 12358, 43566, ...},
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
|
|
LINKS
|
|
|
EXAMPLE
|
1: 5 (1 2 3 4 5)
2: 3 (7 8 9)
3: 1 (11)
4: 1 (13)
5: 2 (16 17)
6: 1 (19)
7: 1 (23)
8: 1 (25)
9: 1 (27)
10: 1 (29)
11: 2 (31 32)
12: 1 (37)
13: 1 (41)
14: 1 (43)
15: 1 (47)
16: 1 (49)
17: 1 (53)
18: 1 (59)
19: 1 (61)
20: 1 (64)
21: 1 (67)
22: 1 (71)
23: 1 (73)
24: 1 (79)
25: 1 (81)
26: 1 (83)
27: 1 (89)
28: 1 (97)
29: 1 (101)
30: 1 (103)
31: 1 (107)
32: 1 (109)
33: 1 (113)
34: 1 (121)
35: 1 (125)
36: 2 (127 128)
37: 1 (131)
38: 1 (137)
etc.
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(Scheme, with memoization-macro definec)
(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)))))
;; An auxiliary partial sums function not submitted separately:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Terms a(33) & a(36) corrected, more terms added by Antti Karttunen, Jul 24 2017
|
|
STATUS
|
approved
|
|
|
|