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.

A091065 Numbers having in binary representation no proper prefix that is also a suffix.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 40, 44, 48, 50, 52, 56, 58, 60, 62, 64, 72, 80, 84, 88, 92, 96, 98, 100, 104, 106, 108, 112, 114, 116, 118, 120, 122, 124, 126, 128, 144, 152, 160, 164, 168, 172, 176, 180, 184, 188, 192, 194, 196, 200, 202, 208
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 17 2003

Keywords

Comments

A091064(a(n)) = 0, complement of A091066.

Crossrefs

A091066 Numbers having in binary representation at least one proper prefix that is also a suffix.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 15, 17, 18, 19, 21, 22, 23, 25, 27, 29, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 51, 53, 54, 55, 57, 59, 61, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 99, 101
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 17 2003

Keywords

Comments

A091064(a(n)) > 0, complement of A091065.
Includes all odd numbers > 1. - Robert Israel, Feb 05 2016

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,m;
       if n::odd then return true fi;
       L:= convert(n,base,2);
       for m from 2 to nops(L)-1 do
         if L[1..m] = L[-m..-1] then return true fi;
       od:
       false
    end proc:
    select(f, [$2..101]); # Robert Israel, Feb 05 2016

A091064 In binary representation: length of longest proper prefix of n, that is also a suffix.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 17 2003

Keywords

Comments

a(n) <= A070939(n)-1 by definition;
a(2^k-1)=k-1; for k>0: a(2^k+1)=1; for k>2: a(2^k+2)=2;
a(A091065(n)) = 0, a(A091066(n)) > 0.

Crossrefs

A147755 a(n) = the largest integer that, when represented in binary, occurs at least twice as a substring in the binary representation of n.

Original entry on oeis.org

1, 0, 1, 1, 3, 0, 1, 2, 1, 1, 1, 3, 7, 0, 1, 2, 1, 2, 5, 2, 3, 1, 1, 2, 3, 3, 3, 7, 15, 0, 1, 2, 1, 4, 2, 2, 3, 2, 2, 10, 5, 2, 5, 3, 7, 1, 1, 2, 3, 2, 5, 6, 3, 3, 3, 3, 3, 7, 7, 15, 31, 0, 1, 2, 1, 4, 2, 2, 3, 4, 9, 2, 2, 4, 2, 3, 7, 2, 2, 2, 2, 10, 21, 5, 5, 2, 2, 5, 11, 3, 5, 7, 15, 1, 1, 2, 3, 4, 2, 6, 3, 2
Offset: 3

Views

Author

Leroy Quet, Nov 11 2008

Keywords

Comments

The substrings (each equal to the binary representation of a(n)) may overlap in the binary representation of n.

Examples

			21 in binary is 10101. 101 (5 in decimal) occurs twice in 10101: (101)01 and 10(101). Since no larger integer (when represented in binary) occurs more than once within 10101, then a(21) = 5.
		

Crossrefs

Programs

  • Mathematica
    Table[With[{d = IntegerDigits[n, 2]}, SelectFirst[Range[n, 0, -1], SequenceCount[d, IntegerDigits[#, 2], Overlaps -> True] >= 2 &]], {n, 3, 104}] (* Michael De Vlieger, Oct 30 2017 *)

Extensions

Extended by Ray Chandler, Nov 14 2008
Showing 1-4 of 4 results.