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.

A007091 Numbers in base 5.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 130, 131, 132, 133, 134, 140, 141, 142, 143, 144, 200, 201, 202, 203, 204, 210, 211, 212, 213, 214, 220, 221, 222, 223, 224, 230
Offset: 0

Views

Author

Keywords

Comments

From Rick L. Shepherd, Jun 25 2009: (Start)
Nonnegative integers with no decimal digit > 4.
Thus nonnegative integers in base 10 whose doubling by normal addition or multiplication requires no carry operation. (End)
It appears that this sequence corresponds to the numbers n for which twice the sum of digits of n is the sum of digits of 2*n. - Rémy Sigrist, Nov 22 2009

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007092 (base 6), A007093 (base 7), A007094 (base 8), A007095 (base 9).

Programs

  • Maple
    A007091 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n,base,5): return op(convert(l,base,10,10^nops(l))): end: seq(A007091(n),n=0..58); # Nathaniel Johnston, May 06 2011
  • Mathematica
    Table[ FromDigits[ IntegerDigits[n, 5]], {n, 0, 60}]
  • PARI
    a(n)=if(n<1,0,if(n%5,a(n-1)+1,10*a(n/5)))
    
  • PARI
    apply( A007091(n)=fromdigits(digits(n,5)), [0..66]) \\ M. F. Hasler, Nov 18 2019
    
  • Python
    from gmpy2 import digits
    def A007091(n): return int(digits(n,5)) # Chai Wah Wu, Dec 26 2021

Formula

a(0)=0 a(n)=10*a(n/5) if n==0 (mod 5) a(n)=a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
a(n) = n + 1/2*Sum_{k >= 1} 10^k*floor(n/5^k). Cf. A037454, A037462 and A102491. - Peter Bala, Dec 01 2016

A102489 Take the decimal representation of n and read it as if it were written in hexadecimal.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 112
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Comments

List of numbers in base-16 representation that can be written with decimal digits.
Early in the sequence there are blocks recurring as a(n) = a(n-10)+16, but this pattern starts to fail when we reach 160, 161, ... with hex-representations A0, A1, ... which cannot be written with decimal digits. - Rick L. Shepherd, Jun 08 2012
Binary Coded Decimal (BCD) codes, common in electronics, when interpreted as plain binary-coded integers. For example, number 39 is BCD coded in two nibbles as 0011 1001 which is the binary expansion of 57; hence, taking into account the offset, a(1+39) = 57. - Stanislav Sykora, Jun 09 2012
Integers that avoid letters in their hexadecimal expansion. - Eliora Ben-Gurion, Aug 28 2019

Examples

			10 in decimal is 16 in base 16, so a(10)=16.
		

Crossrefs

Cf. A090725 (the subsequence of primes).

Programs

  • Haskell
    import Data.Maybe (fromJust, mapMaybe)
    a102489 n = a102489_list !! (n-1)
    a102489_list = mapMaybe dhex [0..] where
       dhex 0                         = Just 0
       dhex x | d > 9 || y == Nothing = Nothing
              | otherwise             = Just $ 16 * fromJust y + d
              where (x', d) = divMod x 16; y = dhex x'
    -- Reinhard Zumkeller, Jul 06 2012
  • Maple
    o10:= n -> min(padic:-ordp(n,2),padic:-ordp(n,5)):
    d:= [0,seq((2*16^o10(n)+3)/5, n=1..1000)]:
    ListTools:-PartialSums(d); # Robert Israel, Aug 30 2015
  • Mathematica
    Table[FromDigits[IntegerDigits[n], 16], {n, 0, 70}] (* Ivan Neretin, Aug 12 2015 *)

Formula

a(n) - a(n-1) = (2*16^A122840(n) + 3)/5. - Robert Israel, Aug 30 2015

Extensions

Edited by N. J. A. Sloane, Feb 08 2014 (changed definition, moved old definition to comment, changed offset and b-file).

A102487 Numbers in base-12 representation that can be written with decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Comments

Numbers that are only in this sequence or only in A039274 but not in both are n= 131, 142, 275, 286, 419, 430 etc: see A039558. [From R. J. Mathar, Aug 30 2008]

Crossrefs

Complement of A102488; A102489, A102491, A102493.
Cf. A033048 (subsequence).

Programs

  • Haskell
    import Data.List (unfoldr)
    a102487 n = a102487_list !! (n-1)
    a102487_list = filter (all (< 10) . unfoldr (\x ->
       if x == 0 then Nothing else Just $ swap $ divMod x 12)) [0..]
    -- Reinhard Zumkeller, Apr 18 2011
    
  • Mathematica
    fQ[n_] := Last@ Union@ IntegerDigits[n, 12] < 10; Select[ Range[0, 86], fQ] (* Robert G. Wilson v, Apr 17 2012 *)
  • PARI
    {for(testn=0,87,
    lgt=1;
    for(i=1,1000,if(12^i > testn,lgt=i;break()));
    atst=testn;pasr=1;
    for(j=1,lgt,lasd=atst%12;
    if(lasd<10,atst=(atst-lasd)/12,pasr=0;break()));
    if(pasr==1,print1(testn,", ")))}
    \\ Douglas Latimer, Apr 17 2012
    
  • Python
    A102487_list = [int(str(x), 12) for x in range(10**6)] # Chai Wah Wu, Apr 09 2016

A037454 a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*3^i is the base 3 representation of n.

Original entry on oeis.org

0, 1, 2, 6, 7, 8, 12, 13, 14, 36, 37, 38, 42, 43, 44, 48, 49, 50, 72, 73, 74, 78, 79, 80, 84, 85, 86, 216, 217, 218, 222, 223, 224, 228, 229, 230, 252, 253, 254, 258, 259, 260, 264, 265, 266, 288, 289, 290, 294, 295, 296, 300, 301, 302, 432, 433, 434, 438
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 3)
            r += b * q
            b *= 6
        end
    r end; [a(n) for n in 0:57] |> println # Peter Luschny, Jan 03 2021
  • Maple
    seq(n + (1/2)*add(6^k*floor(n/3^k), k = 1..floor(ln(n)/ln(3))), n = 1..100); # Peter Bala, Dec 01 2016
  • Mathematica
    t = Table[FromDigits[RealDigits[n, 3], 6], {n, 0, 100}]
    (* Clark Kimberling, Aug 03 2012 *)

