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 11-20 of 198 results. Next

A144079 a(n) = the number of digits in the binary representation of n that equal the corresponding digit in the binary reversal of n. (I.e., a(n) = number of 0's in n XOR A030101(n).)

Original entry on oeis.org

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

Views

Author

Leroy Quet, Sep 09 2008

Keywords

Comments

A144078(n) + a(n) = A070939(n), the number of binary digits in n.

Examples

			20 in binary is 10100. Compare this with its digit reversal, 00101. XOR each pair of corresponding digits: 1 XOR 0 = 1, 0 XOR 0 = 0, 1 XOR 1 = 0, 0 XOR 0 = 0, 0 XOR 1 = 1. There are three bit pairs that contain the same values, so a(20) = 3.
		

Crossrefs

Programs

  • Maple
    A144079 := proc(n) local a,dgs,i; a := 0 ; dgs := convert(n,base,2) ; for i from 1 to nops(dgs) do if op(i,dgs)+op(-i,dgs) <> 1 then a := a+1 ; fi; od; RETURN(a) ; end: for n from 1 to 240 do printf("%d,",A144079(n)) ; od: # R. J. Mathar, Sep 14 2008
  • Mathematica
    Table[With[{c=IntegerDigits[n,2]},Count[BitXor[c,Reverse[c]],0]],{n,110}] (* Harvey P. Dale, Sep 03 2015 *)

Extensions

More terms from R. J. Mathar, Sep 14 2008

A331587 Odd numbers of the form k * reverse(k) (where reverse(k) is the binary reversal of k, A030101(k)).

Original entry on oeis.org

1, 9, 25, 49, 81, 143, 225, 289, 441, 475, 667, 729, 961, 1089, 1517, 1715, 2025, 2223, 2279, 2601, 2867, 3245, 3969, 4225, 5329, 5589, 6499, 6853, 7225, 7875, 8023, 8383, 8649, 9559, 9801, 9919, 10179, 11449, 11845, 11875, 13653, 14161, 16129, 16641, 19865
Offset: 1

Views

Author

Rémy Sigrist, Jan 21 2020

Keywords

Comments

A192775 is a subsequence.

Examples

			The binary representations of 11 and of 13 are "1011" and "1101", respectively, so 11*13 = 143 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = if (n%2, fordiv (n, d, if (d*fromdigits(Vecrev(binary(d)),2)==n, return (1)))); return (0)

A331588 a(n) is the least k such that A331587(n) = k * reverse(k) (where reverse(k) is the binary reversal of k, A030101(k)).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 15, 17, 21, 19, 23, 27, 31, 33, 37, 35, 45, 39, 43, 51, 47, 55, 63, 65, 73, 69, 67, 77, 85, 75, 71, 83, 93, 79, 99, 91, 87, 107, 103, 95, 111, 119, 127, 129, 137, 133, 153, 141, 149, 131, 165, 157, 139, 147, 135, 173, 163, 155, 143, 151, 189
Offset: 1

Views

Author

Rémy Sigrist, Jan 21 2020

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A030101(A331589(n)).
a(n) * A331589(n) = A331587(n).

A331589 a(n) is the greatest k such that A331587(n) = k * reverse(k) (where reverse(k) is the binary reversal of k, A030101(k)).

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 21, 25, 29, 27, 31, 33, 41, 49, 45, 57, 53, 51, 61, 59, 63, 65, 73, 81, 97, 89, 85, 105, 113, 101, 93, 121, 99, 109, 117, 107, 115, 125, 123, 119, 127, 129, 145, 161, 153, 177, 169, 193, 165, 185, 209, 201, 225, 181, 197, 217, 241
Offset: 1

Views

Author

Rémy Sigrist, Jan 21 2020

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A030101(A331588(n)).
a(n) * A331588(n) = A331587(n).

A331662 Odd composite numbers k such that the divisors of the binary reversal of k (A030101) are the binary reversals of the divisors of k.

Original entry on oeis.org

9, 15, 21, 27, 45, 51, 63, 85, 93, 95, 111, 119, 123, 125, 153, 187, 189, 219, 221, 255, 335, 365, 381, 485, 511, 597, 629, 655, 681, 697, 765, 771, 831, 965, 1011, 1139, 1241, 1285, 1389, 1461, 1533, 1535, 1563, 1649, 1731, 1791, 1799, 1983, 2031, 2043, 2045
Offset: 1

Views

Author

Amiram Eldar, Jan 23 2020

Keywords

Examples

			9 is a term since the binary representations of its divisors, 1, 3 and 9, are palindromic: 1, 11 and 1001, i.e., the binary reversals of themselves.
95 is a term since the binary representations of its divisors, 1, 5, 19 and 95, are 1, 101, 10011 and 1011111, and their binary reversals, 1, 101, 11001, 1111101, or  1, 5, 25 and 125 in decimal representation, are the divisors of 125, which is the binary reversal of 95.
		

Crossrefs

Cf. A030101.
A329419, A331663 and A331664 are subsequences.

Programs

  • Mathematica
    Select[Range[1, 2000, 2], CompositeQ[#] && (Divisors @ IntegerReverse[#, 2]) == IntegerReverse[Divisors[#], 2] &]

A331663 Odd composite numbers k with at least one divisor that is not a binary palindrome (A006995) such that the divisors of the binary reversal of k (A030101) are the binary reversals of the divisors of k.

Original entry on oeis.org

95, 111, 123, 125, 187, 221, 335, 485, 597, 629, 655, 681, 697, 831, 965, 1011, 1139, 1389, 1461, 1535, 1563, 1649, 1731, 1791, 1983, 2031, 2043, 2045, 2227, 2493, 2605, 2733, 2827, 2885, 2901, 3033, 3099, 3279, 3281, 3327, 3341, 3459, 3647, 3891, 4039, 4083
Offset: 1

Views

Author

Amiram Eldar, Jan 23 2020

Keywords

Examples

			95 is a term since the binary representations of its divisors, 1, 5, 19, and 95, are 1, 101, 10011 and 1011111, and their binary reversals, 1, 101, 11001 and 1111101, or  1, 5, 25 and 125 in decimal representation, are the divisors of 125, which is the binary reversal of 95, and 19 and 95 are not binary palindromes.
		

Crossrefs

Complement of A329419 with respect to A331662.
A331664 is a subsequence.

Programs

  • Mathematica
    binPalQ[n_] := PalindromeQ @ IntegerDigits[n, 2]; Select[Range[1, 4000, 2], CompositeQ[#] && (Divisors @ IntegerReverse[#, 2]) == IntegerReverse[(d = Divisors[#]), 2] && !AllTrue[Rest[d], binPalQ] &]

A331664 Odd composite numbers k all of whose divisors larger than 1 are not binary palindromes (A006995) such that the divisors of the binary reversal of k (A030101) are the binary reversals of the divisors of k.

Original entry on oeis.org

4847, 5371, 7141, 7913, 22891, 23243, 27053, 27469, 47863, 48599, 60349, 61277, 69211, 73343, 77251, 80623, 81863, 89339, 100201, 111841, 114293, 116729, 126649, 130289, 138623, 180163, 200693, 260833, 286141, 319381, 348121, 371899, 383339, 388561, 439517, 453037
Offset: 1

Views

Author

Amiram Eldar, Jan 23 2020

Keywords

Examples

			4847 is a term since the binary representations of its divisors, 1, 37, 131 and 4847, are 1, 100101, 10000011 and 1001011101111, and their binary reversals, 1, 101001, 11000001 and 1111011101001, or 1, 41, 193 and 7913 in decimal representation, are the divisors of 7913, and none of the divisors of 4847 except 1 are binary palindromes.
		

Crossrefs

Subsequence of A331662 and A331663.

Programs

  • Mathematica
    binPalQ[n_] := PalindromeQ @ IntegerDigits[n, 2]; Select[Range[1, 5*10^5, 2], CompositeQ[#] && (Divisors@IntegerReverse[#, 2]) == IntegerReverse[(d = Divisors[#]), 2] && !AnyTrue[Rest[d], binPalQ] &]

A340717 Lexicographically earliest sequence of nonnegative integers with as many distinct values as possible such that for any n >= 0, a(rev(n)) = a(n) (where rev(n) = A030101(n) corresponds to the binary reversal of n).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 8, 5, 9, 3, 10, 6, 11, 2, 9, 6, 12, 4, 11, 7, 13, 1, 14, 8, 15, 5, 16, 9, 17, 3, 16, 10, 18, 6, 19, 11, 20, 2, 15, 9, 21, 6, 18, 12, 22, 4, 17, 11, 22, 7, 20, 13, 23, 1, 24, 14, 25, 8, 26, 15, 27, 5, 28, 16
Offset: 0

Views

Author

Rémy Sigrist, Jan 17 2021

Keywords

Comments

The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> rev(x) do not merge, then a(m) <> a(n).

Examples

			The first terms, alongside rev(n), are:
  n   a(n)  rev(n)
  --  ----  ------
   0     0       0
   1     1       1
   2     1       1
   3     2       3
   4     1       1
   5     3       5
   6     2       3
   7     4       7
   8     1       1
   9     5       9
  10     3       5
  11     6      13
  12     2       3
  13     6      11
  14     4       7
  15     7      15
		

Crossrefs

See A340716 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(2*n) = a(n).
a(n) = 1 iff n is a power of 2.
a(n) = 2 iff n belongs to A007283.
a(n) = 3 iff n belongs to A020714.
a(n) = 4 iff n belongs to A005009.
a(n) = 5 iff n belongs to A005010.
a(A340718(n)) = n (and this is the first occurrence of n in the sequence).

A072800 Composition of A030101 and A014486. Binary encodings of parenthesizations, Dyck paths and other Catalan structures reversed.

Original entry on oeis.org

0, 1, 5, 3, 21, 13, 19, 11, 7, 85, 53, 77, 45, 29, 83, 51, 75, 43, 27, 71, 39, 23, 15, 341, 213, 309, 181, 117, 333, 205, 301, 173, 109, 285, 157, 93, 61, 339, 211, 307, 179, 115, 331, 203, 299, 171, 107, 283, 155, 91, 59, 327, 199, 295, 167, 103, 279, 151, 87, 55
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Comments

See A014486.

Crossrefs

Cf. A014486, A030101, A339570 (gives the denominators).

Programs

  • PARI
    isA014486(n) = { my(v=binary(n), t=0); for(i=1, #v, t+=if(v[i], 1, -1); if(t<0, return(0))); t==0; }; \\ From A014486
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    k=0; n=0; while(k<23714, if(isA014486(n), write("b072800.txt", k, " ", A030101(n)); k++); n++); \\ Antti Karttunen, Mar 28 2022

Formula

a(n) = A030101(A014486(n)).

A245599 Numbers m with A030101(m) XOR A030109(m) = m for the binary representation of m.

Original entry on oeis.org

1, 11, 91, 731, 5851, 46811, 374491, 2995931, 23967451, 191739611, 1533916891, 12271335131, 98170681051, 785365448411, 6282923587291, 50263388698331, 402107109586651, 3216856876693211, 25734855013545691, 205878840108365531, 1647030720866924251, 13176245766935394011
Offset: 1

Views

Author

Reinhard Muehlfeld, Jul 27 2014

Keywords

Comments

Sequence consists of all numbers with binary representation 1(011)*.

Examples

			A030101(11) = 13,  A030109(11) = 6, and 13 XOR 6 = (1101)_2 XOR (0110)_2 = (1011)_2 = 11, so 11 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (5*8^n - 12)/28; Array[a, 20] (* Giovanni Resta, Apr 25 2020 *)
  • PARI
    Vec(x*(1 + 2*x) / ((1 - x)*(1 - 8*x)) + O(x^20)) \\ Colin Barker, Apr 25 2020

Formula

a(n) = 1(011)^(n-1) in binary representation.
a(n) = (5*8^n - 12)/28. - Giovanni Resta, Apr 25 2020
From Colin Barker, Apr 25 2020: (Start)
G.f.: x*(1 + 2*x) / ((1 - x)*(1 - 8*x)).
a(n) = 9*a(n-1) - 8*a(n-2) for n>2.
(End)

Extensions

More terms from Giovanni Resta, Apr 25 2020
Previous Showing 11-20 of 198 results. Next