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.

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).

A102491 Numbers whose base-20 representation can be written with decimal digits.

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, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 120, 121, 122, 123, 124, 125, 126
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Comments

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

Crossrefs

Complement of A102492; Cf. A102487, A102489, A102493. Cf. A037454, A037462, A007091.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102491 n = a102491_list !! (n-1)
    a102491_list = filter (all (<= 9) . unfoldr
       (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 20)) [0..]
    -- Reinhard Zumkeller, Jun 27 2013
    
  • Maple
    seq(n + (1/2)*add(20^k*floor(n/10^k), k = 1..floor(ln(n)/ln(10))), n = 1..100); # Peter Bala, Dec 01 2016
  • Mathematica
    Select[Range@ 126, Total@ Take[Most@ DigitCount[#, 20], -10] == 0 &] (* Michael De Vlieger, Apr 09 2016 *)
  • PARI
    isok(n) = (n==0) || ((d=digits(n, 20)) && (vecmax(d) < 10)); \\ Michel Marcus, Apr 09 2016
    
  • PARI
    a(n) = fromdigits(digits(n-1),20) \\ Ruud H.G. van Tol, Dec 08 2022
  • Python
    A102491_list = [int(str(x), 20) for x in range(10**6)] # Chai Wah Wu, Apr 09 2016
    

Formula

From Peter Bala, Dec 01 2016: (Start)
If n = Sum_{i = 0..m} d(i)*10^i is the decimal expansion of n then a(n+1) = Sum_{i = 0..m} d(i)*20^i.
a(n+1) = n + 1/2*Sum_{k >= 1} 20^k*floor(n/10^k). Cf. A037454, A037462 and A007091.
a(1) = 0; a(n+1) = 20*a(n/10+1) if n == 0 (mod 10) else a(n+1) = a(n) + 1. (End)
G.f. g(x) satisfies g(x) = 20*Sum_{1<=k<=9} x^k*g(x^10)/x^9 + Sum_{1<=k<=9} k*x^(k+1)/(1-x^10). - Robert Israel, Dec 01 2016

A033048 Sums of distinct powers of 12.

Original entry on oeis.org

0, 1, 12, 13, 144, 145, 156, 157, 1728, 1729, 1740, 1741, 1872, 1873, 1884, 1885, 20736, 20737, 20748, 20749, 20880, 20881, 20892, 20893, 22464, 22465, 22476, 22477, 22608, 22609, 22620, 22621, 248832, 248833, 248844, 248845, 248976
Offset: 0

Views

Author

Keywords

Comments

Numbers without any base-12 digits greater than 1.

Crossrefs

Subsequence of A102487.
Row 11 of array A104257.

Programs

  • Haskell
    import Data.List (unfoldr)
    a033048 n = a033048_list !! (n-1)
    a033048_list = filter (all (< 2) . unfoldr (\x ->
       if x == 0 then Nothing else Just $ swap $ divMod x 12)) [1..]
    -- Reinhard Zumkeller, Apr 17 2011
  • Mathematica
    With[{k = 12}, Map[FromDigits[#, k] &, Tuples[{0, 1}, 6]]] (* Michael De Vlieger, Oct 28 2022 *)
  • PARI
    {maxn=37;
    for(vv=0,maxn,
    bvv=binary(vv);
    ll=length(bvv);texp=0;btod=0;
    forstep(i=ll,1,-1,btod=btod+bvv[i]*12^texp;texp++);
    print1(btod,", "))}
    \\ Douglas Latimer, Apr 16 2012
    
  • PARI
    a(n)=fromdigits(binary(n),12) \\ Charles R Greathouse IV, Jan 11 2017
    

Formula

a(n) = Sum_{i=0..m} d(i)*12^i, where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.
a(n) = A097258(n)/11.
a(2n) = 12*a(n), a(2n+1) = a(2n)+1.
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(k) = 12^k = A001021(k). - Philippe Deléham, Oct 19 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 12^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017

Extensions

Extended by Ray Chandler, Aug 03 2004

A102488 Numbers in base-12 representation that cannot be written with decimal digits.

Original entry on oeis.org

10, 11, 22, 23, 34, 35, 46, 47, 58, 59, 70, 71, 82, 83, 94, 95, 106, 107, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 154, 155, 166, 167, 178, 179, 190, 191, 202, 203, 214
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Examples

			143 = 11*12^1 + 11*12^0 = 'BB', therefore 143 is a term.
		

Crossrefs

Complement of A102487; A102490, A102492, A102494.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102488 n = a102488_list !! (n-1)
    a102488_list = filter (any (> 9) . unfoldr (\x ->
       if x == 0 then Nothing else Just $ swap $ divMod x 12)) [1..]
    -- Reinhard Zumkeller, Apr 18 2011
  • Mathematica
    Select[Range[250],Max[IntegerDigits[#,12]]>9&] (* Harvey P. Dale, Oct 20 2020 *)

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 *)

A055983 a(n+1) = a(n) converted to base 10 from base 12.

Original entry on oeis.org

10, 12, 14, 16, 18, 20, 24, 28, 32, 38, 44, 52, 62, 74, 88, 104, 148, 200, 288, 392, 542, 770, 1092, 1838, 2924, 4780, 8016, 13842, 27122, 53738, 109916, 265698, 631700, 1557936, 4347258, 12785828, 43721312, 154070654, 621230752, 2655100718
Offset: 0

Views

Author

Henry Bottomley, Jun 01 2000

Keywords

Crossrefs

Programs

  • Haskell
    a055983 n = a055983_list !! (n-1)
    a055983_list = iterate (a102487 . (+ 1)) 10  -- Reinhard Zumkeller, Aug 29 2013
  • Mathematica
    NestList[FromDigits[IntegerDigits[#],12]&,10,40] (* Vincenzo Librandi, Apr 06 2012 *)

Formula

a(n+1) = A102487(a(n)+1), a(1) = 8. - Reinhard Zumkeller, Aug 29 2013

A031344 Write primes in base 10 but interpret as if in base 12.

Original entry on oeis.org

2, 3, 5, 7, 13, 15, 19, 21, 27, 33, 37, 43, 49, 51, 55, 63, 69, 73, 79, 85, 87, 93, 99, 105, 115, 145, 147, 151, 153, 159, 175, 181, 187, 189, 201, 205, 211, 219, 223, 231, 237, 241, 253, 255, 259, 261, 301, 315, 319, 321, 327, 333, 337, 349, 355
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    A102487 := proc(n) local dgs; dgs := convert(n,base,10) ; add(op(d,dgs)*12^(d-1), d=1..nops(dgs)) ; end proc:
    A031344 := proc(n) A102487(ithprime(n)) ; end proc: # R. J. Mathar, Apr 09 2011

Formula

a(n) = A102487(A000040(n)). - R. J. Mathar, Apr 09 2011

A113016 Primes that remain primes when their decimal representation is interpreted duodecimally.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 31, 37, 61, 67, 107, 131, 157, 167, 181, 241, 251, 271, 277, 307, 347, 397, 401, 421, 431, 457, 541, 557, 577, 587, 617, 647, 661, 701, 727, 751, 797, 881, 907, 971, 1021, 1051, 1061, 1087, 1151, 1201, 1231, 1297, 1301, 1367, 1471, 1601
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 11 2005

Keywords

Examples

			A000040(19) = 67 -> 6*12^1 + 7*12^0 = 72 + 7 = 79 = A000040(22).
		

Crossrefs

Programs

  • Mathematica
    Select[ Prime[ Range[256]], PrimeQ[ FromDigits[ IntegerDigits[ # ], 12]] &] (* Robert G. Wilson v, Oct 12 2005 *)

A113017 Primes that become composites when their decimal representation is interpreted duodecimally.

Original entry on oeis.org

13, 19, 23, 29, 41, 43, 47, 53, 59, 71, 73, 79, 83, 89, 97, 101, 103, 109, 113, 127, 137, 139, 149, 151, 163, 173, 179, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 257, 263, 269, 281, 283, 293, 311, 313, 317, 331, 337, 349, 353, 359, 367, 373, 379, 383
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 11 2005

Keywords

Examples

			A000040(25)=97 -> 9*12^1+7*12^0=108+7=115=5*23.
		

Crossrefs

Showing 1-9 of 9 results.