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.

A283360 Absolute values of first differences of A283025.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 5, 3, 3, 3, 7, 4, 4, 9, 4, 5, 6, 13, 6, 6, 6, 17, 9, 7, 19, 8, 8, 8, 22, 11, 8, 8, 23, 11, 9, 27, 11, 10, 11, 29, 11, 12, 12, 33, 11, 11, 19, 38, 11, 16, 14, 41, 15, 15, 13, 40, 14, 16, 16, 45, 15, 23, 48, 13, 20, 17, 15, 48, 21, 18, 53, 20, 19, 20
Offset: 1

Views

Author

Altug Alkan, Mar 05 2017

Keywords

Comments

In order to compare this sequence and A005185 see the scatterplot in Links section. Note that A283025 is the sequence that focuses on the remainders when sum of first n terms of A005185 is divided by n. Absolute values of first differences of A283025 keeps the main characteristic of A005185 with deviations.

Examples

			a(4) = 3 because a(4) = abs(A283025(5) - A283025(4)) = abs(0 - 3) = 3.
		

Crossrefs

Programs

  • Mathematica
    Block[{a}, a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Abs@ Differences@ MapIndexed[Mod[#1, First[#2]] &, Accumulate@ Array[a[#] &, 75]]] (* Michael De Vlieger, Dec 18 2020 *)
  • PARI
    a=vector(1001); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-a[n-1]]+a[n-a[n-2]]); va = vector(#a, n, sum(k=1, n, a[k]) % n);
    for (k=1, 1000, print1(abs(va[k+1] - va[k]) ", "));

Formula

a(n) = abs(A283025(n+1) - A283025(n)).

A282891 Remainder when sum of first n terms of A004001 is divided by n.

Original entry on oeis.org

0, 0, 1, 2, 4, 1, 3, 5, 8, 2, 6, 10, 2, 6, 10, 14, 2, 7, 13, 0, 6, 13, 21, 5, 13, 21, 2, 10, 18, 26, 3, 10, 18, 27, 2, 12, 23, 34, 7, 19, 32, 3, 16, 30, 44, 13, 27, 41, 7, 22, 37, 1, 16, 31, 47, 7, 22, 37, 53, 9, 24, 39, 54, 5, 20, 36, 53, 3, 21, 40, 59, 7, 27, 48, 70, 16, 38, 61, 6, 29, 53, 78, 20, 45, 70, 9, 34, 60, 87, 24
Offset: 1

Views

Author

Altug Alkan, Feb 24 2017

Keywords

Comments

Numbers n such that a(n) = 0 are 1, 2, 20, 4743, 10936, ...

Examples

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

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 i, i=1..1000); # Robert Israel, Feb 24 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, First@ #2] &, Accumulate@ Table[a@ n, {n, 90}]] (* Michael De Vlieger, Feb 24 2017, after Robert G. Wilson v at A004001 *)
  • 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%k); v \\ Charles R Greathouse IV, Feb 26 2017

Formula

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

A284173 a(n) = (Sum_{k=1..n} q(k+1-q(k))) mod n where q(k) = A005185(k).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 5, 7, 9, 1, 2, 4, 7, 9, 12, 15, 0, 3, 6, 9, 12, 17, 20, 0, 4, 8, 12, 16, 22, 26, 31, 4, 9, 14, 20, 26, 31, 37, 3, 8, 14, 20, 26, 32, 38, 1, 4, 11, 18, 23, 30, 39, 46, 53, 6, 12, 20, 28, 36, 44, 56, 1, 9, 21, 28, 36, 46, 57, 68, 9, 20, 30, 39, 48, 60, 69, 2, 12
Offset: 1

Views

Author

Altug Alkan, Mar 21 2017

Keywords

Comments

Sequence represents d(n, 1, 1) where d(n, i, j) = (Sum_{k=1..n} q(k+j-q(k))) mod (n*i) where q(k) = A005185(k).

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    B[1]:= 1:
    B[2]:= 1:
    for n from 3 to N do
      B[n]:= B[n-B[n-1]] + B[n-B[n-2]];
    od:
    seq(add(B[k+1-B[k]], k=1..n) mod n, n=1..N); # Robert Israel, Mar 22 2017
  • Mathematica
    q[n_]:=If[n<3, 1, q[n - q[n - 1]] + q[n - q[n - 2]]]; a[n_]:=Mod[Sum[q[k + 1 - q[k]],{k, n}], n]; Table[a[n], {n, 100}] (* Indranil Ghosh, Mar 21 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+1-a[k]]) % n)
    
  • Scheme
    (define (A284173 n) (modulo (A280706 n) n)) ;; Other code as in A280706, A283467 and A005185 - Antti Karttunen, Mar 22 2017

Formula

a(n) = A280706(n) mod n. - Antti Karttunen, Mar 22 2017

A283509 Remainder when sum of first n terms of the Hofstadter Q-sequence is divided by 2*n.

Original entry on oeis.org

1, 2, 4, 7, 0, 2, 5, 8, 12, 16, 20, 2, 6, 10, 16, 21, 27, 34, 3, 9, 15, 21, 27, 37, 45, 1, 9, 17, 25, 33, 45, 54, 63, 7, 18, 27, 37, 49, 60, 72, 3, 14, 26, 38, 50, 62, 74, 94, 8, 19, 35, 49, 61, 77, 93, 107, 11, 25, 41, 57, 73, 89, 113, 2, 15, 35, 52, 67, 88, 110, 129, 5, 25, 44, 64, 83, 105, 125, 146, 9, 31, 52, 73, 97
Offset: 1

Views

Author

Altug Alkan, Mar 09 2017

Keywords

Comments

Sequence represents c(n, 2) where c(n, i) = (Sum_{k = 1..n} A005185(k)) mod (n*i). See also A283025 and corresponding illustration in Links section.

Examples

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

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 (2*i), i=1..1000); # after Robert Israel at A283025
  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Table[Mod[Total@ Array[a, n], 2 n], {n, 84}] (* Michael De Vlieger, Mar 13 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]) % (2*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.