The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Antti Karttunen, Table of n, a(n) for n = 1..9987 (computed by using the 10000 term b-file of A000961 computed by T. D. Noe)
EXAMPLE
n a(n) run in A000961
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:
(definec (Apartsums_of_A174965 n) (if (zero? n) n (+ (A174965 n) (Apartsums_of_A174965 (- n 1)))))
;; Antti Karttunen, Jul 24 2017
CROSSREFS
Sequence in context: A132199 A111142 A179626 * A159671 A094853 A096937
KEYWORD
nonn
AUTHOR
Pahikkala Jussi, Apr 02 2010
EXTENSIONS
Terms a(33) & a(36) corrected, more terms added by Antti Karttunen, Jul 24 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 05:11 EDT 2024. Contains 372758 sequences. (Running on oeis4.)