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-4 of 4 results.

A276438 a(n) = (A274647(n)-A274647(n-1)) / n.

Original entry on oeis.org

1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 2, 1, -1, -1, 2, 1, -1, 1, -1, -1, 2, 1, -1, -1, -1, 1, -1, 2, 1, -1, -1, 2, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 2, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 2, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1
Offset: 1

Views

Author

Antti Karttunen, Sep 04 2016

Keywords

Comments

a(n) tells what k was finally used when determining the value of A274647(n), with minus sign if subtraction was chosen and with positive sign if addition was chosen.
First 1 occurs at n=1, first 2 at n=24, first 3 at n=128, first 4 at n=204, first 5 at n=17903, first 6 at n=210027.
First -1 occurs at n=4, first -2 at n=124, first -3 at n=5882.

Crossrefs

Cf. A274647.
Cf. A276439 (partial sums).

Programs

Formula

a(n) = (A274647(n)-A274647(n-1)) / n.

A276342 Left inverse of A274647.

Original entry on oeis.org

0, 1, 4, 2, 203, 2597, 3, 5, 16, 14, 12, 10, 8, 6, 97, 15546, 243575589, 404450, 23, 404448, 7, 9, 11, 13, 15, 17, 56, 54, 52, 50, 631, 629, 902, 137, 135, 192, 84974, 84972, 27, 309411696, 131, 22, 20, 18, 85, 111320883, 127, 125
Offset: 0

Views

Author

Antti Karttunen, Sep 04 2016

Keywords

Comments

If A274647 is proved to be a permutation, then this is full inverse of it, and the hypothetical -1's are in that case unnecessary (or can be used as markers for yet unknown values).

Crossrefs

Programs

  • Maple
    N = 10^6: # to search A274647(n) for n <= N
    A[0]:= 0:B[0]:= 0:
    for n from 1 to N do
      for k from 1 do
         r:= A[n-1]-k*n;
         if r > 0 and not assigned(B[r]) then
            break
         fi;
         r:= A[n-1]+k*n;
         if not assigned(B[r]) then
            break
         fi
      od;
      A[n]:= r;
      B[r]:= n;
    od:
    seq(B[n],n=0..100); # Robert Israel, Sep 04 2016
  • Scheme
    ;; Use the Scheme-code given in A274647. First one needs to compute A274647 up to some high value of n before trying to list terms of this sequence.

Formula

a(n) = index of n in A274647 or -1 if n is not present in that sequence.
For all n >= 0, a(A274647(n)) = n.

Extensions

More terms and updated a-file from Hugo van der Sanden, Sep 05 2016
Updated a-file from Robert Gerbicz, Sep 09 2016
Updated a-file from Benjamin Chaffin, Sep 29 2016

A274648 A variation on Recamán's sequence (A005132): a(n) is the first positive number of the form a(n-1)-n*k, k>0 not already in the sequence; and if no such number exists, then a(n) is the first number of the form a(n-1)+n*k, k>0 not already in the sequence.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 5, 45, 66, 44, 67, 19, 69, 17, 71, 15, 73, 103, 72, 40, 106, 38, 108, 36, 110, 34, 112, 32, 114, 30, 116, 28, 118, 26, 120, 168, 119, 169, 16, 68, 121, 175, 65, 177, 63, 179, 61, 181, 59, 183
Offset: 0

Views

Author

Max Barrentine, Aug 12 2016

Keywords

Comments

Is this a permutation of the natural numbers?
The inverse is: 0, 1, 4, 2, 164, 19, 3, 5, 16, 14, 12, 10, 8, 6, 8228, 28, 51, 26, 158, 24, 7, 9, 11, 13, 15, 17, 46, 90, ..., . Robert G. Wilson v, Sep 07 2016
After 3.2*10^11 terms, the smallest number which has not appeared is 154. - Benjamin Chaffin, Oct 05 2016

Crossrefs

Cf. A273148 (inverse), A005132, A274647 (another variant).

Programs

  • Mathematica
    f[s_List] := Block[{k = 1, l = s[[-1]], n = Length@ s}, While[ MemberQ[s, l - k*n] && l > k*n, k++]; If[l > k*n, Append[s, l - k*n], k = 1; While[ MemberQ[s, l + k*n], k++]; Append[s, l + k*n]]]; Nest[f, {0}, 60] (* Robert G. Wilson v, Sep 07 2016 *)

A276439 Partial sums of A276438.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 5, 7, 8, 7, 6, 8, 9, 8, 9, 8, 7, 9, 10, 9, 8, 7, 8, 7, 9, 10, 9, 8, 10, 11, 10, 9, 8, 7, 8, 7, 8, 7, 8, 7, 8, 9, 10, 9, 10, 9, 8, 10, 11, 10, 9, 8, 9, 8, 9, 10, 11, 10, 9, 8, 9, 8, 10, 11, 10, 11, 10, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 11, 10, 9, 8, 9, 10
Offset: 0

Views

Author

Antti Karttunen, Sep 04 2016

Keywords

Crossrefs

Cf. also A064289, A078759.
Differs from A078759 for the first time at n=24, where a(24)=7 while A078759(24)=6.

Formula

a(0) = 0; for n >= 1, a(n) = A276438(n) + a(n-1).
Showing 1-4 of 4 results.