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.

A283750 a(n) = n^2 XOR (n + 1)^2.

Original entry on oeis.org

1, 5, 13, 25, 9, 61, 21, 113, 17, 53, 29, 233, 57, 109, 37, 481, 33, 101, 45, 249, 41, 93, 1013, 81, 49, 213, 125, 457, 89, 205, 69, 1985, 65, 197, 77, 473, 73, 253, 85, 945, 209, 117, 477, 169, 121, 4013, 229, 417, 97, 165, 1005, 185, 105, 413, 181, 1937, 241, 405, 189, 905, 153, 397, 133, 8065, 129, 389, 141, 921
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 15 2017

Keywords

Comments

XOR the binary representations of n^2 and (n + 1)^2.

Crossrefs

Cf. also A379007.

Programs

Formula

a(n) = A000290(n) XOR A000290(n+1).

A280211 a(n) = n*(2^(n^2)).

Original entry on oeis.org

0, 2, 32, 1536, 262144, 167772160, 412316860416, 3940649673949184, 147573952589676412928, 21760664753063325144711168, 12676506002282294014967032053760, 29243015907268149203883755326167580672, 267608942382367477698428619271780338071764992, 9727754898074489823563726246559579778829887006048256
Offset: 0

Views

Author

Indranil Ghosh, Jan 06 2017

Keywords

Comments

a(n) = n with the bits shifted to the left by n^2 places (new bits on the right hand side are zeros) i.e, a(n) = n<<(n**2).
a(n) is always even.
a(n) mod 32 = 0 for n>=2.

Crossrefs

Programs

  • Mathematica
    Table[n*2^n^2,{n,0,20}] (* Harvey P. Dale, Jan 01 2021 *)
  • Python
    a=lambda n: n<<(n**2)

Formula

a(n) = n*(2^(n^2)).
a(n) = n*A002416(n). - Omar E. Pol, Jan 06 2017

A344856 Bitwise XOR of prime(n) and n^2.

Original entry on oeis.org

3, 7, 12, 23, 18, 41, 32, 83, 70, 121, 102, 181, 128, 239, 206, 309, 282, 377, 298, 471, 496, 427, 578, 537, 528, 705, 702, 891, 804, 1013, 958, 1155, 1224, 1039, 1116, 1415, 1476, 1287, 1366, 1773, 1570, 1617, 1926, 1873, 1836, 2179, 2162, 2527, 2434, 2337
Offset: 1

Views

Author

Chris von Csefalvay, May 30 2021

Keywords

Comments

This is effectively the bitwise XOR of A000040 and A000290.

Examples

			For n=3, a(3) is prime(3) XOR 3^2 = 5 XOR 9 or b(0101) XOR b(1001) = (b)1100, which in base 10 is 12.
		

Crossrefs

Programs

  • Maple
    a:= n-> Bits[Xor](n^2, ithprime(n)):
    seq(a(n), n=1..50);  # Alois P. Heinz, May 30 2021
  • Mathematica
    a[n_] := BitXor[n^2, Prime[n]]; Array[a, 50] (* Amiram Eldar, Jun 05 2021 *)
  • PARI
    A344856(n) = bitxor(prime(n),n*n); \\ Antti Karttunen, Jun 05 2021
    
  • Python
    from sympy import primerange, prime
    import numpy
    def a_vector(n):
        primes = list(primerange(0, prime(n)))
        squares = [x ** 2 for x in range(1, n)]
        return numpy.bitwise_xor(primes, squares)
    
  • Python
    from sympy import prime
    def A344856(n): return prime(n) ^ n**2 # Chai Wah Wu, Jun 12 2021

Formula

a(n) = prime(n) XOR n^2.
a(n) = A003987(A000040(n), A000290(n)).
Previous Showing 11-13 of 13 results.