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

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

Original entry on oeis.org

0, 1, 16, 17, 256, 257, 272, 273, 4096, 4097, 4112, 4113, 4352, 4353, 4368, 4369, 65536, 65537, 65552, 65553, 65792, 65793, 65808, 65809, 69632, 69633, 69648, 69649, 69888, 69889, 69904, 69905, 1048576, 1048577, 1048592, 1048593, 1048832
Offset: 0

Views

Author

Keywords

Comments

Numbers whose set of base 16 digits is {0,1}.
a(n) = Xpower(n,4). - Antti Karttunen, Apr 26 1999
Sums of distinct powers of 16.
For every nonnegative n, A000695(n) is a unique sum of the form a(k) + 4a(l). Thus every nonnegative n is a unique sum of the form a(p) + 2a(q) + 4a(r) + 8a(s). This gives a one-to-one map of the set N_0 of all nonnegative integers to (N_0)^4. Furthermore, if, for a fixed positive integer m, to consider all sums of distinct powers of 4^m, then one can obtain a one-to-one map of the set N_0 to (N_0)^(2^m). - Vladimir Shevelev, Nov 14 2008

Crossrefs

Column 4 of A048723. Row 15 of array A104257.

Programs

Formula

a(n) = Sum_{i=0..m} d(i)*16^i, where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.
a(n) = A097262(n)/15.
a(2n) = 16*a(n), a(2n+1) = a(2n)+1.
a(n) = Sum_{k>=0} A030308(n,k)*16^k. - Philippe Deléham, Oct 19 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 16^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017
a(n) = A000695(A000695(n)). - Alan Michael Gómez Calderón, Mar 23 2025

Extensions

Extended by Ray Chandler, Aug 03 2004
Simpler definition from Ralf Stephan, Jun 18 2005

A104257 Square array T(a,n) read by antidiagonals: replace 2^i with a^i in binary representation of n, where a,n >= 2.

Original entry on oeis.org

2, 3, 3, 4, 4, 4, 5, 5, 9, 5, 6, 6, 16, 10, 6, 7, 7, 25, 17, 12, 7, 8, 8, 36, 26, 20, 13, 8, 9, 9, 49, 37, 30, 21, 27, 9, 10, 10, 64, 50, 42, 31, 64, 28, 10, 11, 11, 81, 65, 56, 43, 125, 65, 30, 11, 12, 12, 100, 82, 72, 57, 216, 126, 68, 31, 12, 13, 13, 121, 101, 90, 73, 343
Offset: 2

Views

Author

Ralf Stephan, Mar 05 2005

Keywords

Comments

Sums of distinct powers of a. Numbers having only {0,1} in a-ary representation.

Examples

			Array begins:
  2,  3,  4,  5,  6,  7,   8,   9, ...
  3,  4,  9, 10, 12, 13,  27,  28, ...
  4,  5, 16, 17, 20, 21,  64,  65, ...
  5,  6, 25, 26, 30, 31, 125, 126, ...
  6,  7, 36, 37, 42, 43, 216, 217, ...
  7,  8, 49, 50, 56, 57, 343, 344, ...
  8,  9, 64, 65, 72, 73, 512, 513, ...
  9, 10, 81, 82, 90, 91, 729, 730, ...
  ...
		

Crossrefs

Programs

  • Mathematica
    T[, 0] = 0; T[2, n] := n; T[a_, 2] := a;
    T[a_, n_] := T[a, n] = If[EvenQ[n], a T[a, n/2], a T[a, (n-1)/2]+1];
    Table[T[a-n+2, n], {a, 2, 13}, {n, 2, a}] // Flatten (* Jean-François Alcover, Feb 09 2021 *)
  • PARI
    T(a, n) = fromdigits(binary(n), a); \\ Michel Marcus, Aug 19 2022
  • Python
    def T(a, n): return n if n < 2 else (max(a, n) if min(a, n) == 2 else a*T(a, n//2) + n%2)
    print([T(a-n+2, n) for a in range(2, 14) for n in range(2, a+1)]) # Michael S. Branicky, Aug 02 2022
    

Formula

T(a, n) = (1/(a-1))*Sum_{j>=1} floor((n+2^(j-1))/2^j) * ((a-2)*a^(j-1) + 1).
T(a, n) = (1/(a-1))*Sum_{j=1..n} ((a-2)*a^A007814(j) + 1).
G.f. of a-th row: (1/(1-x)) * Sum_{k>=0} a^k*x^2^k/(1+x^2^k).
Recurrence: T(a, 2n) = a*T(a, n), T(a, 2n+1) = a*T(a, n) + 1, T(a, 0) = 0.

A063012 Sum of distinct powers of 20; i.e., numbers with digits in {0,1} base 20; i.e., write n in base 2 and read as if written in base 20.

Original entry on oeis.org

0, 1, 20, 21, 400, 401, 420, 421, 8000, 8001, 8020, 8021, 8400, 8401, 8420, 8421, 160000, 160001, 160020, 160021, 160400, 160401, 160420, 160421, 168000, 168001, 168020, 168021, 168400, 168401, 168420, 168421, 3200000, 3200001, 3200020, 3200021, 3200400, 3200401
Offset: 0

Views

Author

Henry Bottomley, Jul 04 2001

Keywords

Examples

			a(5) = 401 since 5 written in base 2 is 101 so a(5) = 1*20^2 + 0*20^1 + 1*20^0 = 400 + 0 + 1 = 401.
		

Crossrefs

A063013 is similar in a different way.

Programs

  • Maple
    a:= proc(n) `if`(n<2, n, irem(n, 2, 'r')+20*a(r)) end:
    seq(a(n), n=0..37);  # Alois P. Heinz, Apr 04 2025
  • Mathematica
    Table[FromDigits[IntegerDigits[n,2],20],{n,0,40}] (* Harvey P. Dale, Jul 21 2014 *)
  • PARI
    baseE(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) }
    baseI(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-10*(x\10); x\=10; e+=d*f; f*=b); return(e) }
    { for (n=0, 1000, write("b063012.txt", n, " ", baseI(baseE(n, 2), 20)) ) } \\ Harry J. Smith, Aug 15 2009
    
  • Python
    def A063012(n): return int(bin(n)[2:],20) # Chai Wah Wu, Apr 04 2025

Formula

a(n) = a(n-2^floor(log_2(n))) + 20^floor(log_2(n)). a(2n) = 20*a(n); a(2n+1) = a(2n)+1 = 20*a(n)+1.
a(n) = Sum_{k>=0} A030308(n,k)*A009964(k). - Philippe Deléham, Oct 15 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 20^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

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.
Showing 1-4 of 4 results.