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.

User: Dylan Hamilton

Dylan Hamilton's wiki page.

Dylan Hamilton has authored 41 sequences. Here are the ten most recent ones:

A259656 Let f(x) be the absolute value of the difference between x and its base-2 reversal. a(n) is the number of times f(x) must be applied starting with n for the result to be 0.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 4, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 2, 3
Offset: 1

Author

Dylan Hamilton, Jul 02 2015

Keywords

Comments

First differences appear to always be odd.
More precisely, a(n) is even if n is even and a(n) is odd when n is odd. This is an immediate consequence of the parities in A055945 (which represents f apart from the sign) and the fact that we count iterations of f until the result is even. - Jörgen Backelin, Nov 04 2015

Crossrefs

Cf. A055945.

Programs

  • Maple
    A259656 := proc(n)
        local f,a ;
        f := n ;
        a := 0 ;
        while f <> 0 do
            f := abs(A055945(f)) ;
            a := a+1 ;
        end do:
        a;
    end proc: # R. J. Mathar, Nov 04 2015

A259658 Let f(x) be the absolute value of the difference between x and its base-2 reversal. Let g(x) be the number of times f(x) must be applied to x for the result to be 0. a(n) is the smallest value of x for which g(x) is n.

Original entry on oeis.org

0, 1, 2, 11, 38, 271, 544, 2093, 2624, 8607, 17984, 35343, 35904, 70671, 71744, 141327, 143424, 282639, 286784, 565263, 573504, 1130511, 1146944, 2261007, 2293824, 4521999, 4587584, 9043983, 9175104, 18087951, 18350144, 36175887, 36700224, 72351759, 73400384
Offset: 0

Author

Dylan Hamilton, Jul 02 2015

Keywords

Comments

f(x) = abs(A055945(x)).

Crossrefs

