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-7 of 7 results.

A138118 Concatenation of 2n-1 digits 1 and n digits 0.

Original entry on oeis.org

10, 11100, 11111000, 11111110000, 11111111100000, 11111111111000000, 11111111111110000000, 11111111111111100000000, 11111111111111111000000000, 11111111111111111110000000000
Offset: 1

Views

Author

Omar E. Pol, Mar 29 2008

Keywords

Comments

a(n) is also A147537(n) written in base 2. [From Omar E. Pol, Nov 08 2008]

Examples

			n .......... a(n)
1 ........... 10
2 ......... 11100
3 ....... 11111000
4 ..... 11111110000
5 ... 11111111100000
		

Crossrefs

Programs

  • Mathematica
    FromDigits/@Table[Join[PadRight[{},2n-1,1],PadRight[{},n,0]],{n,15}] (* Harvey P. Dale, Dec 09 2011 *)

Formula

O.g.f.: 10*(1+100x)/[(-1+1000x)*(-1+10x)]. a(n)=A100706(n)*10^n = 10*a(n-1)+11*1000^n. - R. J. Mathar, Apr 03 2008

A147590 Numbers whose binary representation is the concatenation of 2n-1 digits 1 and n-1 digits 0.

Original entry on oeis.org

1, 14, 124, 1016, 8176, 65504, 524224, 4194176, 33554176, 268434944, 2147482624, 17179867136, 137438949376, 1099511619584, 8796093005824, 70368744144896, 562949953355776, 4503599627239424, 36028797018701824, 288230376151187456
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2008

Keywords

Comments

a(n) is the number whose binary representation is A147589(n).

Examples

			     1_10 is 1_2;
    14_10 is 1110_2;
   124_10 is 1111100_2;
  1016_10 is 1111111000_2.
		

Crossrefs

Programs

Formula

a(n) = A147537(n)/2.
From R. J. Mathar, Jul 13 2009: (Start)
a(n) = 8^n/4 - 2^(n-1) = A083332(2n-2).
a(n) = 10*a(n-1) - 16*a(n-2).
G.f.: x*(1+4*x)/((1-2*x)*(1-8*x)). (End)
From César Aguilera, Jul 26 2019: (Start)
Lim_{n->infinity} a(n)/a(n-1) = 8;
a(n)/a(n-1) = 8 + 6/A083420(n). (End)
E.g.f.: (1/4)*(exp(2*x)*(-2 + exp(6*x)) + 1). - Stefano Spezia, Aug 05 2019
a(n) = A020540(n - 1)/4. - Jon Maiga, Aug 05 2019

Extensions

More terms from R. J. Mathar, Jul 13 2009
Typo in a(12) corrected by Omar E. Pol, Jul 20 2009

A147595 a(n) is the number whose binary representation is A138144(n).

Original entry on oeis.org

1, 3, 7, 15, 27, 51, 99, 195, 387, 771, 1539, 3075, 6147, 12291, 24579, 49155, 98307, 196611, 393219, 786435, 1572867, 3145731, 6291459, 12582915, 25165827, 50331651, 100663299, 201326595, 402653187, 805306371, 1610612739, 3221225475
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2008

Keywords

Crossrefs

