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

A165032 a(n) = image of n under the base-5 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order).

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 0, 4, 8, 12, 8, 4, 0, 4, 8, 12, 8, 4, 0, 4, 16, 12, 8, 4, 0, 24, 24, 48, 72, 96, 24, 0, 24, 48, 72, 48, 24, 24, 48, 72, 72, 48, 48, 48, 72, 96, 72, 72, 72, 72, 48, 48, 48, 72, 96, 48, 24, 24, 48, 72, 48, 24, 0, 24, 48, 72, 48, 24, 24, 48, 96, 72, 48, 48, 48, 72, 72, 72
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Examples

			For n = 10, 10_10 = 20_5. So, a(10) = 20_5 - 2_5 = 10 - 2 = 8. - _Indranil Ghosh_, Feb 02 2017
		

Crossrefs

Cf. A165033.
In other bases: A164884 (base 2), A164993 (base 3), A165012 (base 4), A165051 (base 6), A165071 (base 7), A165090 (base 8), A165110 (base 9), A151949 (base 10).

Programs

  • Mathematica
    a[n_] := With[{dd = IntegerDigits[n, 5]}, FromDigits[ReverseSort[dd], 5] - FromDigits[Sort[dd], 5]];
    a /@ Range[0, 100] (* Jean-François Alcover, Jan 08 2020 *)

A151950 a(n) = A151949(n)/9.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 18 2009

Keywords

Crossrefs

In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9). [From Joseph Myers, Sep 05 2009]

Programs

  • PARI
    a(n) = my(d=digits(n)); (fromdigits(vecsort(d,,4)) - fromdigits(vecsort(d)))/9; \\ Michel Marcus, Sep 25 2018

Extensions

Extended by Joseph Myers, Aug 28 2009

A164994 A164993(n)/2.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 0, 4, 4, 8, 4, 0, 4, 8, 4, 4, 8, 8, 8, 8, 4, 4, 8, 4, 0, 13, 16, 29, 16, 13, 26, 29, 26, 29, 16, 13, 26, 13, 0, 13, 26, 13, 16, 29, 26, 29, 26, 13, 16, 29, 16, 13, 26, 29, 32, 29, 26, 29, 32, 29, 26, 29, 26, 29, 26, 13, 16, 29, 16, 13, 32, 29, 26, 29, 16, 13, 26
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A164993.
In other bases: A164884 (base 2), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165013 a(n) = A165012(n)/3.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 2, 1, 0, 1, 3, 2, 1, 0, 5, 5, 10, 15, 5, 0, 5, 10, 10, 5, 5, 10, 15, 10, 10, 10, 10, 10, 10, 15, 10, 5, 5, 10, 10, 5, 0, 5, 15, 10, 5, 5, 15, 15, 15, 15, 15, 10, 10, 10, 15, 10, 5, 5, 15, 10, 5, 0, 21, 25, 46, 67, 25, 21, 42, 63, 46, 42, 46, 67, 67, 63, 67, 71, 25, 21
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165012.
In other bases: A164884 (base 2), A164994 (base 3), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165052 A165051(n)/5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 2, 1, 0, 1, 2, 3, 3, 2, 1, 0, 1, 2, 4, 3, 2, 1, 0, 1, 5, 4, 3, 2, 1, 0, 7, 7, 14, 21, 28, 35, 7, 0, 7, 14, 21, 28, 14, 7, 7, 14, 21, 28, 21, 14, 14, 14, 21, 28, 28, 21, 21, 21, 21, 28, 35, 28, 28, 28, 28, 28, 14, 14, 14, 21, 28, 35, 14, 7, 7, 14, 21, 28, 14
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165051.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165072 A165071(n)/6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 5, 4, 3, 2, 1, 0, 1, 6, 5, 4, 3, 2, 1, 0, 8, 8, 16, 24, 32, 40, 48, 8, 0, 8, 16, 24, 32, 40, 16, 8, 8, 16, 24, 32, 40, 24, 16, 16, 16, 24, 32, 40, 32, 24, 24, 24, 24, 32, 40, 40, 32, 32, 32, 32
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165071.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165091 A165090(n)/7.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 2, 1, 0, 1, 2, 3, 4, 5, 3, 2, 1, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 2, 3, 5, 4, 3, 2, 1, 0, 1, 2, 6, 5, 4, 3, 2, 1, 0, 1, 7, 6, 5, 4, 3, 2, 1, 0, 9, 9, 18, 27, 36, 45, 54, 63, 9, 0, 9, 18, 27, 36, 45, 54, 18, 9, 9, 18, 27, 36, 45, 54, 27, 18, 18, 18, 27, 36
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165090.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165111 (base 9), A151950 (base 10).

