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.

A175329 a(n) = bitwise OR of prime(n) and prime(n+1).

Original entry on oeis.org

3, 7, 7, 15, 15, 29, 19, 23, 31, 31, 63, 45, 43, 47, 63, 63, 63, 127, 71, 79, 79, 95, 91, 121, 101, 103, 111, 111, 125, 127, 255, 139, 139, 159, 151, 159, 191, 167, 175, 191, 183, 191, 255, 197, 199, 215, 223, 255, 231, 237, 239, 255, 251, 507, 263, 271, 271, 287
Offset: 1

Views

Author

Leroy Quet, Apr 07 2010

Keywords

Comments

Read each binary representation of the primes from right to left and then OR respective digits to form the binary equivalent of each term of this sequence.

Crossrefs

Cf. A000040, A175330 (bitwise AND).
Cf. A086799 (bitwise OR of n and n-1).

Programs

  • Maple
    read("transforms") ; A175329 := proc(n) ORnos(ithprime(n),ithprime(n+1)) ; end proc: seq(A175329(n),n=1..60) ; # R. J. Mathar, Apr 15 2010
    # second Maple program:
    a:= n-> Bits[Or](ithprime(n), ithprime(n+1)):
    seq(a(n), n=1..70);  # Alois P. Heinz, Apr 16 2020
  • Mathematica
    A175329[n_]:=BitOr[Prime[n],Prime[n+1]];Array[A175329,100] (* Paolo Xausa, Oct 13 2023 *)
    BitOr@@#&/@Partition[Prime[Range[60]],2,1] (* Harvey P. Dale, Mar 01 2024 *)
  • PARI
    a(n) = bitor(prime(n), prime(n+1)); \\ Michel Marcus, Apr 20 2020

Extensions

More terms from R. J. Mathar, Apr 15 2010