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.

A057894 Negabinary numbral "primes".

Original entry on oeis.org

2, 5, 6, 7, 9, 13, 15, 17, 23, 27, 29, 31, 33, 39, 43, 47, 51, 53, 55, 57, 61, 71, 77, 79, 83, 87, 89, 91, 99, 101, 107, 109, 115, 117, 121, 127, 129, 139, 141, 147, 149, 151, 167, 169, 173, 181, 185, 191, 197, 199, 201, 203, 205, 209, 213, 223, 227, 233, 239, 241
Offset: 0

Views

Author

Marc LeBrun, Sep 25 2000

Keywords

Comments

"Primes" have no other distinct divisors, up to multiplication by units. (Units are [1]=1 and [3]=-1.)

Examples

			[2]=-2, [5]=5, [6]=2, [7]=3, [9]=-7, [13]=-3, etc
		

Crossrefs

A065360 Alternating sum of "negabits". Replace (-2)^k with (-1)^k in negabinary expansion of n.

Original entry on oeis.org

1, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, -2, -1, -1, 0, -1, 0, 0, 1, -1, 0, 0, 1, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, -3, -2, -2, -1, -2, -1, -1, 0, -2, -1, -1, 0, -1, 0, 0, 1, -2, -1, -1, 0, -1, 0, 0
Offset: 1

Views

Author

Marc LeBrun, Oct 31 2001

Keywords

Comments

Notation: (-2)[n](-1)

Examples

			6 = 11010 -> +(1)-(1)+(0)-(1)+(0) = -1 = a(6).
		

Crossrefs

Programs

  • PARI
    negab(n)=if(n, negab(n\(-2))*10+bittest(n, 0)); \\ A039724
    a(n) = my(d=Vecrev(digits(negab(n)))); sum(k=1, #d, d[k]*(-1)^(k-1)); \\ Michel Marcus, Aug 28 2019

A177505 Base 2i representation of n reinterpreted in base 4.

Original entry on oeis.org

0, 1, 2, 3, 304, 305, 306, 307, 288, 289, 290, 291, 272, 273, 274, 275, 256, 257, 258, 259, 560, 561, 562, 563, 544, 545, 546, 547, 528, 529, 530, 531, 512, 513, 514, 515, 816, 817, 818, 819, 800, 801, 802, 803, 784, 785
Offset: 0

Views

Author

Alonso del Arte, Feb 03 2012

Keywords

Comments

The use of negabinary dispenses with the need for sign bits and for keeping track of signed and unsigned data types. Similarly, the use of base 2i, or quater-imaginary, dispenses with the need to represent the real and imaginary parts of a complex number separately. (The term "quater-imaginary" appears in Knuth's landmark book on computer programming).
Quater-imaginary, based on the powers of 2i (twice the imaginary unit), uses the digits 0, 1, 2, 3. For purely real positive integers, the quater-imaginary representation is the same as negaquartal (base -4) except that 0's are "riffled" in, corresponding to the odd-indexed powers of 2i which are purely imaginary numbers. Therefore, to obtain the base 2i representations of positive real numbers, the algorithm for base -4 representations can be employed with only a small adjustment.
To obtain the base 2i representation of a complex number a+bi, do as above for the real part, then again for the real part of 2i*(a+bi) = -2b+2ai, giving the digits corresponding to the odd-indexed powers of 2i. - Daniel Forgues, May 18 2012

Examples

			a(5) = 305 because 5 in base 2i is 10301 ( = (2i)^4 + 3 * (2i)^2 + (2i)^0), and (-4)^4 + 3 * (-4)^2 + (-4)^0 = 256 + 3 * 16 + 1 = 305.
		

References

  • Donald Knuth, The Art of Computer Programming. Volume 2, 2nd Edition. Reading, Massachussetts: Addison-Wesley (1981): 189

Crossrefs

Cf. A005351 (base -2 representation of n reinterpreted as binary).
Cf. A212494 (base 2i representation of n).

Programs

  • Mathematica
    (* First run the program from A039724 to define ToNegaBases *) Table[FromDigits[Riffle[IntegerDigits[ToNegaBases[n, 4]], 0], 4], {n, 0, 63}]

Formula

Conjectures from Colin Barker, Jul 16 2019: (Start)
G.f.: x*(1 + x + x^2 + 301*x^3 + x^4 + x^5 + x^6 - 19*x^7 + x^8 + x^9 + x^10 - 19*x^11 + x^12 + x^13 + x^14 - 19*x^15) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)).
a(n) = a(n-1) + a(n-16) - a(n-17) for n>16.
(End)
Previous Showing 11-13 of 13 results.