Programs

  • Magma
    I:=[0,1,2,11,38,271,544,2093,2624, 8607,17984,35343, 35904,70671]; [n le 14 select I[n] else 3*Self(n-2)-2*Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 10 2015
  • Mathematica
    CoefficientList[Series[x (18144 x^12 + 12800 x^11 - 13708 x^10 -11200 x^9 - 2870 x^8 - 1068 x^7 - 1302 x^6 - 434 x^5 - 240 x^4 - 32 x^3 - 8 x^2 - 2 x - 1)/((1 - x) (x + 1) (2 x^2 - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jul 10 2015 *)
    LinearRecurrence[{0,3,0,-2},{0,1,2,11,38,271,544,2093,2624,8607,17984,35343,35904,70671},50] (* Harvey P. Dale, Nov 23 2022 *)

Formula

G.f.: -x*(18144*x^12 +12800*x^11 -13708*x^10 -11200*x^9 -2870*x^8 -1068*x^7 -1302*x^6 -434*x^5 -240*x^4 -32*x^3 -8*x^2 -2*x-1)/ ((x-1) *(x+1) *(2*x^2-1)). - Alois P. Heinz, Jul 02 2015

Extensions

a(0), a(19)-a(34) from Alois P. Heinz, Jul 02 2015

A211518 a(n) is the sum of all distinct integers that can be produced by reversing the digits of n in any base b >= 2.

Original entry on oeis.org

1, 3, 4, 5, 13, 21, 37, 40, 71, 82, 150, 140, 232, 252, 327, 352, 520, 497, 711, 729, 881, 1027, 1325, 1214, 1567, 1700, 1904, 2016, 2388, 2523, 2997, 3178, 3583, 3758, 4406, 4244, 5138, 5379, 6055, 5948, 6988, 7027, 8150, 8240, 8971, 9303, 10476, 10441, 11808, 12088, 13139, 13571, 15009, 15047, 16473, 16620, 18263, 19020
Offset: 1

Author

Dylan Hamilton, Jun 26 2012

Keywords

Examples

			If n=3, we can get 3 from base 10 (or any other base except 3) and 1 from reversing the base-3 expansion 10, so a(3) = 3+1 = 4.
		

Programs

  • Mathematica
    rev[x_,b_]:=FromDigits[Reverse[IntegerDigits[x,b]],b];Total/@Union/@Table[Table[rev[x,b],{b,2,x+1}],{x,Startpoint,Endpoint}]
  • PARI
    rev(n,B)=my(m=n%B);n\=B;while(n>0,m=m*B+n%B;n\=B);m
    a(n)=if(n<3,2*n-1,my(v=vecsort(vector(n-1,k,rev(n,k+1)),,8));sum(i=1,#v,v[i])) \\ Charles R Greathouse IV, Aug 05 2012

A175947 A175945(n)-A175946(n).

Original entry on oeis.org

1, 0, 3, -2, 1, 2, 7, -6, -1, 0, 3, 0, 5, 6, 15, -14, -5, -4, 1, -2, 3, 2, 7, -4, 3, 4, 11, 4, 13, 14, 31, -30, -13, -12, -3, -10, -1, -2, 5, -6, 1, 0, 9, 0, 7, 6, 15, -12, -1, 0, 9, 2, 11, 10, 23, 0, 11, 12, 27, 12, 29, 30, 63, -62, -29, -28, -11, -26, -9, -10, 1, -22, -7, -8, 5, -8
Offset: 1

Author

Dylan Hamilton, Oct 28 2010

Keywords

Programs

  • Mathematica
    takelist[l_, t_] := Module[{lent, term},Set[lent, Length[t]]; Table[l[[t[[y]]]], {y, 1, lent}]]
    frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
    binrep[x_] := repcount[IntegerDigits[x, 2]]
    onebinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[1,Length[b],2]]]
    zerobinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[2,Length[b],2]]]
    Table[frombinrep[onebinrep[n]], {n,START,END}]-Table[frombinrep[zerobinrep[n]], {n,START,END}]

A175949 Numbers obtained by concatenation of the binary representation of A175946(n) and A175945(n).

Original entry on oeis.org

1, 2, 3, 6, 5, 4, 7, 14, 13, 10, 11, 12, 9, 8, 15, 30, 29, 26, 27, 18, 21, 20, 23, 28, 25, 22, 19, 24, 17, 16, 31, 62, 61, 58, 59, 50, 53, 52, 55, 34, 37, 42, 43, 36, 41, 40, 47, 60, 57, 54, 51, 38, 45, 44, 39, 56, 49, 46, 35, 48, 33, 32, 63, 126, 125, 122, 123, 114, 117, 116
Offset: 1

Author

Dylan Hamilton, Oct 28 2010

Keywords

Comments

The operation as in A175948, but the run-length encoding of zeros (A175946) is placed left from the run-length encoding of ones (A175945).

Examples

			n=9 is 1001 in binary. Run lengths of 0's are 2 (one run of length 2) and of 1's are 11 (two runs each of length 1). The concatenation of these lengths is 211, which is interpreted as 2 one's, 1 zero, 1 one, binary 1101, and recoded decimal as a(9)=8+4+1 =13.
		

Programs

  • Mathematica
    takelist[l_, t_] := Module[{lent, term},Set[lent, Length[t]]; Table[l[[t[[y]]]], {y, 1, lent}]]
    frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
    binrep[x_] := repcount[IntegerDigits[x, 2]]
    onebinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[1,Length[b],2]]]
    zerobinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[2,Length[b],2]]]
    Table[frombinrep[Flatten[{zerobinrep[n], onebinrep[n]}]], {n,START,END}]

A175950 A175948(n)-A175949(n).

Original entry on oeis.org

0, 0, 0, -2, 0, 2, 0, -6, -2, 0, -2, 0, 4, 6, 0, -14, -6, -4, -8, 2, 0, -2, -6, -4, 2, 4, 6, 4, 12, 14, 0, -30, -14, -12, -20, -6, -12, -14, -20, 6, 6, 0, 2, 0, -4, -6, -14, -12, -2, 0, 0, 14, 8, 6, 10, 0, 10, 12, 22, 12, 28, 30, 0, -62, -30, -28, -44, -22, -36, -38, -48, -10, -18
Offset: 1

Author

Dylan Hamilton, Oct 28 2010

Keywords

Comments

A difference between two ways of encoding-decoding run lengths of 0's and 1's in the binary representation of n.

Programs

  • Mathematica
    takelist[l_, t_] := Module[{lent, term},Set[lent, Length[t]]; Table[l[[t[[y]]]], {y, 1, lent}]]
    frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
    binrep[x_] := repcount[IntegerDigits[x, 2]]
    onebinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[1,Length[b],2]]]
    zerobinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[2,Length[b],2]]]
    Table[frombinrep[Flatten[{onebinrep[n], zerobinrep[n]}]], {n,START,END}]-Table[frombinrep[Flatten[{zerobinrep[n], onebinrep[n]}]], {n,START,END}]

