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

A161388 (Odd) binary palindromes n such that 2*n + 1 is a prime.

Original entry on oeis.org

1, 3, 5, 9, 15, 21, 33, 51, 63, 65, 99, 119, 153, 165, 189, 219, 231, 273, 341, 443, 455, 495, 561, 585, 645, 765, 771, 891, 975, 1365, 1421, 1533, 1539, 1755, 1911, 2049, 2553, 2661, 2709, 2829, 2925, 3075, 3171, 3339, 3435, 3483, 3579, 4095, 4433, 4529
Offset: 1

Views

Author

Leroy Quet, Jun 08 2009

Keywords

Examples

			67 in binary is 1000011. All binary digits but the rightmost 1 form a palindrome (100001), so therefore (67-1)/2 = 33 is a palindrome. Since 67 is a prime, 33 is in this sequence.
		

Crossrefs

Cf. A161387.

Programs

  • Magma
    [ n: p in PrimesInInterval(3, 9100) | s eq Reverse(s) where s is Intseq(n, 2) where n is (p-1) div 2]; // Klaus Brockhaus, Jun 09 2009
  • Mathematica
    (Select[Prime@Range[2,1500],(id=IntegerDigits[(#-1)/2,2]) == Reverse[id]&]-1)/2 (* Ray Chandler, Jun 09 2009*)
    fQ[n_] := Block[{id = IntegerDigits[n, 2]}, id == Reverse@ id]; Select[ Range@ 4592, fQ@# && PrimeQ[2 # + 1] &] (* Robert G. Wilson v, Jun 09 2009 *)
  • PARI
    forprime(p=3,100000,t=binary((p-1)/2);if(t==vector(#t,x,t[ #t+1-x]),print1((p-1)/2,","))) \\ Hagen von Eitzen, Jun 10 2009
    

Formula

a(n) = (A161387(n) - 1)/2.

Extensions

A229086 Numbers k such that the concatenation of the divisors of k written in base 2 is a palindromic number.

Original entry on oeis.org

1, 3, 7, 11, 19, 31, 43, 67, 103, 127, 131, 199, 239, 307, 331, 379, 439, 463, 547, 683, 887, 911, 991, 1123, 1171, 1291, 1531, 1543, 1783, 1951, 2731, 2843, 3067, 3079, 3511, 3823, 4099, 5107, 5323, 5419, 5659, 5851, 6151, 6343, 6679, 6871, 6967, 7159, 8191
Offset: 1

Views

Author

Jaroslav Krizek, Sep 13 2013

Keywords

Comments

Concatenation of the divisors of n written in base 2 = A182621.
Are there composite numbers with this property?
Conjecture: a(n) for n > 1 is not equal to A161387, sequence also contains composites.
The answer to the question above is Yes. The first two composites are 297883 and 476635. - T. D. Noe, Sep 17 2013

Examples

			The number 103 is in sequence because the concatenation of its divisors written in base 2 (1, 1100111) is palindromic number - 11100111.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000], (temp=Flatten[IntegerDigits[Divisors[#],2]]; temp==Reverse[temp])&]
Showing 1-2 of 2 results.