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

A004086 Read n backwards (referred to as R(n) in many sequences).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 2, 12, 22, 32, 42, 52, 62, 72, 82, 92, 3, 13, 23, 33, 43, 53, 63, 73, 83, 93, 4, 14, 24, 34, 44, 54, 64, 74, 84, 94, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 6, 16, 26, 36, 46, 56, 66, 76, 86, 96, 7, 17, 27, 37, 47
Offset: 0

Views

Author

Keywords

Comments

Also called digit reversal of n.
Leading zeros (after the reversal has taken place) are omitted. - N. J. A. Sloane, Jan 23 2017

Crossrefs

Programs

  • Haskell
    a004086 = read . reverse . show  -- Reinhard Zumkeller, Apr 11 2011
    
  • J
    |.&.": i.@- 1e5 NB. Stephen Makdisi, May 14 2018
  • Maple
    read transforms; A004086 := digrev; #cf "Transforms" link at bottom of page
    A004086:=proc(n) local s,t; if n<10 then n else s:=irem(n,10,'t'); while t>9 do s:=s*10+irem(t,10,'t') od: s*10+t fi end; # M. F. Hasler, Jan 29 2012
  • Mathematica
    Table[FromDigits[Reverse[IntegerDigits[n]]], {n, 0, 75}]
    IntegerReverse[Range[0,80]](* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2018 *)
  • PARI
    dig(n) = {local(m=n,r=[]); while(m>0,r=concat(m%10,r);m=floor(m/10));r}
    A004086(n) = {local(b,m,r);r=0;b=1;m=dig(n);for(i=1,matsize(m)[2],r=r+b*m[i];b=b*10);r} \\ Michael B. Porter, Oct 16 2009
    
  • PARI
    A004086(n)=fromdigits(Vecrev(digits(n))) \\ M. F. Hasler, Nov 11 2010, updated May 11 2015, Sep 13 2019
    
  • Python
    def A004086(n):
        return int(str(n)[::-1]) # Chai Wah Wu, Aug 30 2014
    

Formula

For n > 0, a(a(n)) = n iff n mod 10 != 0. - Reinhard Zumkeller, Mar 10 2002
a(n) = d(n,0) with d(n,r) = r if n=0, otherwise d(floor(n/10), r*10+(n mod 10)). - Reinhard Zumkeller, Mar 04 2010
a(10*n+x) = x*10^m + a(n) if 10^(m-1) <= n < 10^m and 0 <= x <= 9. - Robert Israel, Jun 11 2015

Extensions

Extended by Ray Chandler, Dec 30 2004

A255691 Convert n to base 6, move the most significant digit to the least significant one and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 7, 13, 19, 25, 31, 2, 8, 14, 20, 26, 32, 3, 9, 15, 21, 27, 33, 4, 10, 16, 22, 28, 34, 5, 11, 17, 23, 29, 35, 1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61, 67, 73, 79, 85, 91, 97, 103, 109, 115, 121, 127, 133, 139, 145, 151, 157, 163, 169, 175
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(6*n) = 1.
Fixed points of the transform are listed in A048331.

Examples

			16 in base 6 is 24: moving the most significant digit as the least significant one we have 42 that is 26 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 1 to nops(a)-1 do b:=[op(b),a[k]]; od; a:=[a[nops(a)],op(b)];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,6);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Append[Rest@ w, First@ w]]; b = 6; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 65]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateLeft[IntegerDigits[n,6]],6],{n,0,70}] (* Harvey P. Dale, Mar 02 2023 *)

A055952 n + reversal of base 6 digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 7, 14, 21, 28, 35, 42, 14, 21, 28, 35, 42, 49, 21, 28, 35, 42, 49, 56, 28, 35, 42, 49, 56, 63, 35, 42, 49, 56, 63, 70, 37, 74, 111, 148, 185, 222, 49, 86, 123, 160, 197, 234, 61, 98, 135, 172, 209, 246, 73, 110, 147, 184, 221, 258, 85, 122, 159, 196
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of digits in base 6 then a(n) is a multiple of 7.

Crossrefs

Cf. A056964.

Programs

  • Mathematica
    Table[n + IntegerReverse[n, 6], {n, 0, 100}] (* Paolo Xausa, Aug 08 2024 *)

Formula

a(n) = n + A030105(n).