A175928 Number of bases in which the concatenation of the consecutive increasing integers 1...n is greater than the concatenation of consecutive decreasing integers n...1 in the same base.

Original entry on oeis.org

1, 1, 3, 3, 4, 3, 4, 5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7
Offset: 2

Author

Dylan Hamilton, Oct 20 2010

Keywords

Programs

  • Mathematica
    Table[Count[ Table[Negative[FromDigits[Flatten[IntegerDigits[Reverse[Range[x]], ba]], \ ba] - FromDigits[Flatten[IntegerDigits[Range[x], ba]], ba]], {ba, 2, x + 1}], True], {x, 1, 200}]

A175994 Decimal expansion of the definite integral of y=x^(1/x) for x=0 to e, the only maximum of this graph.

Original entry on oeis.org

2, 6, 6, 1, 8, 2, 5, 7, 0, 5, 3, 8, 0, 4, 1, 7, 8, 2, 8, 4, 9, 7, 0, 3, 9, 3, 3, 7, 6, 5, 1, 3, 9, 5, 8, 3, 0, 2, 1, 4, 9, 7, 0, 8, 2, 0, 9, 8, 3, 3, 0, 3, 5, 4, 8, 2, 1, 4, 6, 7, 8, 4, 8, 5, 0, 9, 1, 4, 7, 0, 2, 1, 0, 6, 5, 7, 1, 7, 5, 1, 6, 6, 2, 4, 6, 8, 2, 8, 2, 9, 3, 5, 6, 2, 4, 3, 5, 1, 4, 0
Offset: 1

Author

Dylan Hamilton, Nov 05 2010

Keywords

Examples

			2.6618257053804178284970393376513958302149708209833035482146784850914702106571...
		

Crossrefs

Cf. A073229 (decimal expansion of e^(1/e)).

Programs

  • Mathematica
    RealDigits[ NIntegrate[ x^(1/x), {x, 0, E}, WorkingPrecision -> 105]][[1]] (* Jean-François Alcover, Nov 07 2012 *)

A175998 Decimal expansion of (e-1)*(e^(1/e)-1) - int(x^(1/x)-1, x=1..e).

Original entry on oeis.org

1, 7, 4, 0, 1, 7, 6, 2, 9, 0, 5, 2, 8, 8, 3, 0, 0, 3, 2, 3, 8, 4, 1, 1, 4, 4, 6, 2, 2, 6, 1, 6, 9, 0, 6, 1, 5, 3, 2, 7, 3, 0, 5, 3, 8, 9, 3, 0, 0, 6, 3, 4, 8, 1, 6, 8, 9, 1, 0, 5, 2, 6, 0, 2, 5, 4, 0, 3, 1, 1, 9, 0, 7, 9, 4, 2, 1, 0, 8, 6, 4, 6, 4, 3, 4, 5, 9, 4, 2, 6, 3, 0, 4, 5, 2, 9, 7, 2, 5, 0
Offset: 0

Author

Dylan Hamilton, Nov 05 2010

Keywords

Comments

Area contained by y=x^(1/x), x=e, and y=1.
Difference between the numbers defined in A175996 and A175997.

Examples

			0.174017629052883003238411446226169...
		

Crossrefs

Programs

  • PARI
    e=exp(1); (e-1)*(e^(1/e)-1)-intnum(x=1,e,x^(1/x)-1)  \\ - M. F. Hasler, Nov 27 2012

A176000 Decimal expansion of 1 - A175999.

Original entry on oeis.org

6, 4, 6, 5, 0, 3, 1, 9, 9, 2, 9, 8, 5, 7, 7, 9, 4, 4, 5, 3, 4, 1, 6, 3, 6, 2, 9, 7, 9, 3, 3, 0, 1, 7, 5, 4, 9, 0, 9, 7, 4, 3, 1, 9, 9, 1, 9, 1, 2, 2, 6, 0, 0, 6, 1, 9, 2, 1, 9, 2, 0, 7, 5, 3, 9, 2, 1, 9, 9, 8, 1, 5, 4, 0, 2, 9, 9, 7, 4, 6, 6, 0, 9, 5, 9, 5, 9, 7, 0, 9, 3, 5, 7, 2, 3, 4, 9, 0, 8, 0
Offset: 0

Author

Dylan Hamilton, Nov 05 2010

Keywords

Comments

Area contained by y=x^(1/x),x=1, and y=0

Crossrefs