[go: up one dir, main page]

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!)
Search: a284173 -id:a284173
Displaying 1-2 of 2 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A283467 a(n) = A005185(n+1-A005185(n)). +10
4
1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 3, 4, 5, 4, 5, 5, 5, 6, 6, 6, 6, 8, 6, 8, 8, 8, 8, 8, 10, 8, 9, 10, 10, 10, 11, 11, 10, 11, 11, 11, 12, 12, 12, 12, 12, 16, 10, 14, 14, 12, 14, 16, 14, 14, 16, 14, 16, 16, 16, 16, 20, 16, 17, 21, 16, 17, 19, 20, 20, 21, 21, 20, 19, 19, 22, 19, 21, 21, 22, 22, 22, 23, 21, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 32, 17, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
For n >= 2, a(n) gives the left hand summand for the term q(n+1) of Hofstadter Q-sequence (A005185): q(1) = q(2) = 1; q(n) = q(n-q(n-1)) + q(n-q(n-2)) for n > 2.
LINKS
FORMULA
a(n) = A005185(n + 1 - A005185(n)).
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Table[a[n + 1 - a[n]], {n, 97}] (* Michael De Vlieger, Mar 22 2017 *)
PROG
(Scheme) (define (A283467 n) (A005185 (- (+ n 1) (A005185 n)))) ;; Code for A005185 given under that entry.
(PARI) q(n) = if(n<3, 1, q(n - q(n - 1)) + q(n - q(n - 2)));
a(n) = q(n + 1 - q(n)); \\ Indranil Ghosh, Mar 22 2017
CROSSREFS
Cf. A005185, A280706 (partial sums), A284173.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 22 2017
STATUS
approved
A280706 a(n) = Sum_{k=1..n} q(k+1-q(k)), where q(k) = A005185(k); partial sums of A283467. +10
3
1, 2, 3, 4, 6, 8, 10, 13, 16, 19, 23, 26, 30, 35, 39, 44, 49, 54, 60, 66, 72, 78, 86, 92, 100, 108, 116, 124, 132, 142, 150, 159, 169, 179, 189, 200, 211, 221, 232, 243, 254, 266, 278, 290, 302, 314, 330, 340, 354, 368, 380, 394, 410, 424, 438, 454, 468, 484, 500, 516, 532, 552, 568, 585, 606, 622, 639, 658, 678, 698, 719, 740 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, for > 1, a(n) = A283467(n) + a(n-1).
A284173(n) = a(n) modulo n.
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Accumulate@ Table[a[n + 1 - a[n]], {n, 72}] (* Michael De Vlieger, Mar 22 2017 *)
PROG
(Scheme)
;; Code for A005185 given under that entry.
;; With memoization-macro definec:
(definec (A280706 n) (if (= 1 n) 1 (+ (A280706 (- n 1)) (A283467 n))))
;; As an explicit sum (slower):
(define (A280706 n) (add (lambda (k) (A005185 (- (+ k 1) (A005185 k)))) 1 n))
;; Implements sum_{i=lowlim..uplim} intfun(i)
(define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
(PARI) a(n) = if(n<3, 1, a(n - a(n - 1)) + a(n - a(n - 2)));
for(n=1, 72, print1(sum(k=1, n, a(k + 1 - a(k))), ", ")) \\ Indranil Ghosh, Mar 22 2017
CROSSREFS
Partial sums of A283467.
KEYWORD
nonn
AUTHOR
Antti Karttunen after Altug Alkan's A284173, Mar 22 2017
STATUS
approved
page 1

Search completed in 0.007 seconds

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 August 29 06:09 EDT 2024. Contains 375510 sequences. (Running on oeis4.)