login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280706 a(n) = Sum_{k=1..n} q(k+1-q(k)), where q(k) = A005185(k); partial sums of A283467. 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

Antti Karttunen, Table of n, a(n) for n = 1..10001

Index entries for Hofstadter-type sequences

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

Cf. A005185, A284173.

Partial sums of A283467.

Sequence in context: A214780 A024174 A008739 * A025695 A025694 A022796

Adjacent sequences:  A280703 A280704 A280705 * A280707 A280708 A280709

KEYWORD

nonn

AUTHOR

Antti Karttunen after Altug Alkan's A284173, Mar 22 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 23:06 EDT 2019. Contains 328379 sequences. (Running on oeis4.)