Programs

  • Magma
    [1,3,7] cat [3*(1+2^(n-2)): n in [4..40]]; // G. C. Greubel, Oct 25 2022
    
  • Mathematica
    LinearRecurrence[{3,-2},{1,3,7,15,27},40] (* Harvey P. Dale, Nov 30 2020 *)
  • PARI
    Vec(-x*(2*x^2-1)*(2*x^2+1)/((x-1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
    
  • SageMath
    [1,3,7]+[3*(1+2^(n-2)) for n in range(4,40)] # G. C. Greubel, Oct 25 2022

Formula

a(n) = A060013(n+2), n > 3. - R. J. Mathar, Feb 05 2010
a(n+4) = 3*(2^(n+2) + 1), n >= 0. - Brad Clardy, Apr 03 2013
From Colin Barker, Sep 15 2013: (Start)
a(n) = 3*(4 + 2^n)/4 for n>3.
a(n) = 3*a(n-1) - 2*a(n-2).
G.f.: x*(1-2*x^2)*(1+2*x^2) / ((1-x)*(1-2*x)). (End)
E.g.f.: (3/4)*(4*exp(x) + exp(2*x)) - (15/4) - 7*x/2 - 3*x^2/2 - x^3/3. - G. C. Greubel, Oct 25 2022

Extensions

Extended by R. J. Mathar, Feb 05 2010

A147596 a(n) is the number whose binary representation is A138145(n).

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 119, 231, 455, 903, 1799, 3591, 7175, 14343, 28679, 57351, 114695, 229383, 458759, 917511, 1835015, 3670023, 7340039, 14680071, 29360135, 58720263, 117440519, 234881031, 469762055, 939524103, 1879048199, 3758096391
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2008

Keywords

Crossrefs

Programs

  • Magma
    [1,3,7,15,31] cat [7*(1+2^(n-3)): n in [6..40]]; // G. C. Greubel, Oct 25 2022
    
  • Mathematica
    Join[{1,3,7,15,31}, 7*(1+2^(Range[6, 40] -3))] (* G. C. Greubel, Oct 25 2022 *)
  • PARI
    Vec(-x*(2*x^2-1)*(4*x^4+2*x^2+1)/((x-1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
    
  • SageMath
    def A147596(n): return 7*(1+2^(n-3)) -(1/8)*(63*int(n==0) +62*int(n==1) +60*int(n ==2)) -(7*int(n==3) +6*int(n==4) +4*int(n==5))
    [A147596(n) for n in range(1,40)] # G. C. Greubel, Oct 25 2022

Formula

a(n) = 7*(2^(n-3) + 1) if n >= 6. - Hagen von Eitzen, Jun 02 2009
From Colin Barker, Sep 15 2013: (Start)
a(n) = 3*a(n-1) - 2*a(n-2), for n >= 8.
G.f.: x*(1-2*x^2)*(1+2*x^2+4*x^4) / ((1-x)*(1-2*x)). (End)
E.g.f.: (7/8)*(8*exp(x) + exp(2*x)) - (1/8)*(63 + 62*x + 30*x^2) - 7*x^3/6 - x^4/4 - x^5/30. - G. C. Greubel, Oct 25 2022

Extensions

More terms from Hagen von Eitzen, Jun 02 2009

A147597 a(n) is the number whose binary representation is A138146(n).

Original entry on oeis.org

1, 7, 31, 119, 455, 1799, 7175, 28679, 114695, 458759, 1835015, 7340039, 29360135, 117440519, 469762055, 1879048199, 7516192775, 30064771079, 120259084295, 481036337159, 1924145348615, 7696581394439, 30786325577735, 123145302310919, 492581209243655
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2008

Keywords

Comments

Bisection of A147596.

Crossrefs

Programs

  • Magma
    [1,7,31] cat [7*(1+4^(n-2)): n in [4..40]]; // G. C. Greubel, Oct 25 2022
    
  • Mathematica
    Table[FromDigits[#, 2] &@ If[n < 4, ConstantArray[1, 2 n - 1], Join[#, ConstantArray[0, 2 n - 7], #]] &@ ConstantArray[1, 3], {n, 25}] (* or *)
    Rest@ CoefficientList[Series[x (2 x + 1) (2 x - 1) (4 x^2 + 2 x + 1)/((4 x - 1) (1 - x)), {x, 0, 25}], x] (* Michael De Vlieger, Nov 25 2016 *)
    LinearRecurrence[{5,-4},{1,7,31,119,455},30] (* Harvey P. Dale, Aug 04 2025 *)
  • PARI
    Vec(x*(2*x+1)*(2*x-1)*(4*x^2+2*x+1)/((4*x-1)*(1-x)) + O(x^30)) \\ Colin Barker, Nov 25 2016
    
  • SageMath
    def A147597(n): return 7*(1+4^(n-2)) -(119/16)*int(n==0) -(31/4)*int(n==1) -7*int(n==2) -4*int(n==3)
    [A147597(n) for n in range(1,41)] # G. C. Greubel, Oct 25 2022

Formula

From R. J. Mathar, Feb 05 2010: (Start)
a(n) = 5*a(n-1) - 4*a(n-2) for n>5.
G.f.: x*(2*x+1)*(2*x-1)*(4*x^2+2*x+1)/((4*x-1)*(1-x)). (End)
a(n) = 7*4^(n-2) + 7 for n>3. - Colin Barker, Nov 25 2016
E.g.f.: (7/16)*(16*exp(x) + exp(4*x)) -(119/16) -31*x/4 -7*x^2/2 -2*x^3/3. - G. C. Greubel, Oct 25 2022

Extensions

More terms from R. J. Mathar, Feb 05 2010

A147589 Concatenation of 2n-1 digits 1 and n-1 digits 0.

Original entry on oeis.org

1, 1110, 1111100, 1111111000, 1111111110000, 1111111111100000, 1111111111111000000, 1111111111111110000000, 1111111111111111100000000, 1111111111111111111000000000, 1111111111111111111110000000000
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2008

Keywords

Comments

a(n) is also A147590(n) written in base 2.

Examples

			n .......... a(n)
1 ........... 1
2 ......... 1110
3 ....... 1111100
4 ..... 1111111000
5 ... 1111111110000
		

Crossrefs

Programs

  • PARI
    vector(100, n, 10^(-2+n)*(-10+100^n)/9) \\ Colin Barker, Jul 08 2014
    
  • PARI
    Vec(x*(100*x+1)/((10*x-1)*(1000*x-1)) + O(x^100)) \\ Colin Barker, Jul 08 2014

Formula

a(n) = A138118(n)/10.
a(n) = {[10^(2*n-1)-1]*10^(n-1)}/9, with n>=1. - Paolo P. Lava, Nov 26 2008
G.f.: x*(100*x+1) / ((10*x-1)*(1000*x-1)). - Colin Barker, Jul 08 2014

Extensions

Keyword:base added by Charles R Greathouse IV, Apr 28 2010

A358167 Irregular triangle read by rows: T(n, k) = k-th fixed point in Zhegalkin permutation n (row n of A197819).

Original entry on oeis.org

0, 1, 0, 2, 0, 6, 8, 14, 0, 30, 40, 54, 72, 86, 96, 126, 128, 158, 168, 182, 200, 214, 224, 254, 0, 510, 680, 854, 1224, 1334, 1632, 1950, 2176, 2430, 2600, 3030, 3144, 3510, 3808, 3870, 4320, 4382, 4680, 5046, 5160
Offset: 0

Views

Author

Tilman Piesk, Nov 01 2022

Keywords

Comments

Let R = A197819(n, ...) and F = a(n, ...). Then F are the fixed points of R.
But there is a second relationship between F and R:
Let X(i) = R(i) XOR i. Then X(i) is an element of F.
Let I_k = {i | X(i) = F(k)}. Let Q = A197819(n-1, ...).
Then I_k = {Q(k) XOR f | f in F}.
Row lengths are 2, 2, 4, 16, 256, 65536, ..., i.e., A001146(n-1) for n > 0.
Row sums are 1, 2, 28, 2032, 8388352, ..., i.e., A147537(A000225) for n > 0.

Examples

			Triangle begins:
     k  0    1    2   3    4   5   6    7    8    9   10   11   12   13   14   15
  n
  0     0,   1
  1     0,   2
  2     0,   6,   8, 14
  3     0,  30,  40, 54,  72, 86, 96, 126, 128, 158, 168, 182, 200, 214, 224, 254
  4     0, 510, 680...
A197819(3, 168) = a(3, 10) = 168.
How to calculate the term for n=3, k=10:
  p = A197819(n-1, k) = A197819(2, 10) = 2
  p XOR k = 2 XOR 10 = 8
  shifted_k = 2^(2^(n-1)) * k = 2^(2^2) * 10 = 160
  (p XOR k) + shifted_k = 8 + 160 = 168
168 in little-endian binary is 00010101. The corresponding algebraic normal form is XOR(AND(x0, x1), AND(x0, x2), AND(x0, x1, x2)). (Its ANDs correspond to the 3 binary 1s.) The truth table of this Boolean function is again 00010101.
  (With x0 = 01010101, x1 = 00110011, x2 = 00001111.)
Example for the second relationship with A197819, as described in COMMENTS:
  Let R = A197819(3, 0..255), F = a(3, 0..15), Q = A197819(2, 0..15).
  I_3 = {i | R(i) XOR i = F(3)}
      = {Q(3) XOR f | f in F} = {5 XOR f | f in F}
      = {5, 27, 45, 51, 77, 83, 101, 123, 133, 155, 173, 179, 205, 211, 229, 251}
  R(5) XOR 5  =  R(27) XOR 27  =  R(45) XOR 45  =  R(51) XOR 51  =  ...  =  F(3)
   51  XOR 5  =    45  XOR 27  =    27  XOR 45  =     5  XOR 51  =  ...  =   54
		

Crossrefs

Programs

  • Python
    def a(n, k):
        if n == 0:
            assert k < 2
            return k
        else:
            row_length = 1 << (1 << (n-1))  # 2 ** 2 ** (n-1)
            assert k < row_length
        p = a197819(n-1, k)
        p_xor_k = p ^ k
        shifted_k = row_length * k
        return p_xor_k + shifted_k

Formula

For n>0: T(n, k) = [A197819(n-1, k) XOR k] + [2^(2^(n-1)) * k].
(On this page "XOR" always is the bitwise exclusive or.)
For n>0: T(n, A058891(n)) = A058891(n+1) is the unique power of 2 in row n.
Showing 1-7 of 7 results.