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

A207039 Primes whose binary expansion is not palindromic.

Original entry on oeis.org

2, 11, 13, 19, 23, 29, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 109, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 263, 269, 271, 277, 281, 283, 293, 307, 311, 317
Offset: 1

Views

Author

Omar E. Pol, Feb 25 2012

Keywords

Comments

Intersection of A000040 and A154809.

Crossrefs

Primes in A154809.

Programs

A206922 Root of the n-th binary palindrome. Least number r > 1 such that A006995(n) can be represented by a finite or infinite number of iterations A006995(A006995(A006995(...(...(r))...).

Original entry on oeis.org

2, 2, 3, 4, 4, 6, 4, 8, 6, 10, 11, 12, 13, 14, 4, 16, 8, 18, 19, 20, 6, 22, 23, 24, 25, 26, 10, 28, 29, 30, 11, 32, 12, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 13, 46, 47, 48, 49, 50, 14, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 4, 64, 16, 66, 67, 68
Offset: 1

Views

Author

Hieronymus Fischer, Mar 12 2012

Keywords

Comments

If n is not a binary palindrome, then a(n)=n.
For n>3: a(n)
For n<>3: The number of iterations such that A006995(n)= A006995(A006995(A006995(...(...(r))...) is given by A206921(n).

Examples

			a(1)=2, since A006995(1) = 0 = A006995(A006995(2)).
a(3)=3, since A006995(3) = 3 = A006995(A006995(A006995(...(3)...).
a(7)=4, since A006995(7) = 15 = A006995(A006995(A006995(4)).
a(9)=6, since A006995(9) = 21 = A006995(A006995(6)).
		

Crossrefs

Programs

  • C
    /* C program fragment, omitting formal details, n!=3 */
    k=0;
    p=A006995(n);
    while A178225(p)==1
    {
      k++;
      p=A206915(p);
    }
    return p;

Formula

a(n) <= n for n > 1.
a(n)=p(k), where p(k) can be determined by the following iteration: set k=0, p(0)=A006995(n). Repeat while A178225(p(k))==1, set k=k+1, p(k)=A206915(p(k-1)) end repeat [for n<>3].
Recursion for n<>3:
Case 1: a(n)=n, if n is not a binary palindrome;
Case 2: a(n)=a(A206915(n)), else.
Formally: a(n)=if (A178225(n)==0) then n else a(A206915(n)).

A330720 a(n) is the number of ways of writing the binary expansion of n as a product (or concatenation) of nonpalindromes.

Original entry on oeis.org

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

Author

Rémy Sigrist, Dec 28 2019

Keywords

Comments

This sequence is a variant of A215244.

Examples

			For n = 41:
- the binary expansion of 41 is "101001",
- the possible products of nonpalindromes are "101001", "1010"."01", and "10"."10"."01",
- hence a(41) = 3.
		

Crossrefs

Programs

  • Maple
    ispali:= proc(L) L = ListTools:-Reverse(L) end proc:
    g:= proc(L) option remember; local m;
        add(procname(L[m+1..-1]), m= remove(t -> ispali(L[1..t]),[$1..nops(L)]))
    end proc:
    g([]):= 1:
    seq(g(convert(n,base,2)),n=0..100); # Robert Israel, Dec 29 2019
  • PARI
    a(n) = my (b=binary(n), v=b!=Vecrev(b)); for (s=1, #b, my (z=b[s..#b]); if (z!=Vecrev(z), v+=a(fromdigits(b[1..s-1],2)))); v

Formula

a(2^k-1) = 0 for any k >= 0.
a(A020988(k+1)) = 2^k for any k >= 0.
Previous Showing 11-13 of 13 results.