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.

Showing 1-10 of 14 results. Next

A016789 a(n) = 3*n + 2.

Original entry on oeis.org

2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 176, 179
Offset: 0

Views

Author

Keywords

Comments

Except for 1, n such that Sum_{k=1..n} (k mod 3)*binomial(n,k) is a power of 2. - Benoit Cloitre, Oct 17 2002
The sequence 0,0,2,0,0,5,0,0,8,... has a(n) = n*(1 + cos(2*Pi*n/3 + Pi/3) - sqrt(3)*sin(2*Pi*n + Pi/3))/3 and o.g.f. x^2(2+x^3)/(1-x^3)^2. - Paul Barry, Jan 28 2004 [Artur Jasinski, Dec 11 2007, remarks that this should read (3*n + 2)*(1 + cos(2*Pi*(3*n + 2)/3 + Pi/3) - sqrt(3)*sin(2*Pi*(3*n + 2)/3 + Pi/3))/3.]
Except for 2, exponents e such that x^e + x + 1 is reducible. - N. J. A. Sloane, Jul 19 2005
The trajectory of these numbers under iteration of sum of cubes of digits eventually turns out to be 371 or 407 (47 is the first of the second kind). - Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 19 2009
Union of A165334 and A165335. - Reinhard Zumkeller, Sep 17 2009
a(n) is the set of numbers congruent to {2,5,8} mod 9. - Gary Detlefs, Mar 07 2010
It appears that a(n) is the set of all values of y such that y^3 = k*n + 2 for integer k. - Gary Detlefs, Mar 08 2010
These numbers do not occur in A000217 (triangular numbers). - Arkadiusz Wesolowski, Jan 08 2012
A089911(2*a(n)) = 9. - Reinhard Zumkeller, Jul 05 2013
Also indices of even Bell numbers (A000110). - Enrique Pérez Herrero, Sep 10 2013
Central terms of the triangle A108872. - Reinhard Zumkeller, Oct 01 2014
A092942(a(n)) = 1 for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n-1), n >= 1, is also the complex dimension of the manifold E(S), the set of all second-order irreducible Fuchsian differential equations defined on P^1 = C U {oo}, having singular points at most in S = {a_1, ..., a_n, a_{n+1} = oo}, a subset of P^1. See the Iwasaki et al. reference, Proposition 2.1.3., p. 149. - Wolfdieter Lang, Apr 22 2016
Except for 2, exponents for which 1 + x^(n-1) + x^n is reducible. - Ron Knott, Sep 16 2016
The reciprocal sum of 8 distinct items from this sequence can be made equal to 1, with these terms: 2, 5, 8, 14, 20, 35, 41, 1640. - Jinyuan Wang, Nov 16 2018
There are no positive integers x, y, z such that 1/a(x) = 1/a(y) + 1/a(z). - Jinyuan Wang, Dec 31 2018
As a set of positive integers, it is the set sum S + S where S is the set of numbers in A016777. - Michael Somos, May 27 2019
Interleaving of A016933 and A016969. - Leo Tavares, Nov 16 2021
Prepended with {1}, these are the denominators of the elements of the 3x+1 semigroup, the numerators being A005408 prepended with {2}. See Applegate and Lagarias link for more information. - Paolo Xausa, Nov 20 2021
This is also the maximum number of moves starting with n + 1 dots in the game of Sprouts. - Douglas Boffey, Aug 01 2022 [See the Wikipedia link. - Wolfdieter Lang, Sep 29 2022]
a(n-2) is the maximum sum of the span (or L(2,1)-labeling number) of a graph of order n and its complement. The extremal graphs are stars and their complements. For example, K_{1,2} has span 3, and K_2 has span 2. Thus a(3-1) = 5. - Allan Bickle, Apr 20 2023

Examples

			G.f. = 2 + 5*x + 8*x^2 + 11*x^3 + 14*x^4 + 17*x^5 + 20*x^6 + ... - _Michael Somos_, May 27 2019
		

References

  • K. Iwasaki, H. Kimura, S. Shimomura and M. Yoshida, From Gauss to Painlevé, Vieweg, 1991. p. 149.
  • Konrad Knopp, Theory and Application of Infinite Series, Dover, p. 269

Crossrefs

First differences of A005449.
Cf. A087370.
Cf. similar sequences with closed form (2*k-1)*n+k listed in A269044.

Programs

Formula

