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 29 results. Next

A278862 Numbers that are not the sum of 2 or fewer terms from A057890.

Original entry on oeis.org

157441, 177617, 178637, 226891, 374359, 900745, 1456223, 1526983, 1545227, 1817999, 2232815, 2274595, 2320643, 2336935, 2363383, 2404487, 2461559, 2536595, 2812451, 2877463, 2893769, 2910811, 2912446, 3046915, 3053999, 3090575, 3105319, 3382141
Offset: 1

Views

Author

Jeffrey Shallit, Dec 07 2016

Keywords

Comments

Not known to be infinite. This list is complete up to 3,500,000.

Crossrefs

Cf. A057890.

Programs

  • Maple
    # with A a list of terms < 2^d of A057890
    B:= Array(0..2^d-1,datatype=integer[4]):
    for a in A do B[a]:= 1 od:
    C:= SignalProcessing:-Convolution(B,B):
    select(t -> C[t+1] < 0.5, [$0..2^d-1]); # Robert Israel, Dec 08 2016

A062014 Duplicate of A057890.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 21, 24, 27, 28, 30, 31, 32, 33
Offset: 0

Views

Author

Keywords

A057889 Bijective bit-reverse of n: keep the trailing zeros in the binary expansion of n fixed, but reverse all the digits up to that point.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14, 15, 16, 17, 18, 25, 20, 21, 26, 29, 24, 19, 22, 27, 28, 23, 30, 31, 32, 33, 34, 49, 36, 41, 50, 57, 40, 37, 42, 53, 52, 45, 58, 61, 48, 35, 38, 51, 44, 43, 54, 59, 56, 39, 46, 55, 60, 47, 62, 63, 64, 65, 66, 97, 68, 81, 98, 113
Offset: 0

Views

Author

Marc LeBrun, Sep 25 2000

Keywords

Comments

The original name was "Bit-reverse of n, including as many leading as trailing zeros." - Antti Karttunen, Dec 25 2024
A permutation of integers consisting only of fixed points and pairs. a(n)=n when n is a binary palindrome (including as many leading as trailing zeros), otherwise a(n)=A003010(n) (i.e. n has no axis of symmetry). A057890 gives the palindromes (fixed points, akin to A006995) while A057891 gives the "antidromes" (pairs). See also A280505.
This is multiplicative in domain GF(2)[X], i.e. with carryless binary arithmetic. A193231 is another such permutation of natural numbers. - Antti Karttunen, Dec 25 2024

Examples

			a(6)=6 because 0110 is a palindrome, but a(11)=13 because 1011 reverses into 1101.
		

Crossrefs

Cf. A030101, A000265, A006519, A006995, A057890, A057891, A280505, A280508, A331166 [= min(n,a(n))], A366378 [k for which a(k) = k (mod 3)], A369044 [= A014963(a(n))].
Similar permutations for other bases: A263273 (base-3), A264994 (base-4), A264995 (base-5), A264979 (base-9).
Other related (binary) permutations: A056539, A193231.
Compositions of this permutation with other binary (or other base-related) permutations: A264965, A264966, A265329, A265369, A379471, A379472.
Compositions with permutations involving prime factorization: A245450, A245453, A266402, A266404, A293448, A366275, A366276.
Other derived permutations: A246200 [= a(3*n)/3], A266351, A302027, A302028, A345201, A356331, A356332, A356759, A366389.
See also A235027 (which is not a permutation).

Programs

  • Mathematica
    Table[FromDigits[Reverse[IntegerDigits[n, 2]], 2]*2^IntegerExponent[n, 2], {n, 71}] (* Ivan Neretin, Jul 09 2015 *)
  • PARI
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2))); \\ Antti Karttunen, Dec 25 2024
  • Python
    def a(n):
        x = bin(n)[2:]
        y = x[::-1]
        return int(str(int(y))+(len(x) - len(str(int(y))))*'0', 2)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 11 2017
    
  • Python
    def A057889(n): return int(bin(n>>(m:=(~n&n-1).bit_length()))[-1:1:-1],2)<Chai Wah Wu, Dec 25 2024
    

Formula

a(n) = A030101(A000265(n)) * A006519(n), with a(0)=0.

Extensions

Clarified the name with May 30 2016 comment from N. J. A. Sloane, and moved the old name to the comments - Antti Karttunen, Dec 25 2024

A061917 Either a palindrome or becomes a palindrome if trailing 0's are omitted.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 101, 110, 111, 121, 131, 141, 151, 161, 171, 181, 191, 200, 202, 212, 220, 222, 232, 242, 252, 262, 272, 282, 292, 300, 303, 313, 323, 330, 333, 343, 353, 363, 373, 383, 393, 400, 404
Offset: 1

Views

Author

N. J. A. Sloane, Jun 27 2001

Keywords

Comments

Numbers that are palindromes when written with a suitable number of leading zeros. - Jeppe Stig Nielsen, Jan 17 2022

Crossrefs