A255591 Convert n to base 6, move least significant digit to most significant digit and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 7, 13, 19, 25, 31, 2, 8, 14, 20, 26, 32, 3, 9, 15, 21, 27, 33, 4, 10, 16, 22, 28, 34, 5, 11, 17, 23, 29, 35, 6, 42, 78, 114, 150, 186, 7, 43, 79, 115, 151, 187, 8, 44, 80, 116, 152, 188, 9, 45, 81, 117, 153, 189, 10, 46, 82, 118, 154, 190, 11
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(6*n) = n.
Fixed points of the transform are listed in A048331.

Examples

			16 in base 6 is 24: moving the least significant digit to the most significant one we have 42 that is 26 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,6);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 6; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 66]) (* Michael De Vlieger, Mar 04 2015 *)
  • Python
    def A255591(n):
        x=A007092(n)
        return int(x[-1]+x[:-1],6) # Indranil Ghosh, Feb 03 2017

A346113 Base-10 numbers k whose number of divisors equals the number of divisors in R(k), where k is written in all bases from base-2 to base-10 and R(k), the digit reversal of k, is read as a number in the same base.

Original entry on oeis.org

1, 9077, 10523, 10838, 30182, 58529, 73273, 77879, 83893, 244022, 303253, 303449, 304853, 329893, 332249, 334001, 334417, 335939, 336083, 346741, 374617, 391187, 504199, 512695, 516982, 595274, 680354, 687142, 758077, 780391, 792214, 854669, 946217, 948539, 995761, 1008487, 1377067, 1389341
Offset: 1

Views

Author

Scott R. Shannon, Jul 05 2021

Keywords

Comments

There are 633 terms below 50 million and 1253 terms below 100 million. All of those have tau(k), the number of divisors of k, equal to 1, 2, 4, 8 or 16. The first term where tau(k) = 2 is n = 93836531, a prime, which is also the first term of A136634. All terms in A136634 will appear in this sequence, as will all terms in A228768(n) for n>=10. The first term with tau(k) = 4 is 9077, the first with tau(k) = 8 is 595274, and the first with tau(k) = 16 is 5170182. It is possible tau(k) must equal 2^i, with i>=0, although this is unknown.
All known terms are squarefree. - Michel Marcus, Jul 07 2021

Examples

			9077 is a term as the number of divisors of 9077 = tau(9077) = 4, and this equals the number of divisors of R(9077) when written and then read as a base-j number, with 2 <= j <= 10. See the table below for k = 9077.
.
  base | k_base         | R(k_base)      | R(k_base)_10  | tau(R(k_base)_10)
----------------------------------------------------------------------------------
   2   | 10001101110101 | 10101110110001 | 11185         | 4
   3   | 110110012      | 210011011      | 15421         | 4
   4   | 2031311        | 1131302        | 6002          | 4
   5   | 242302         | 203242         | 6697          | 4
   6   | 110005         | 500011         | 38887         | 4
   7   | 35315          | 51353          | 12533         | 4
   8   | 21565          | 56512          | 23882         | 4
   9   | 13405          | 50431          | 33157         | 4
  10   | 9077           | 7709           | 7709          | 4
		

Crossrefs

Cf. A136634 (prime terms), A228768.
Subsequence of A062895.

Programs

  • Mathematica
    Select[Range@100000,Length@Union@DivisorSigma[0,Join[{s=#},FromDigits[Reverse@IntegerDigits[s,#],#]&/@Range[2,10]]]==1&] (* Giorgos Kalogeropoulos, Jul 06 2021 *)
  • PARI
    isok(k) = {my(t= numdiv(k)); for (b=2, 10, my(d=digits(k, b)); if (numdiv(fromdigits(Vecrev(d), b)) != t, return (0));); return(1);} \\ Michel Marcus, Jul 06 2021

A055953 n - reversal of base 6 digits of n (written in base 10).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 5, 0, -5, -10, -15, -20, 10, 5, 0, -5, -10, -15, 15, 10, 5, 0, -5, -10, 20, 15, 10, 5, 0, -5, 25, 20, 15, 10, 5, 0, 35, 0, -35, -70, -105, -140, 35, 0, -35, -70, -105, -140, 35, 0, -35, -70, -105, -140, 35, 0, -35, -70, -105, -140, 35, 0, -35, -70, -105, -140, 35, 0, -35, -70, -105, -140, 70, 35, 0, -35, -70
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

a(n) is a multiple of 5.

Crossrefs

Programs

  • Mathematica
    Table[n - IntegerReverse[n, 6], {n, 0, 100}] (* Paolo Xausa, Aug 08 2024 *)

Formula

a(n) = n - A030105(n).
Showing 1-6 of 6 results.