login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226019 Primes whose binary reversal is a square. 1
2, 19, 79, 149, 569, 587, 1237, 2129, 2153, 2237, 2459, 2549, 4129, 4591, 4657, 4999, 8369, 8999, 9587, 9629, 9857, 10061, 17401, 17659, 17737, 18691, 20149, 20479, 33161, 33347, 34631, 35117, 35447, 39023, 40427, 40709, 66403, 68539, 74707, 75703, 79063, 79333, 80071 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The sequence of corresponding squares begins: 1, 25, 121, 169, 625, 841, 1369, 2209, 2401, 3025, 3481, 2809, 4225, 7921, ...

For n>1 the second and third most significant bits of a(n) are "0" because all odd squares are equal to 1 mod 8. - Andres Cicuttin, May 12 2016

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..6182

MATHEMATICA

Select[Table[Prime[j], {j, 1, 10000}], Element[Sqrt[FromDigits[Reverse[IntegerDigits[#, 2]], 2]], Integers]&] (* Andres Cicuttin, May 12 2016 *)

PROG

(Python)

import math

primes = []

def addPrime(k):

  for p in primes:

    if k%p==0:  return

    if p*p > k:  break

  primes.append(k)

  r = 0

  p = k

  while k:

    r = r*2 + (k&1)

    k>>=1

  s = int(math.sqrt(r))

  if s*s == r:  print str(p)+', ',

addPrime(2)

addPrime(3)

for i in xrange(5, 1000000000, 6):

  addPrime(i)

  addPrime(i+2)

(Python)

from sympy import isprime

A226019_list, i, j = [2], 0, 0

while j < 2**34:

    p = int(format(j, 'b')[::-1], 2)

    if j % 2 and isprime(p):

        A226019_list.append(p)

    j += 2*i+1

    i += 1

A226019_list = sorted(A226019_list) # Chai Wah Wu, Dec 20 2015

CROSSREFS

Cf. A007488, A074832.

Subsequence of A204219. Cf. also A235027.

Sequence in context: A256112 A272053 A317274 * A057326 A129446 A240280

Adjacent sequences:  A226016 A226017 A226018 * A226020 A226021 A226022

KEYWORD

nonn,base

AUTHOR

Alex Ratushnyak, May 23 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 17:45 EST 2019. Contains 329287 sequences. (Running on oeis4.)