Programs

  • Haskell
    a061917 n = a061917_list !! (n-1)
    a061917_list = filter chi [0..] where
       chi x = zs == reverse zs where
          zs = dropWhile (== '0') $ reverse $ show x
    -- Reinhard Zumkeller, Sep 25 2011
    
  • Mathematica
    PaleQ[n_Integer, base_Integer] := Module[{idn, trim = n/base^IntegerExponent[n, base]}, idn = IntegerDigits[trim, base]; idn == Reverse[idn]]; Select[Range[0, 500], PaleQ[#, 10] &] (* Lei Zhou, Dec 13 2013 *)
    Join[{0},Select[Range[500],PalindromeQ[FromDigits[Drop[IntegerDigits[#],-IntegerExponent[#,10]]]]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 27 2017 *)
  • PARI
    isOK(k)=k==0||fromdigits(Vecrev(digits(k)))==k/10^valuation(k,10) \\ Jeppe Stig Nielsen, Jan 17 2022
    
  • Python
    def ispal(s): return s == s[::-1]
    def ok(n): s = str(n); return ispal(s) or ispal(s.rstrip('0'))
    print([k for k in range(405) if ok(k)]) # Michael S. Branicky, Jan 17 2022

Formula

A136522(A004151(a(n))) = 1. - Reinhard Zumkeller, Sep 25 2011

Extensions

Corrected by Ray Chandler, Jun 08 2009

A280505 The palindromic kernel of n in base 2 (with carryless GF(2)[X] factorization): a(n) = A091255(n,A057889(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12, 1, 14, 15, 16, 17, 18, 1, 20, 21, 2, 3, 24, 1, 2, 27, 28, 3, 30, 31, 32, 33, 34, 7, 36, 1, 2, 5, 40, 1, 42, 3, 4, 45, 6, 1, 48, 7, 2, 51, 4, 3, 54, 1, 56, 5, 6, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68, 1, 14, 3, 72, 73, 2, 15, 4, 3, 10, 7, 80, 1, 2, 9, 84, 85, 6, 1, 8, 3, 90, 1, 12, 93, 2, 5, 96, 1, 14, 99, 4, 9, 102, 1, 8, 15, 6
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

a(n) = the maximal GF(2)[X]-divisor of n which in base 2 is either a palindrome or becomes a palindrome if trailing 0's are omitted.
More precisely: a(n) = the unique term m of A057890 for which A280500(n,m) > 0 and A091222(m) >= A091222(k) for all such terms k of A057890 for which A280500(n,k) > 0.
All terms are in A057890 and each term of A057890 occurs an infinite number of times.

Crossrefs

Programs

Formula

a(n) = A091255(n,A057889(n)).
Other identities. For all n >= 1:
a(A057889(n)) = a(n).
A048720(a(n), A280506(n)) = n.

A057891 In base 2, neither a palindrome nor becomes a palindrome if trailing 0's are omitted.

Original entry on oeis.org

11, 13, 19, 22, 23, 25, 26, 29, 35, 37, 38, 39, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 57, 58, 59, 61, 67, 69, 70, 71, 74, 75, 76, 77, 78, 79, 81, 82, 83, 86, 87, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104, 105, 106, 109, 110, 111, 113, 114, 115, 116, 117, 118
Offset: 1

Views

Author

Marc LeBrun, Sep 25 2000

Keywords

Comments

These could be called "asymmetric bit strings".
Fixed pairs of A057889, complement of A057890.
If these numbers are converted to their binary polynomial, one of the roots of that polynomial will have absolute values other than 1 or 0. For example 11 = 2^3 + 2^1 + 2^0, the absolute values of the roots of x^3 + x + 1 are 0.682328... and 1.21061... which are not 1 or 0, so 11 is in the sequence. The first number with this property which is not a term is A057890(53) = 107. - Benedict W. J. Irwin, Sep 07 2017 and Andrey Zabolotskiy, Oct 13 2017

Examples

			11 is included because 1011 is asymmetrical, but 12 is not because 001100 is a palindrome.
		

Crossrefs

Cf. A061917, A006995. Complement of A057890.

Programs

  • Haskell
    a057891 n = a057891_list !! (n-1)
    a057891_list = filter ((== 0) . a178225 . a000265) [1..]
    -- Reinhard Zumkeller, Oct 21 2011

Formula

A030101(A030101(n)) != A030101(n). - David Wilson, Jun 09 2009, Jun 18 2009
A178225(A000265(a(n))) = 0. - Reinhard Zumkeller, Oct 21 2011

Extensions

Edited by N. J. A. Sloane, Jun 09 2009 at the suggestion of Ray Chandler
A-numbers in formula corrected by R. J. Mathar, Jun 18 2009

A280506 Nonpalindromic part of n in base 2 (with carryless GF(2)[X] factorization): a(n) = A280500(n,A280505(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 13, 1, 1, 1, 1, 1, 19, 1, 1, 11, 13, 1, 25, 13, 1, 1, 11, 1, 1, 1, 1, 1, 13, 1, 37, 19, 11, 1, 41, 1, 25, 11, 1, 13, 47, 1, 11, 25, 1, 13, 19, 1, 55, 1, 13, 11, 59, 1, 61, 1, 1, 1, 1, 1, 67, 1, 69, 13, 61, 1, 1, 37, 13, 19, 59, 11, 25, 1, 81, 41, 11, 1, 1, 25, 87, 11, 55, 1, 91, 13, 1, 47, 19, 1, 97, 11, 1, 25, 13, 1, 103
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

a(n) = number obtained when the maximal base-2 palindromic divisor of n, A280505(n), is divided out of n with carryless GF(2)[X] factorization (see examples of A280500 for the explanation).
Apart from 1, all terms are present in A164861 (form their proper subset).

Crossrefs

Programs

Formula

a(n) = A280500(n,A280505(n)).
Other identities. For all n >= 1:
a(2n) = a(A000265(n)) = a(n).
A048720(a(n), A280505(n)) = n.

Extensions

Erroneous claim removed from comments by Antti Karttunen, May 13 2018

A327971 Bitwise XOR of trajectories of rule 30 and its mirror image, rule 86, when both are started from a lone 1 cell: a(n) = A110240(n) XOR A265281(n).

Original entry on oeis.org

0, 0, 10, 20, 130, 396, 2842, 4420, 38610, 124220, 684490, 1385044, 8891330, 26281036, 192525274, 269101060, 2454365330, 8588410876, 43860512138, 89059958420, 551714970626, 1663794165260, 12235920695450, 19683098342340, 164315052318034, 538162708968636, 2894532467106378, 6192136868790228, 37503903254935874, 114926395086966988, 814341599153559130
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2019

Keywords

Comments

Each term is a binary palindrome when its trailing zeros (in base 2) are omitted, that is, a term of A057890.
Compare the binary string illustrations drawn for the first 1024 terms of this sequence and for A327976, which has almost the same definition.

Crossrefs

Cf. A003987, A030101, A057890, A110240, A265281, A280508, A328106 (binary weight of terms).
Cf. also A327972, A327973, A327976, A328103, A328104 for other such combinations.

Programs

Formula

a(n) = A110240(n) XOR A265281(n).
a(n) = A280508(A110240(n)) = A110240(n) XOR A030101(A110240(n)).
a(n) = A280508(A265281(n)) = A265281(n) XOR A030101(A265281(n)).
For n >= 1, a(n) = (1/2) * (A327973(n-1) XOR A327976(n-1)).

A280508 a(n) = n XOR A057889(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 10, 0, 0, 12, 10, 0, 10, 12, 0, 0, 10, 0, 0, 0, 0, 0, 18, 0, 12, 20, 30, 0, 12, 0, 30, 24, 0, 20, 18, 0, 18, 20, 0, 24, 30, 0, 12, 0, 30, 20, 12, 0, 18, 0, 0, 0, 0, 0, 34, 0, 20, 36, 54, 0, 0, 24, 34, 40, 20, 60, 54, 0, 20, 24, 54, 0, 0, 60, 34, 48, 20, 0, 54, 40, 0, 36, 34, 0, 34, 36, 0, 40, 54, 0, 20, 48
Offset: 0

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Crossrefs

Cf. A057890 (positions of zeros).

Programs

Formula

a(n) = A003987(n,A057889(n)) = n XOR A057889(n).
Other identities. For all n >= 0:
a(A057889(n)) = a(n).

A233010 In balanced ternary notation, either a palindrome or becomes a palindrome if trailing 0's are omitted.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 10, 12, 13, 16, 21, 27, 28, 30, 36, 39, 40, 43, 48, 52, 61, 63, 73, 81, 82, 84, 90, 91, 103, 108, 112, 117, 120, 121, 124, 129, 144, 156, 160, 183, 189, 196, 208, 219, 243, 244, 246, 252, 270, 273, 280, 292, 309, 324, 328, 336, 351, 360, 363
Offset: 1

Views

Author

Lei Zhou, Dec 13 2013

Keywords

Comments

Symmetric strings of -1, 0, and 1, including as many leading as trailing zeros.

Examples

			10 is included since in balanced ternary notation 10 = (101)_bt is a palindrome;
144 is included since 144 = (1TT100)_bt, where we use T to represent -1.  When trailing zeros removed, 1TT1 is a palindrome.
		

Crossrefs

Programs

  • Mathematica
    BTDigits[m_Integer, g_] :=
    Module[{n = m, d, sign, t = g},
      If[n != 0, If[n > 0, sign = 1, sign = -1; n = -n];
       d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++];
       While[Length[t] < d, PrependTo[t, 0]]; t[[Length[t] + 1 - d]] = sign;
       t = BTDigits[sign*(n - 3^(d - 1)), t]]; t];
    BTpaleQ[n_Integer] := Module[{t, trim = n/3^IntegerExponent[n, 3]},
      t = BTDigits[trim, {0}]; t == Reverse[t]];
    Select[Range[0, 363], BTpaleQ[#] &]
Showing 1-10 of 29 results. Next