A165111 A165110(n)/8.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 2, 1, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 6, 5, 4, 3, 2, 1, 0, 1, 2, 7, 6, 5, 4, 3, 2, 1, 0, 1, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 10, 20, 30, 40, 50, 60, 70, 80, 10, 0, 10, 20, 30, 40, 50
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165110.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A151950 (base 10).

A166517 a(n) = (3 + 5*(-1)^n + 6*n)/4.

Original entry on oeis.org

2, 1, 5, 4, 8, 7, 11, 10, 14, 13, 17, 16, 20, 19, 23, 22, 26, 25, 29, 28, 32, 31, 35, 34, 38, 37, 41, 40, 44, 43, 47, 46, 50, 49, 53, 52, 56, 55, 59, 58, 62, 61, 65, 64, 68, 67, 71, 70, 74, 73, 77, 76, 80, 79, 83, 82, 86, 85, 89, 88, 92, 91, 95, 94, 98, 97, 101, 100, 104, 103, 107
Offset: 0

Views

Author

Vincenzo Librandi, Oct 16 2009

Keywords

Comments

A sequence defined by a(1)=1, a(n)=k*n-a(n-1), k a constant parameter, has recurrence a(n)= 3*a(n-1) -3*a(n-2) +a(n-3). Its generating function is x*(1+2*(k-1)*x+(1-k)*x^2)/((1+x)*(1-x)^2). The closed form is a(n) = k*n/2+k/4+(-1)^n*(3*k/4-1). This applies with k=3 to this sequence here, and for example to sequences A165033, and A166519-A166525. - R. J. Mathar, Oct 17 2009
From Paul Curtz, Feb 20 2010: (Start)
Also: A001651, terms swapped by pairs.
a(n) mod 9 defines a period-6 sequence which is a permutation of A141425. (End)

Crossrefs

Programs

  • Magma
    [(3 +5*(-1)^n+6*n)/4: n in [0..80]]; // Vincenzo Librandi, Sep 13 2013
  • Mathematica
    CoefficientList[Series[(2 x^2 - x + 2)/((1 + x) (x - 1)^2), {x, 0, 80}], x] (* Harvey P. Dale, Mar 25 2011 *)
    Table[(3 + 5 (-1)^n + 6 n) / 4, {n, 0, 100}] (* Vincenzo Librandi, Sep 13 2013 *)

Formula

a(n) = 3*n - a(n-1).
From Paul Curtz, Feb 20 2010: (Start)
a(n+1)-a(n) = (-1)^(n+1)*A010685(n).
Second differences: |a(n+2)-2*a(n+1)+a(n)| = A010716(n).
a(2*n) + a(2*n+1) = A016945(n) = 6*n+3.
a(2*n) = A016945(n).
a(2*n+1) = A016777(n). (End)
G.f. ( 2-x+2*x^2 ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011
E.g.f.: (1/4)*exp(-x)*(5 + 3*exp(2*x) + 6*x*exp(2*x)). - G. C. Greubel, May 15 2016
Sum_{n>=0} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Feb 24 2023

Extensions

a(0)=2 added by Paul Curtz, Feb 20 2010
Showing 1-9 of 9 results.