Formula

From Peter Bala, Dec 01 2016: (Start)
a(n) = n + 1/2*Sum_{k >= 1} 6^k*floor(n/3^k). Cf. A037462, A007091 and A102491.
a(0) = 0; a(n) = 6*a(n/3) if n == 0 (mod 3) else a(n) = a(n-1) + 1. (End)

Extensions

Offset changed to 0 by Clark Kimberling, Aug 03 2012

A102492 Numbers in base-20 representation that cannot be written with decimal digits.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 130, 131, 132, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Examples

			112 = 5*20^1 + 12*20^0 = '5C', therefore 112 is a term.
		

Crossrefs

Complement of A102491; A102488, A102490, A102494.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102492 n = a102492_list !! (n-1)
    a102492_list = filter (any (> 9) . unfoldr
       (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 20)) [0..]
    -- Reinhard Zumkeller, Jun 27 2013
  • Mathematica
    Select[Range[150],Max[IntegerDigits[#,20]]>9&] (* Harvey P. Dale, Mar 27 2021 *)

A102493 Numbers in base-60 representation that can be written with decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 300, 301, 302, 303, 304, 305, 306, 307, 308
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

References

  • Mohammad K. Azarian, Meftah al-hesab: A Summary, MJMS, Vol. 12, No. 2, Spring 2000, pp. 75-95. Mathematical Reviews, MR 1 764 526. Zentralblatt MATH, Zbl 1036.01002.
  • Mohammad K. Azarian, A Summary of Mathematical Works of Ghiyath ud-din Jamshid Kashani, Journal of Recreational Mathematics, Vol. 29(1), pp. 32-42, 1998.

Crossrefs

Complement of A102494; A102487, A102489, A102491.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102493 n = a102493_list !! (n-1)
    a102493_list = filter (all (<= 9) . unfoldr
       (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 60)) [0..]
    -- Reinhard Zumkeller, Jun 27 2013
  • Mathematica
    Table[Range[60n,60n+9],{n,0,6}]//Flatten (* Harvey P. Dale, Jul 06 2024 *)

A118761 Fixed points of permutations A118757, A118758, A118759 and A118760.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 119, 138, 157, 176, 195, 310, 339, 358, 377, 396, 559, 578, 597, 779, 798, 999, 3130
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

A118757(a(n)) = A118758(a(n)) = A118759(a(n)) = A118760(a(n)) = a(n);
a(n) = A024657(n-1) = A102491(n) for n<=50.

Crossrefs

Cf. A118767.

A024657 n written in fractional base 10/2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 220, 221, 222, 223, 224, 225, 226, 227
Offset: 0

Views

Author

Keywords

Comments

To represent a number in base b, if a digit exceeds b-1, subtract b and carry 1. In fractional base a/b, subtract a and carry b.
Also numbers which are written the same in base 20/2 as in base 10. The sequence consists of numbers which have digits in {0,2,4,6,8} except that the unit digit can be any from {0,1,2,3,4,5,6,7,8,9} - Henry Bottomley, Nov 17 2000

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, 10 * a[2 * Floor[n/10]] + Mod[n, 10]]; Array[a, 50, 0] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    a(n) = if(n == 0, 0, 10 * a(n\10 * 2) + n % 10); \\ Amiram Eldar, Aug 02 2025

Formula

a(n) = A118761(n+1) for n < 50. - Reinhard Zumkeller, May 01 2006

A037462 a(n) = Sum_{i = 0..m} d(i)*8^i, where Sum_{i = 0..m} d(i)*4^i is the base 4 representation of n.

Original entry on oeis.org

0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 64, 65, 66, 67, 72, 73, 74, 75, 80, 81, 82, 83, 88, 89, 90, 91, 128, 129, 130, 131, 136, 137, 138, 139, 144, 145, 146, 147, 152, 153, 154, 155, 192, 193, 194, 195, 200, 201, 202, 203, 208, 209, 210
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    seq(n + (1/2)*add(8^k*floor(n/4^k), k = 1..floor(ln(n)/ln(4))), n = 1..100); # Peter Bala, Dec 01 2016
  • Mathematica
    Table[FromDigits[RealDigits[n, 4], 8], {n, 0, 100}]
    (* Clark Kimberling, Aug 14 2012 *)

Formula

From Peter Bala, Dec 01 2016: (Start):
a(n) = n + 1/2*Sum_{k >= 1} 8^k*floor(n/4^k). Cf. A037454, A007091 and A102491.
a(0) = 0; a(n) = 8*a(n/4) if n == 0 (mod 4) else a(n) = a(n-1) + 1. (End)

Extensions

Offset changed to 0 by Clark Kimberling, Aug 14 2012
Showing 1-9 of 9 results.