G.f.: (2+x)/(1-x)^2.
a(n) = 3 + a(n-1).
a(n) = 1 + A016777(n).
a(n) = A124388(n)/9.
a(n) = A125199(n+1,1). - Reinhard Zumkeller, Nov 24 2006
Sum_{n>=1} (-1)^n/a(n) = (1/3)*(Pi/sqrt(3) - log(2)). - Benoit Cloitre, Apr 05 2002
1/2 - 1/5 + 1/8 - 1/11 + ... = (1/3)*(Pi/sqrt(3) - log 2). [Jolley] - Gary W. Adamson, Dec 16 2006
Sum_{n>=0} 1/(a(2*n)*a(2*n+1)) = (Pi/sqrt(3) - log 2)/9 = 0.12451569... (see A196548). [Jolley p. 48 eq (263)]
a(n) = 2*a(n-1) - a(n-2); a(0)=2, a(1)=5. - Philippe Deléham, Nov 03 2008
a(n) = 6*n - a(n-1) + 1 with a(0)=2. - Vincenzo Librandi, Aug 25 2010
Conjecture: a(n) = n XOR A005351(n+1) XOR A005352(n+1). - Gilian Breysens, Jul 21 2017
E.g.f.: (2 + 3*x)*exp(x). - G. C. Greubel, Nov 02 2018
a(n) = A005449(n+1) - A005449(n). - Jinyuan Wang, Feb 03 2019
a(n) = -A016777(-1-n) for all n in Z. - Michael Somos, May 27 2019
a(n) = A007310(n+1) + (1 - n mod 2). - Walt Rorie-Baety, Sep 13 2021
a(n) = A000096(n+1) - A000217(n-1). See Capped Triangular Frames illustration. - Leo Tavares, Oct 05 2021

A122803 Powers of -2: a(n) = (-2)^n.

Original entry on oeis.org

1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, -2048, 4096, -8192, 16384, -32768, 65536, -131072, 262144, -524288, 1048576, -2097152, 4194304, -8388608, 16777216, -33554432, 67108864, -134217728, 268435456, -536870912, 1073741824, -2147483648, 4294967296, -8589934592, 17179869184
Offset: 0

Views

Author

Keywords

Comments

The number -2 can be used as a base of numeration (see the Weisstein link). - Alonso del Arte, Mar 30 2014
Contribution from M. F. Hasler, Oct 21 2014: (Start)
This is the inverse binomial transform of A033999 = n->(-1)^n, and the binomial transform of A033999*A000244 = n->(-3)^n, see also A141413.
Prefixed with one 0, i.e., (0,1,-2,4,...) = -A033999*A131577, it is the binomial transform of (0, 1, -4, 13, -40, 121,...) = -A033999*A003462, and inverse binomial transform of (0,1,0,1,0,1,...) = A000035.
Prefixed with two 0's, i.e., (0,0,1,-2,4,-8,...), it is the binomial transform of (0,0,1,-5,18,-58,179,-543,...) (cf. A000340) and inverse binomial transform of (0,0,1,1,2,2,3,3,...) = A004526. (End)
Prefixed with three 0's, this is the inverse binomial difference of (0, 0, 0, 1, 2, 4, 6, 9, 12, 16,...) = concat(0, A002620), which has as successive differences (0, 0, 1, 1, 2, 2,...) = A004526, then (0, 1, 0, 1,...) = A000035, then (1, -1, 1, -1,...) = A033999, and then (-2)^k*A033999 with k=1,2,3,... - Paul Curtz, Oct 16 2014, edited by M. F. Hasler, Oct 21 2014
Stirling-Bernoulli transform of triangular numbers: 1, 3, 6, 10, 15, 21, 28, ... - Philippe Deléham, May 25 2015

Crossrefs

Programs

Formula

a(n) = (-2)^n = (-1)^n * 2^n.
a(n) = -2*a(n-1), n > 0; a(0) = 1. G.f.: 1/(1+2x). - Philippe Deléham, Nov 19 2008
Sum_{n >= 0} 1/a(n) = 2/3. - Jaume Oliver Lafont, Mar 01 2009
E.g.f.: 1/exp(2*x). - Arkadiusz Wesolowski, Aug 13 2012
a(n) = Sum_{k = 0..n} (-2)^(n-k)*binomial(n, k)*A030195(n+1). - R. J. Mathar, Oct 15 2012
G.f.: 1/(1+2x). A122803 = A033999 * A000079. - M. F. Hasler, Oct 21 2014
a(n) = Sum_{k = 0..n} A163626(n,k)*A000217(k+1). - Philippe Deléham, May 25 2015

A005351 Base -2 representation for n regarded as base 2, then evaluated.

Original entry on oeis.org

0, 1, 6, 7, 4, 5, 26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, 17, 22, 23, 20, 21, 106, 107, 104, 105, 110, 111, 108, 109, 98, 99, 96, 97, 102, 103, 100, 101, 122, 123, 120, 121, 126, 127, 124, 125, 114, 115, 112, 113, 118, 119, 116, 117, 74, 75, 72, 73, 78, 79, 76
Offset: 0

