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-10 of 12 results. Next

A033042 Sums of distinct powers of 5.

Original entry on oeis.org

0, 1, 5, 6, 25, 26, 30, 31, 125, 126, 130, 131, 150, 151, 155, 156, 625, 626, 630, 631, 650, 651, 655, 656, 750, 751, 755, 756, 775, 776, 780, 781, 3125, 3126, 3130, 3131, 3150, 3151, 3155, 3156, 3250, 3251, 3255, 3256, 3275, 3276, 3280, 3281, 3750, 3751
Offset: 0

Views

Author

Keywords

Comments

Numbers without any base-5 digits larger than 1.
a(n) modulo 2 is the Prouhet-Thue-Morse sequence A010060. - Philippe Deléham, Oct 17 2011
Values of k where A008977(k) does not end with 0. - Henry Bottomley, Nov 09 2022

Crossrefs

For generating functions Product_{k>=0} (1 + a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
Row 5 of array A104257.

Programs

  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 2)
            r += b * q
            b *= 5
        end
    r end; [a(n) for n in 0:49] |> println # Peter Luschny, Jan 03 2021
    
  • Maple
    a:= proc(n) local m, r, b; m, r, b:= n, 0, 1;
          while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*5 od; r
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 16 2013
  • Mathematica
    t = Table[FromDigits[RealDigits[n, 2], 5], {n, 1, 100}]
    (* Clark Kimberling, Aug 02 2012 *)
    FromDigits[#,5]&/@Tuples[{0,1},7] (* Harvey P. Dale, May 22 2018 *)
  • PARI
    a(n) = subst(Pol(binary(n)), 'x, 5);
    vector(50, i, a(i-1))  \\ Gheorghe Coserea, Sep 15 2015
    
  • PARI
    a(n)=fromdigits(binary(n),5) \\ Charles R Greathouse IV, Jan 11 2017
    
  • Python
    def A033042(n): return int(bin(n)[2:],5) # Chai Wah Wu, Oct 30 2024

Formula

a(n) = Sum_{i=0..m} d(i)*5^i, where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.
Numbers j such that the coefficient of x^j is > 0 in Product_{k>=0} (1 + x^(5^k)). - Benoit Cloitre, Jul 29 2003
a(n) = A097251(n)/4.
a(2n) = 5*a(n), a(2n+1) = a(2n)+1.
a(n) = Sum_{k>=0} A030308(n,k)*5^k. - Philippe Deléham, Oct 17 2011
liminf a(n)/n^(log(5)/log(2)) = 1/4 and limsup a(n)/n^(log(5)/log(2)) = 1. - Gheorghe Coserea, Sep 15 2015
G.f.: (1/(1 - x))*Sum_{k>=0} 5^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017

Extensions

Extended by Ray Chandler, Aug 03 2004

A097262 Numbers whose set of base 16 digits is {0,F}, where F base 16 = 15 base 10.

Original entry on oeis.org

0, 15, 240, 255, 3840, 3855, 4080, 4095, 61440, 61455, 61680, 61695, 65280, 65295, 65520, 65535, 983040, 983055, 983280, 983295, 986880, 986895, 987120, 987135, 1044480, 1044495, 1044720, 1044735, 1048320, 1048335, 1048560, 1048575
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 16 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..1110000] | Set(IntegerToSequence(n, 16)) subset {0, 15}]; // Vincenzo Librandi, Jun 05 2012
  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 15}, 16]; Array[f, 32, 0] (* or *)
    FromDigits[#, 16] & /@ Tuples[{0, 15}, 6] (* Harvey P. Dale, Sep 22 2011 *) (* or much slower *)
    fQ[n_] := Union@ Join[{0, 15}, IntegerDigits[n, 16]] == {0, 15}; Select[ Range[0, 11000000 ], fQ] (* Robert G. Wilson v, May 12 2012 *)

Formula

a(n) = 15*A033052(n).
a(2n) = 16*a(n), a(2n+1) = a(2n)+15.

A097256 Numbers whose set of base 10 digits is {0,9}.

Original entry on oeis.org

0, 9, 90, 99, 900, 909, 990, 999, 9000, 9009, 9090, 9099, 9900, 9909, 9990, 9999, 90000, 90009, 90090, 90099, 90900, 90909, 90990, 90999, 99000, 99009, 99090, 99099, 99900, 99909, 99990, 99999, 900000, 900009, 900090, 900099, 900900
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 10 for every i.

Crossrefs

Programs

  • Haskell
    a097256 n = a097256_list !! n
    a097256_list = map (* 9) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Maple
    A097256:=n->(9/2) * add((1-(-1)^floor(n/2^i))*10^i, i=0..n); seq(A097256(n), n=0..30); # Wesley Ivan Hurt, Feb 11 2014
  • Mathematica
    Table[(9/2) Sum[(1 - (-1)^Floor[n/2^i]) 10^i, {i, 0, n}], {n, 0, 30}] (* Wesley Ivan Hurt, Feb 11 2014 *)

Formula

a(n) = 9*A007088(n).
a(2n) = 10*a(n), a(2n+1) = a(2n)+9.

A097252 Numbers whose set of base 6 digits is {0,5}.

Original entry on oeis.org

0, 5, 30, 35, 180, 185, 210, 215, 1080, 1085, 1110, 1115, 1260, 1265, 1290, 1295, 6480, 6485, 6510, 6515, 6660, 6665, 6690, 6695, 7560, 7565, 7590, 7595, 7740, 7745, 7770, 7775, 38880, 38885, 38910, 38915, 39060, 39065, 39090, 39095, 39960, 39965
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 6 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..40000] | Set(IntegerToSequence(n, 6)) subset {0, 5}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,5},IntegerDigits[n,6]]=={0,5};Select[Range[0,40000],fQ] (* Vincenzo Librandi, May 25 2012 *)
    FromDigits[#,6]&/@Tuples[{ 0,5},6] (* Harvey P. Dale, Aug 15 2021 *)
  • Python
    def A079252(n): return 5*int(bin(n)[2:],6) # Chai Wah Wu, Apr 04 2025

Formula

a(n) = 5*A033043(n).
a(2n) = 6*a(n), a(2n+1) = a(2n)+5.

A097254 Numbers whose set of base 8 digits is {0,7}.

Original entry on oeis.org

0, 7, 56, 63, 448, 455, 504, 511, 3584, 3591, 3640, 3647, 4032, 4039, 4088, 4095, 28672, 28679, 28728, 28735, 29120, 29127, 29176, 29183, 32256, 32263, 32312, 32319, 32704, 32711, 32760, 32767, 229376, 229383, 229432, 229439, 229824
Offset: 1

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 8 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..250000] | Set(IntegerToSequence(n, 8)) subset {0, 7}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,7},IntegerDigits[n,8]]=={0,7};Select[Range[0,300000],fQ] (* Vincenzo Librandi, May 25 2012 *)
    FromDigits[#,8]&/@Tuples[{0,7},6] (* Harvey P. Dale, Aug 10 2021 *)
  • Maxima
    a[1]:0$ a[n]:=8*a[floor((n+1)/2)]+7*(1+(-1)^n)/2$ makelist(a[n], n, 1, 37); /* Bruno Berselli, May 25 2012 */
    
  • PARI
    a(n) = 7*fromdigits(binary(n-1), 8) \\ Rémy Sigrist, Dec 06 2018

Formula

a(n) = 7*A033045(n-1).
a(2n-1) = 8*a(n), a(2n) = 8*a(n)+7.

A097261 Numbers whose set of base 15 digits is {0,E}, where E base 15 = 14 base 10.

Original entry on oeis.org

0, 14, 210, 224, 3150, 3164, 3360, 3374, 47250, 47264, 47460, 47474, 50400, 50414, 50610, 50624, 708750, 708764, 708960, 708974, 711900, 711914, 712110, 712124, 756000, 756014, 756210, 756224, 759150, 759164, 759360, 759374, 10631250
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 15 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..4500000] | Set(IntegerToSequence(n, 15)) subset {0, 14}]; // Vincenzo Librandi, Jun 05 2012
  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 14}, 15]; Array[f, 33, 0] (* or *)
    FromDigits[#, 15] & /@ Tuples[{0, 14}, 6] (* Harvey P. Dale, Sep 22 2011 *) (* or much slower *)
    fQ[n_] := Union@ Join[{0, 14}, IntegerDigits[n, 15]] == {0, 14}; Select[ Range[0, 10634414 ], fQ] (* Robert G. Wilson v, May 12 2012 *)

Formula

a(n) = 14*A033051(n).
a(2n) = 15*a(n), a(2n+1) = a(2n)+14.

A097253 Numbers whose set of base 7 digits is {0,6}.

Original entry on oeis.org

0, 6, 42, 48, 294, 300, 336, 342, 2058, 2064, 2100, 2106, 2352, 2358, 2394, 2400, 14406, 14412, 14448, 14454, 14700, 14706, 14742, 14748, 16464, 16470, 16506, 16512, 16758, 16764, 16800, 16806, 100842, 100848, 100884, 100890, 101136
Offset: 1

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 7 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..200000] | Set(IntegerToSequence(n, 7)) subset {0, 6}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,6},IntegerDigits[n,7]]=={0,6};Select[Range[0,140000],fQ] (* Vincenzo Librandi, May 25 2012 *)
    FromDigits[#,7]&/@Tuples[{0,6},6] (* This program is several thousand times faster than the first program, above. *) (* Harvey P. Dale, Aug 12 2023 *)
  • Maxima
    a[0]:0$ a[n]:=7*a[floor(n/2)]+3*(1-(-1)^n)$ makelist(a[n], n, 0, 36); /* Bruno Berselli, May 25 2012 */

Formula

a(n) = 6*A033044(n).
a(2n) = 7*a(n), a(2n+1) = a(2n)+6.

Extensions

Offset corrected by Arkadiusz Wesolowski, Nov 09 2013

A097255 Numbers whose set of base 9 digits is {0,8}.

Original entry on oeis.org

0, 8, 72, 80, 648, 656, 720, 728, 5832, 5840, 5904, 5912, 6480, 6488, 6552, 6560, 52488, 52496, 52560, 52568, 53136, 53144, 53208, 53216, 58320, 58328, 58392, 58400, 58968, 58976, 59040, 59048, 472392, 472400, 472464, 472472, 473040
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 9 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..500000] | Set(IntegerToSequence(n, 9)) subset {0, 8}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,8},IntegerDigits[n,9]]=={0,8};Select[Range[0,500000],fQ] (* or *) FromDigits[#,9]&/@Tuples[{0,8},6](* Vincenzo Librandi, May 25 2012 *)
  • Maxima
    a[0]:0$ a[n]:=9*a[floor(n/2)]+4*(1-(-1)^n)$ makelist(a[n], n, 0, 36); /* Bruno Berselli, May 26 2012 */

Formula

a(n) = 8*A033046(n).
a(2n) = 9*a(n), a(2n+1) = a(2n)+8.

A097257 Numbers whose set of base 11 digits is {0,A}, where A base 11 = 10 base 10.

Original entry on oeis.org

0, 10, 110, 120, 1210, 1220, 1320, 1330, 13310, 13320, 13420, 13430, 14520, 14530, 14630, 14640, 146410, 146420, 146520, 146530, 147620, 147630, 147730, 147740, 159720, 159730, 159830, 159840, 160930, 160940, 161040, 161050, 1610510
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 11 for every i.

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 10}, 11]; Array[f, 33, 0] (* or much slower *)
    fQ[n_] := Union@ Join[{0, 10}, IntegerDigits[n, 11]] == {0, 10}; Select[ Range[0, 1610519], fQ] (* Robert G. Wilson v, May 12 2012 *)
    Join[{0},Union[Flatten[Table[FromDigits[#,11]&/@(Join[{10},#]&/@ Tuples[ {10,0},n]),{n,0,5}]]]] (* Harvey P. Dale, Sep 23 2013 *)
  • PARI
    {for(vv=0,32,
    bvv=binary(vv);
    texp=0;btb=0;
    forstep(i=length(bvv),1,-1,btb=btb+10*bvv[i]*11^texp;texp++);
    print1(btb,", ") )} \\ Douglas Latimer, May 12 2012

Formula

a(n) = 10*A033047(n).
a(2n) = 11*a(n), a(2n+1) = a(2n)+10.

A097258 Numbers whose set of base 12 digits is {0,B}, where B base 12 = 11 base 10.

Original entry on oeis.org

0, 11, 132, 143, 1584, 1595, 1716, 1727, 19008, 19019, 19140, 19151, 20592, 20603, 20724, 20735, 228096, 228107, 228228, 228239, 229680, 229691, 229812, 229823, 247104, 247115, 247236, 247247, 248688, 248699, 248820, 248831, 2737152
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 12 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..2800000] | Set(IntegerToSequence(n, 12)) subset {0, 11}]; // Vincenzo Librandi, May 26 2012
  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 11}, 12]; Array[f, 33, 0] (* or much slower *)
    fQ[n_] := Union@ Join[{0, 11}, IntegerDigits[n, 12]] == {0, 11}; Select[ Range[0, 27370162], fQ] (* Robert G. Wilson v, May 12 2012 *)
    FromDigits[#,12]&/@Tuples[{0,11},6] (* Vincenzo Librandi, May 26 2012 *)

Formula

a(n) = 11*A033048(n).
a(2n) = 12*a(n), a(2n+1) = a(2n)+11.
Showing 1-10 of 12 results. Next