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!)
A283501 Remainder when sum of first n terms of A004001 is divided by 2*n. 2
1, 2, 4, 6, 9, 1, 3, 5, 8, 12, 17, 22, 2, 6, 10, 14, 19, 25, 32, 0, 6, 13, 21, 29, 38, 47, 2, 10, 18, 26, 34, 42, 51, 61, 2, 12, 23, 34, 46, 59, 73, 3, 16, 30, 44, 59, 74, 89, 7, 22, 37, 53, 69, 85, 102, 7, 22, 37, 53, 69, 85, 101, 117, 5, 20, 36, 53, 71, 90, 110, 130, 7, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Sequence represents b(n, 2) where b(n, i) = (Sum_{k=1..n} A004001(k)) mod (n*i). See also A282891 and corresponding illustration in Links section.
LINKS
FORMULA
a(n) = (Sum_{k=1..n} A004001(k)) mod (2*n).
EXAMPLE
a(6) = 1 since Sum_{k=1..6} A004001(k) = 1 + 1 + 2 + 2 + 3 + 4 = 13 and remainder when 13 is divided by 12 is 1.
MAPLE
A004001:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-1)) end proc:
A004001(1):= 1: A004001(2):= 1:
L:= ListTools[PartialSums](map(A004001, [$1..1000])):
seq(L[i] mod (2*i), i=1..1000); # after Robert Israel at A282891
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; Table[Mod[Total@ Array[a, n], 2 n], {n, 73}] (* Michael De Vlieger, Mar 13 2017, after Robert G. Wilson v at A004001 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[a[n-1]]+a[n-a[n-1]]); vector(#a, n, sum(k=1, n, a[k]) % (2*n))
CROSSREFS
Sequence in context: A231408 A361973 A021409 * A335923 A335924 A369543
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 09 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 April 24 13:12 EDT 2024. Contains 371946 sequences. (Running on oeis4.)