Views

Author

Keywords

Comments

a(n) = n when n is a power of 4. This is because the even-indexed powers of 2 are the same as the even-indexed powers of -2. - Alonso del Arte, Feb 09 2012
a(n) = n if n is a sum of distinct powers of 4. - Michael Somos, Aug 27 2012
Write n = Sum_{i in b(n)} (-2)^(i - 1), which uniquely determines the set of positive integers b(n). Then a(n) = Sum_{i in b(n)} 2^(i - 1). For example, a(7) = 27 because 7 = (-2)^0 + (-2)^1 + (-2)^3 + (-2)^4 and 27 = 2^0 + 2^1 + 2^3 + 2^4. - Gus Wiseman, Jul 26 2019

Examples

			2 = 4+(-2)+0 = 110 => 6, 3 = 4+(-2)+1 = 111 => 7, ..., 6 = (16)+(-8)+0+(-2)+0 = 11010 => 26.
		

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 101.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A039724. Complement of A005352.
Cf. A185269 (primes in this sequence).

Programs

  • Haskell
    a005351 0 = 0
    a005351 n = a005351 n' * 2 + m where
       (n', m) = if r < 0 then (q + 1, r + 2) else (q, r)
                 where (q, r) = quotRem n (negate 2)
    -- Reinhard Zumkeller, Jul 07 2012
    
  • Mathematica
    a[n_] := Module[{t = 2(4^Floor[ Log[4, Abs[n] + 1] + 2] - 1)/3}, BitXor[n + t, t]]; Table[a[n], {n, 0, 60}] (* Robert G. Wilson v, Jan 24 2005 *)
  • PARI
    a(n) = my(t=(32*4^logint(abs(n)+1,4)-2)/3); bitxor(n+t,t); \\ Ruud H.G. van Tol, Oct 18 2023
  • Python
    def A005351(n):
        s, q = '', n
        while q >= 2 or q < 0:
            q, r = divmod(q, -2)
            if r < 0:
                q += 1
                r += 2
            s += str(r)
        return int(str(q)+s[::-1],2) # Chai Wah Wu, Apr 10 2016
    

Formula

a(4n+2) = 4a(n+1)+2, a(4n+3) = 4a(n+1)+3, a(4n+4) = 4a(n+1), a(4n+5) = 4a(n+1)+1, n>-2, a(1)=1. - Ralf Stephan, Apr 06 2004

Extensions

More terms from Robert G. Wilson v, Jan 24 2005

A212529 Negative numbers in base -2.

Original entry on oeis.org

11, 10, 1101, 1100, 1111, 1110, 1001, 1000, 1011, 1010, 110101, 110100, 110111, 110110, 110001, 110000, 110011, 110010, 111101, 111100, 111111, 111110, 111001, 111000, 111011, 111010, 100101, 100100, 100111, 100110, 100001, 100000, 100011, 100010, 101101, 101100, 101111, 101110, 101001, 101000, 101011, 101010, 11010101
Offset: 1

Views

Author

Joerg Arndt, May 20 2012

Keywords

Comments

The formula a(n) = A039724(-n) is slightly misleading because sequence A039724 isn't defined for n < 0, and none of the terms a(n) is a term of A039724. It can be seen as the definition of the extension of A039724 to negative indices. Also, recursive definitions or implementations of A039724 require that function to be defined for negative arguments, and using a generic formula it will work as expected for -n, n > 0. - M. F. Hasler, Oct 18 2018

Crossrefs

Cf. A039724 (nonnegative numbers in base -2).
Cf. A007608 (nonnegative numbers in base -4), A212526 (negative numbers in base -4).
Cf. A005352.

Programs

  • Haskell
    a212529 = a039724 . negate  -- Reinhard Zumkeller, Feb 05 2014
    
  • Maple
    a:= proc(n) local d, i, l, m;
          m:= n; l:= NULL;
          for i from 0 while m>0 do
            d:= irem(m, 2, 'm');
            if d=1 and irem(i, 2)=0 then m:= m+1 fi;
            l:= d, l
          od; parse(cat(l))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 20 2012
  • Mathematica
    negabin[n_] := negabin[n] = If[n == 0, 0, negabin[Quotient[n - 1, -2]]*10 + Mod[n, 2]]; a[n_] := negabin[-n]; Array[a, 50] (* Amiram Eldar, Jul 23 2023 *)
  • PARI
    A212529(n)=A039724(-n) \\ M. F. Hasler, Oct 16 2018
  • Python
    def A212529(n):
        s, q = '', -n
        while q >= 2 or q < 0:
            q, r = divmod(q, -2)
            if r < 0:
                q += 1
                r += 2
            s += str(r)
        return int(str(q)+s[::-1]) # Chai Wah Wu, Apr 09 2016
    

Formula

a(n) = A039724(-n). - Reinhard Zumkeller, Feb 05 2014

A178729 a(n) = n XOR 3n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 2, 4, 10, 8, 10, 20, 18, 16, 18, 20, 42, 40, 42, 36, 34, 32, 34, 36, 42, 40, 42, 84, 82, 80, 82, 84, 74, 72, 74, 68, 66, 64, 66, 68, 74, 72, 74, 84, 82, 80, 82, 84, 170, 168, 170, 164, 162, 160, 162, 164, 170, 168, 170, 148, 146, 144, 146, 148, 138, 136, 138, 132, 130
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

Formula

a(n) = A005351(n) XOR A005352(n) (conjectured). Proved by Verrill link.
a(n) = 2 * A184617(n). - Alois P. Heinz, Jul 21 2017

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A331819 Positive numbers k such that -k is a negative negabinary-Niven number, i.e., divisible by the sum of digits of its negabinary representation (A027615).

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 28, 30, 32, 33, 34, 36, 39, 40, 42, 44, 48, 54, 55, 56, 60, 63, 64, 66, 68, 70, 72, 77, 78, 80, 84, 90, 92, 96, 100, 102, 104, 108, 111, 112, 114, 115, 116, 120, 123, 124, 126, 128, 129, 130, 132, 135, 136, 138, 140
Offset: 1

Views

Author

Amiram Eldar, Jan 27 2020

Keywords

Examples

			6 is a term since A039724(-6) = 1110 and 1 + 1 + 1 + 0 = 3 is a divisor of 6.
		

Crossrefs

Programs

  • Mathematica
    negaBinWt[n_] := negaBinWt[n] = If[n==0, 0, negaBinWt[Quotient[n-1, -2]] + Mod[n, 2]]; negaBinNivenQ[n_] := Divisible[n, negaBinWt[-n]]; Select[Range[100], negaBinNivenQ]

A057892 Negabinary numbral addition table read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 6, 2, 3, 3, 3, 3, 4, 0, 12, 0, 4, 5, 5, 13, 13, 5, 5, 6, 26, 6, 2, 6, 26, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 4, 0, 4, 24, 4, 0, 4, 8, 9, 9, 1, 1, 25, 25, 1, 1, 9, 9, 10, 14, 10, 6, 26, 30, 26, 6, 10, 14, 10, 11, 11, 11, 11, 27, 27, 27, 27, 11, 11, 11, 11, 12, 8, 52, 8, 12, 24, 4, 24
Offset: 0

Views

Author

Marc LeBrun, Sep 25 2000

Keywords

Comments

Every negabinary numbral appears infinitely often (since every signed integer can be represented as a sum of two signed integers in infinitely many ways).

Examples

			a(4)=6 since a(4) corresponds to the table entry for [1]+[1]=1+1=2=4-2=[6].
a(24)=2 since a(24) corresponds to the table entry for [3]+[3]=(-1)+(-1)=-2=[2]. - _Sean A. Irvine_, Jul 11 2022
		

Crossrefs

Extensions

a(24) and a(84) corrected and title clarified by Sean A. Irvine, Jul 11 2022

A331892 Positive numbers k such that the negabinary expansion (A039724) of -k is palindromic.

Original entry on oeis.org

1, 5, 7, 17, 21, 31, 35, 57, 65, 85, 93, 119, 127, 147, 155, 201, 217, 257, 273, 325, 341, 381, 397, 455, 471, 511, 527, 579, 595, 635, 651, 745, 777, 857, 889, 993, 1025, 1105, 1137, 1253, 1285, 1365, 1397, 1501, 1533, 1613, 1645, 1767, 1799, 1879, 1911, 2015
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2020

Keywords

Comments

Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.

Examples

			5 is a term since the negabinary representation of -5 is 1111 which is palindromic.
		

Crossrefs

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; Select[Range[2000], PalindromeQ @ negabin[-#] &]

A057893 Negabinary numbral multiplication table.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 4, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 8, 1, 8, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 12, 15, 16, 15, 12, 7, 0, 0, 8, 14, 2, 20, 20, 2, 14, 8, 0, 0, 9, 16, 13, 24, 105, 24, 13, 16, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 20, 27, 32, 19, 4
Offset: 0

Views

Author

Marc LeBrun, Sep 25 2000

Keywords

Comments

Units are [1]=1 and [3]=-1.

Examples

			a(17)=6 since a(17) corresponds to the table entry for [3]+[2]=-1*-2=2=4-2=[6]
		

Crossrefs

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

Showing 1-10 of 14 results. Next