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.

Previous Showing 21-30 of 46 results. Next

A332520 Fixed points of A331364.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 10, 12, 15, 16, 17, 32, 34, 48, 51, 64, 68, 80, 85, 128, 136, 160, 170, 192, 204, 240, 255, 256, 257, 512, 514, 768, 771, 1024, 1028, 1280, 1285, 2048, 2056, 2560, 2570, 3072, 3084, 3840, 3855, 4096, 4112, 4352, 4369, 8192, 8224, 8704
Offset: 1

Views

Author

Rémy Sigrist, Jun 24 2020

Keywords

Comments

These are the numbers with at most one kind of nonzero digit in any base of the form 2^2^k (with k >= 0).
If k belongs to the sequence, then A001196(k) also belongs to the sequence, and conversely.
For any positive term m:
- the number of runs of consecutive 1's in the binary representation of m is a power of 2,
- the runs of consecutive 1's in the binary representation of m have all the same length, a power of 2.
Apparently, for any k >= 0, there are A001316(k) nonzero terms with 1+k binary digits.

Examples

			The first terms, alongside their binary representation, are:
  n   a(n)  bin(a(n))
  --  ----  ---------
   1     0          0
   2     1          1
   3     2         10
   4     3         11
   5     4        100
   6     5        101
   7     8       1000
   8    10       1010
   9    12       1100
  10    15       1111
  11    16      10000
  12    17      10001
  13    32     100000
  14    34     100010
  15    48     110000
  16    51     110011
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A350094 a(n) = Sum_{k=0..n} n CNIMPL k where CNIMPL = NOT(n) AND k is the bitwise logical converse non-implication operator (A102037).

Original entry on oeis.org

0, 0, 1, 0, 6, 4, 3, 0, 28, 24, 21, 16, 18, 12, 7, 0, 120, 112, 105, 96, 94, 84, 75, 64, 84, 72, 61, 48, 42, 28, 15, 0, 496, 480, 465, 448, 438, 420, 403, 384, 396, 376, 357, 336, 322, 300, 279, 256, 360, 336, 313, 288, 270, 244, 219, 192, 196, 168, 141, 112
Offset: 0

Views

Author

Kevin Ryde, Dec 14 2021

Keywords

Comments

The effect of NOT(n) AND k is to retain from k only those bits where n has a 0-bit. Conversely n AND k retains from k those bits where n has a 1-bit. Together they are all bits of k so that a(n) + A222423(n) = Sum_{k=0..n} k = n*(n+1)/2.

Crossrefs

Row sums of A102037.
Cf. A001196 (bit doubling).
Other sums: A222423 (AND), A350093 (OR), A224915 (XOR), A265736 (IMPL).

Programs

  • Maple
    with(Bits): cnimp := (n, k) -> And(Not(n), k):
    seq(add(cnimp(n, k), k = 0..n), n = 0..59); # Peter Luschny, Dec 14 2021
  • PARI
    a(n) = (3*fromdigits(binary(n),4) - n^2 - 2*n)/4;

Formula

a(n) = (A001196(n) - n*(n+2))/4.
a(2*n) = 4*a(n) + n.
a(2*n+1) = 4*a(n).

A371459 For any positive integer with binary digits (b_1, ..., b_w) (where b_1 = 1), the binary digits of a(n), possibly with leading zeros, are (b_2, b_4, ..., b_{floor(w/2) * 2}); a(0) = 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 2, 3, 2, 3, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 4, 5, 4, 5, 6, 7, 6, 7, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 0, 0, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Rémy Sigrist, Mar 24 2024

Keywords

Comments

In other words, we keep even-indexed bits.
Every integer appears infinitely many times in the sequence.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      10          0
   3     1      11          1
   4     0     100          0
   5     0     101          0
   6     1     110          1
   7     1     111          1
   8     0    1000          0
   9     1    1001          1
  10     0    1010          0
  11     1    1011          1
  12     2    1100         10
  13     3    1101         11
  14     2    1110         10
  15     3    1111         11
  16     0   10000          0
		

Crossrefs

See A371442 for the sequence related to odd-indexed bits.
See A059906 and A063695 for similar sequences.

Programs

  • Mathematica
    A371459[n_] := FromDigits[IntegerDigits[n, 2][[2;;-1;;2]], 2];
    Array[A371459, 100, 0] (* Paolo Xausa, Mar 28 2024 *)
  • PARI
    a(n) = { my (b = binary(n)); fromdigits(vector(#b\2, k, b[2*k]), 2); }
    
  • Python
    def A371459(n): return int(bin(n)[3::2],2) if n>1 else 0 # Chai Wah Wu, Mar 27 2024

Formula

a(n) = 0 iff n belongs to A126684.
a(A000695(n)) = 0.
a(A001196(n)) = n.

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.

A097259 Numbers whose set of base 13 digits is {0,C}, where C base 13 = 12 base 10.

Original entry on oeis.org

0, 12, 156, 168, 2028, 2040, 2184, 2196, 26364, 26376, 26520, 26532, 28392, 28404, 28548, 28560, 342732, 342744, 342888, 342900, 344760, 344772, 344916, 344928, 369096, 369108, 369252, 369264, 371124, 371136, 371280, 371292, 4455516
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 13 for every i.

Crossrefs

Programs

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

Formula

a(n) = 12*A033049(n).
a(2n) = 13*a(n), a(2n+1) = a(2n)+12.

A097260 Numbers whose set of base 14 digits is {0,D}, where D base 14 = 13 base 10.

Original entry on oeis.org

0, 13, 182, 195, 2548, 2561, 2730, 2743, 35672, 35685, 35854, 35867, 38220, 38233, 38402, 38415, 499408, 499421, 499590, 499603, 501956, 501969, 502138, 502151, 535080, 535093, 535262, 535275, 537628, 537641, 537810, 537823, 6991712
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 14 for every i.

Crossrefs

Programs

  • Mathematica
    FromDigits[#,14]&/@Tuples[{0,13},6] (* Harvey P. Dale, Sep 22 2011 *)

Formula

a(n) = 13*A033050(n).
a(2n) = 14*a(n), a(2n+1) = a(2n)+13.

A129603 Replace in the binary expansion of n each run of k 0's (or 1's) with 2k-1 0's (or 1's).

Original entry on oeis.org

0, 1, 2, 7, 8, 5, 14, 31, 32, 17, 10, 23, 56, 29, 62, 127, 128, 65, 34, 71, 40, 21, 46, 95, 224, 113, 58, 119, 248, 125, 254, 511, 512, 257, 130, 263, 136, 69, 142, 287, 160, 81, 42, 87, 184, 93, 190, 383, 896, 449, 226, 455, 232, 117, 238, 479, 992, 497, 250, 503
Offset: 0

Views

Author

Antti Karttunen, May 01 2007

Keywords

Examples

			a(1) = 1, as 1 is 1 in binary and single runs stay intact (as 2*1 - 1 = 1). a(9) = 17, as 9 is 1001 in binary and keeping the most and the least significant runs as '1' and changing the center run '00' to '000', we get 10001 in binary, 17 in decimal.
		

Crossrefs

Previous Showing 21-30 of 46 results. Next