cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A283025 Remainder when sum of first n terms of A005185 is divided by n.

Original entry on oeis.org

0, 0, 1, 3, 0, 2, 5, 0, 3, 6, 9, 2, 6, 10, 1, 5, 10, 16, 3, 9, 15, 21, 4, 13, 20, 1, 9, 17, 25, 3, 14, 22, 30, 7, 18, 27, 0, 11, 21, 32, 3, 14, 26, 38, 5, 16, 27, 46, 8, 19, 35, 49, 8, 23, 38, 51, 11, 25, 41, 57, 12, 27, 50, 2, 15, 35, 52, 67, 19, 40, 58, 5, 25, 44, 64, 7, 28, 47, 67, 9, 31, 52, 73, 13, 34, 56, 80, 16, 38, 62, 86, 18
Offset: 1

Views

Author

Altug Alkan, Feb 27 2017

Keywords

Comments

Numbers n such that a(n) = 0 are 1, 2, 5, 8, 37, 99, 1580, 42029, ...
Sequence is a mixture of regularity and irregularity. - Douglas Hofstadter, Mar 03 2017

Examples

			a(4) = 3 since Sum_{k=1..4} A005185(k) = 1 + 1 + 2 + 3 = 7 and remainder when 7 is divided by 4 is 3.
		

Crossrefs

Programs

  • Maple
    A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
    A005185(1):= 1: A005185(2):= 1:
    L:= ListTools[PartialSums](map(A005185, [$1..1000])):
    seq(L[i] mod i, i=1..1000); # Robert Israel, Feb 28 2017
  • Mathematica
    h[1]=h[2]=1; h[n_]:=h[n]= h[n-h[n-1]] + h[n-h[n-2]]; Mod[ Accumulate[h /@ Range[100]], Range[100]] (* Giovanni Resta, Feb 27 2017 *)
  • PARI
    a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-a[n-1]]+a[n-a[n-2]]); vector(#a, n, sum(k=1, n, a[k]) % n)
    
  • PARI
    first(n)=my(v=vector(n), s); v[1]=v[2]=1; for(k=3, n, v[k]=v[k-v[k-1]]+v[k-v[k-2]]); for(k=1, n, s+=v[k]; v[k]=s%k); v \\ after Charles R Greathouse IV at A282891

Formula

a(n) = (Sum_{k=1..n} A005185(k)) mod n.
a(n) = A076268(n) mod n.

A282894 Remainder when sum of first n terms of A004001 is divided by A004001(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 4, 4, 6, 6, 6, 6, 6, 7, 9, 0, 0, 2, 5, 5, 8, 8, 8, 10, 10, 10, 10, 10, 9, 9, 10, 12, 15, 15, 18, 22, 3, 3, 7, 12, 12, 17, 17, 17, 21, 26, 26, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 2, 0, 34, 35, 0, 2, 2, 4, 7, 11, 16, 16, 21, 27, 34, 34, 41, 2, 2, 9, 9, 9, 15, 22, 30, 30, 38, 47, 47, 2, 2, 2
Offset: 1

Views

Author

Altug Alkan, Feb 24 2017

Keywords

Examples

			a(6) = 1 since Sum_{k=1..6} A004001(k) = 1 + 1 + 2 + 2 + 3 + 4 = 13 and remainder when 13 is divided by A004001(6) = 4 is 1.
		

Crossrefs

Programs

  • 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 A004001(i), i=1..1000); # Robert Israel, Feb 26 2017
  • Mathematica
    a[1] = 1; a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; MapIndexed[Last@ QuotientRemainder[#1, a@ First@ #2] &, Accumulate@ Table[a@ n, {n, 96}]] (* Michael De Vlieger, Feb 24 2017, after Robert G. Wilson v at A004001 *)
  • 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]) % a[n])
    
  • PARI
    first(n)=my(v=vector(n),s); v[1]=v[2]=1; for(k=3, n, v[k]=v[v[k-1]]+v[k-v[k-1]]); for(k=1,n, s+=v[k]; v[k]=s%v[k]); v \\ Charles R Greathouse IV, Feb 26 2017

Formula

a(n) = (Sum_{k=1..n} A004001(k)) mod A004001(n).

A283501 Remainder when sum of first n terms of A004001 is divided by 2*n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Altug Alkan, Mar 09 2017

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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))

Formula

a(n) = (Sum_{k=1..n} A004001(k)) mod (2*n).

A283525 Remainder when sum of first n terms of A004001 is divided by 3*n.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 17, 21, 26, 2, 6, 10, 15, 20, 25, 30, 36, 43, 51, 0, 6, 13, 21, 29, 38, 47, 56, 66, 76, 86, 3, 10, 18, 27, 37, 48, 60, 72, 85, 99, 114, 3, 16, 30, 44, 59, 74, 89, 105, 122, 139, 1, 16, 31, 47, 63, 79, 95, 112, 129, 146, 163, 180, 5, 20, 36, 53, 71, 90, 110, 130, 151, 173, 196, 220, 16, 38, 61, 85, 109
Offset: 1

Views

Author

Altug Alkan, Mar 10 2017

Keywords

Comments

Sequence represents b(n, 3) where b(n, i) = (Sum_{k=1..n} A004001(k)) mod (n*i). See also A282891, A283501 and corresponding illustrations in Links section.

Crossrefs

Programs

  • 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 (3*i), i=1..1000); # after Robert Israel at A282891
  • Mathematica
    b[1] = 1; b[2] = 1; b[n_] := b[n] = b[b[n - 1]] + b[n - b[n - 1]]; a[n_] := Mod[Sum[b[k], {k, n}], 3 n]; Array[a, 80] (* Robert G. Wilson v, Mar 13 2017 *)
  • 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]) % (3*n))

Formula

a(n) = (Sum_{k=1..n} A004001(k)) mod (3*n).

A284214 Remainder when sum of first n terms of A006949 is divided by n.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 5, 0, 2, 4, 6, 9, 0, 3, 7, 12, 0, 4, 8, 12, 17, 1, 6, 12, 19, 0, 6, 13, 21, 29, 7, 16, 25, 0, 8, 16, 24, 33, 4, 13, 23, 34, 2, 12, 23, 35, 0, 12, 25, 38, 0, 12, 25, 39, 53, 12, 27, 42, 57, 13, 29, 45, 62, 16, 33, 50, 0, 16, 32, 48, 65, 11, 28, 46, 65, 8, 26, 45, 65, 5
Offset: 1

Views

Author

Altug Alkan, Mar 23 2017

Keywords

Comments

Sequence represents e(n, 1) where e(n, i) = (Sum_{k=0..n-1} A006949(k)) mod (n*i).
See also alternative scatterplot and graph of this sequence in Links section.

Examples

			a(6) = 3 because Sum_{k=0..5} A006949(k) = 1 + 1 + 1 + 2 + 2 + 2 = 9 and remainder when 9 is divided by 6 is 3.
		

Crossrefs

Programs

  • Mathematica
    a[0] = a[1] = a[2] = 1; a[n_] := a[n] = a[n - 1 - a[n - 1]] + a[n - 2 - a[n - 2]]; MapIndexed[Mod[#1, First@ #2] &, Accumulate@ Table[a@ n, {n, 0, 79}]] (* Michael De Vlieger, Mar 24 2017 *)

Formula

a(n) = (Sum_{k=0..n-1} A006949(k)) mod n.
Showing 1-5 of 5 results.