login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265885 a(n) = n IMPL prime(n), where IMPL is the bitwise logical implication. 3
2, 3, 5, 7, 11, 13, 25, 23, 23, 29, 31, 55, 59, 59, 63, 63, 63, 61, 111, 111, 107, 111, 123, 127, 103, 101, 103, 107, 111, 113, 127, 223, 223, 223, 221, 223, 223, 251, 255, 255, 247, 245, 255, 211, 215, 215, 211, 223, 239, 237, 237, 239, 251, 251, 457, 455 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Implies

FORMULA

a(n) = A265705(A000040(n),n).

EXAMPLE

.   prime(25)=97 | 1100001

.             25 |   11001

.   -------------+--------

.     25 IMPL 97 | 1100111 -> a(25) = 103 .

MAPLE

a:= n-> Bits[Implies](n, ithprime(n)):

seq(a(n), n=1..56);  # Alois P. Heinz, Sep 24 2021

MATHEMATICA

IMPL[n_, k_] := If[n == 0, 0, BitOr[2^Length[IntegerDigits[k, 2]]-1-n, k]];

a[n_] := n ~IMPL~ Prime[n];

Table[a[n], {n, 1, 100}] (* Jean-Fran├žois Alcover, Sep 25 2021, after David A. Corneth's code in A265705 *)

PROG

(Haskell)

a265885 n = n `bimpl` a000040 n where

   bimpl 0 0 = 0

   bimpl p q = 2 * bimpl p' q' + if u <= v then 1 else 0

               where (p', u) = divMod p 2; (q', v) = divMod q 2

(Julia)

using IntegerSequences

[Bits("IMP", n, p) for (n, p) in enumerate(Primes(1, 263))] |> println  # Peter Luschny, Sep 25 2021

(PARI) a(n) = bitor((2<<logint(prime(n), 2))-1-n, prime(n)); \\ Michel Marcus, Jan 22 2022

CROSSREFS

Cf. A000040, A004676, A007088, A070883 (XOR), A265705.

Sequence in context: A343973 A024694 A024320 * A294994 A292205 A111252

Adjacent sequences:  A265882 A265883 A265884 * A265886 A265887 A265888

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Dec 17 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 07:24 EDT 2022. Contains 354122 sequences. (Running on oeis4.)