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

A138146 Palindromes with 2n-1 digits formed from the reflected decimal expansion of the concatenation of 1, 1, 1 and infinite 0's.

Original entry on oeis.org

1, 111, 11111, 1110111, 111000111, 11100000111, 1110000000111, 111000000000111, 11100000000000111, 1110000000000000111, 111000000000000000111, 11100000000000000000111
Offset: 1

Views

Author

Omar E. Pol, Mar 29 2008, May 18 2008

Keywords

Comments

Bisection of A138145.
a(n) is also A147597(n) written in base 2. [Omar E. Pol, Nov 08 2008]

Examples

			n ............ a(n)
1 ............. 1
2 ............ 111
3 ........... 11111
4 .......... 1110111
5 ......... 111000111
6 ........ 11100000111
7 ....... 1110000000111
8 ...... 111000000000111
9 ..... 11100000000000111
10 ... 1110000000000000111
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits@ If[n < 4, ConstantArray[1, 2 n - 1], Join[#, ConstantArray[0, 2 n - 7], #]] &@ ConstantArray[1, 3], {n, 14}] (* or *)
    Rest@ CoefficientList[Series[-x (10 x - 1) (10 x + 1) (100 x^2 + 10 x + 1)/((x - 1) (100 x - 1)), {x, 0, 14}], x] (* Michael De Vlieger, Nov 25 2016 *)
  • PARI
    Vec(-x*(10*x-1)*(10*x+1)*(100*x^2+10*x+1)/((x-1)*(100*x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2013

Formula

From Colin Barker, Sep 16 2013: (Start)
a(n) = 111 + 111*100^(n-2) for n>3.
a(n) = 101*a(n-1) - 100*a(n-2) for n>5.
G.f.: -x*(10*x-1)*(10*x+1)*(100*x^2+10*x+1) / ((x-1)*(100*x-1)). (End)

Extensions

Better definition from Omar E. Pol, Nov 16 2008

A135577 Numbers that have only the digit "1" as first, central and final digit. For numbers with 5 or more digits the rest of digits are "0".

Original entry on oeis.org

1, 111, 10101, 1001001, 100010001, 10000100001, 1000001000001, 100000010000001, 10000000100000001, 1000000001000000001, 100000000010000000001, 10000000000100000000001, 1000000000001000000000001, 100000000000010000000000001, 10000000000000100000000000001
Offset: 1

Views

Author

Omar E. Pol, Feb 24 2008

Keywords

Comments

Also, equal to A135576(n), written in base 2.
Essentially the same as A066138. - R. J. Mathar Apr 29 2008
a(n) has 2n-1 digits.

Examples

			----------------------------
n ............ a(n)
----------------------------
1 ............. 1
2 ............ 111
3 ........... 10101
4 .......... 1001001
5 ......... 100010001
6 ........ 10000100001
7 ....... 1000001000001
8 ...... 100000010000001
9 ..... 10000000100000001
10 ... 1000000001000000001
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, LinearRecurrence[{111, -1110, 1000}, {111, 10101, 1001001}, 25]] (* G. C. Greubel, Oct 19 2016 *)
    Join[{1},Table[FromDigits[Join[{1},PadRight[{},n,0],{1},PadRight[{},n,0],{1}]],{n,0,10}]] (* Harvey P. Dale, Aug 15 2022 *)
  • PARI
    Vec(-x*(2000*x^3-1110*x^2+1)/((x-1)*(10*x-1)*(100*x-1))  + O(x^100)) \\ Colin Barker, Sep 16 2013

Formula

a(n) = A135576(n), written in base 2.
Also, a(1)=1, for n>1; a(n)=(concatenation of 1, n-2 digits 0, 1, n-2 digits 0 and 1).
From Colin Barker, Sep 16 2013: (Start)
a(n) = 1 + 10^(n-1) + 100^(n-1) for n>1.
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>4.
G.f.: x*(2000*x^3 - 1110*x^2 + 1)/((1-x)*(10*x-1)*(100*x-1)). (End)
E.g.f.: (-111 - 200*x + 100*exp(x) + 10*exp(10*x) + exp(100*x))/100. - Elmo R. Oliveira, Jun 13 2025

A138145 Palindromes formed from the reflected decimal expansion of the concatenation of 1, 1, 1 and infinite 0's.

Original entry on oeis.org

1, 11, 111, 1111, 11111, 111111, 1110111, 11100111, 111000111, 1110000111, 11100000111, 111000000111, 1110000000111, 11100000000111, 111000000000111, 1110000000000111, 11100000000000111, 111000000000000111
Offset: 1

Views

Author

Omar E. Pol, Mar 29 2008

Keywords

Comments

a(n) is also A147596(n) written in base 2. - Omar E. Pol, Nov 08 2008

Examples

			n .... a(n)
1 .... 1
2 .... 11
3 .... 111
4 .... 1111
5 .... 11111
6 .... 111111
7 .... 1110111
8 .... 11100111
9 .... 111000111
10 ... 1110000111
11 ... 11100000111
12 ... 111000000111
13 ... 1110000000111
		

Crossrefs

Programs

  • Mathematica
    Table[If[n < 7, (10^n - 1)/9, 111 + 111*10^(n-3)], {n, 25}] (* or *)
    LinearRecurrence[{11, -10}, {1, 11, 111, 1111, 11111, 111111, 1110111}, 25] (* Paolo Xausa, Aug 08 2024 *)
  • PARI
    Vec(-x*(10*x^2-1)*(100*x^4+10*x^2+1)/((x-1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013

Formula

From Colin Barker, Sep 15 2013: (Start)
a(n) = 111+111*10^(n-3) for n>5.
a(n) = 11*a(n-1)-10*a(n-2).
G.f.: -x*(10*x^2-1)*(100*x^4+10*x^2+1) / ((x-1)*(10*x-1)). (End)

Extensions

Better definition from Omar E. Pol, Nov 16 2008

A138144 Palindromes formed from the reflected decimal expansion of the concatenation of 1, 1 and infinite 0's.

Original entry on oeis.org

1, 11, 111, 1111, 11011, 110011, 1100011, 11000011, 110000011, 1100000011, 11000000011, 110000000011, 1100000000011, 11000000000011, 110000000000011, 1100000000000011, 11000000000000011, 110000000000000011
Offset: 1

Views

Author

Omar E. Pol, Mar 29 2008

Keywords

Comments

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

Examples

			n .... a(n)
1 .... 1
2 .... 11
3 .... 111
4 .... 1111
5 .... 11011
6 .... 110011
7 .... 1100011
8 .... 11000011
9 .... 110000011
10 ... 1100000011
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11,-10},{1,11,111,1111,11011},20] (* Harvey P. Dale, Aug 21 2016 *)
  • PARI
    Vec(-x*(10*x^2-1)*(10*x^2+1)/((x-1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013

Formula

a(n) = 11+11*10^(n-2) for n>3. a(n) = 11*a(n-1)-10*a(n-2). G.f.: -x*(10*x^2-1)*(10*x^2+1) / ((x-1)*(10*x-1)). - Colin Barker, Sep 15 2013

Extensions

Better definition. - Omar E. Pol, Nov 15 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

A138119 Concatenation of n digits 1 and 2*n-1 digits 0.

Original entry on oeis.org

10, 11000, 11100000, 11110000000, 11111000000000, 11111100000000000, 11111110000000000000, 11111111000000000000000, 11111111100000000000000000, 11111111110000000000000000000, 11111111111000000000000000000000, 11111111111100000000000000000000000
Offset: 1

Views

Author

Omar E. Pol, Apr 03 2008

Keywords

Comments

a(n) has 3*n-1 digits.
a(n) is also A147538(n) written in base 2. - Omar E. Pol, Nov 08 2008.

Examples

			n ...... a(n)
1 ....... 10
2 ...... 11000
3 ..... 11100000
4 .... 11110000000
5 ... 11111000000000
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1100, -100000}, {10, 11000}, 15] (* Paolo Xausa, Feb 06 2024 *)
  • PARI
    Vec(10*x/((100*x-1)*(1000*x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2013

Formula

From Colin Barker, Sep 16 2013: (Start)
a(n) = 1100*a(n-1) - 100000*a(n-2).
G.f.: 10*x / ((100*x-1)*(1000*x-1)). (End)

A138147 Concatenation of n digits 1 and n digits 0.

Original entry on oeis.org

10, 1100, 111000, 11110000, 1111100000, 111111000000, 11111110000000, 1111111100000000, 111111111000000000, 11111111110000000000, 1111111111100000000000, 111111111111000000000000, 11111111111110000000000000, 1111111111111100000000000000, 111111111111111000000000000000
Offset: 1

Views

Author

Omar E. Pol, Mar 29 2008

Keywords

Comments

Also, a(n) = binary representation of A020522(n), for n>0 (see example).

Examples

			n ... A020522(n) ..... a(n)
1 ....... 2 ........... 10
2 ...... 12 .......... 1100
3 ...... 56 ......... 111000
4 ..... 240 ........ 11110000
5 ..... 992 ....... 1111100000
6 .... 4032 ...... 111111000000
7 ... 16256 ..... 11111110000000
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 136, Ex. 4.2.2. - N. J. A. Sloane, Jul 27 2012

Crossrefs

Programs

  • Magma
    [(10^(2*n) - 10^n)/9: n in [1..30]]; // Vincenzo Librandi, Apr 26 2011
    
  • Mathematica
    Table[FromDigits[Join[PadRight[{},n,1],PadRight[{},n,0]]],{n,15}] (* Harvey P. Dale, Nov 20 2011 *)
  • PARI
    Vec(10*x/((10*x-1)*(100*x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2013

Formula

a(n) = (10^(2*n) - 10^n)/9 = A002275(n)*10^n. - Omar E. Pol, Apr 16 2008
a(n) = 10*A109241(n-1). - Omar E. Pol, Nov 08 2008
From Colin Barker, Sep 16 2013: (Start)
a(n) = 110*a(n-1) - 1000*a(n-2).
G.f.: 10*x/((10*x-1)*(100*x-1)). (End)
From Elmo R. Oliveira, Jun 13 2025: (Start)
E.g.f.: exp(10*x)*(exp(90*x) - 1)/9.
a(n) = A276352(n)/9. (End)

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

Original entry on oeis.org

2, 28, 248, 2032, 16352, 131008, 1048448, 8388352, 67108352, 536869888, 4294965248, 34359734272, 274877898752, 2199023239168, 17592186011648, 140737488289792, 1125899906711552, 9007199254478848, 72057594037403648, 576460752302374912, 4611686018425290752
Offset: 1

Views

Author

Omar E. Pol, Nov 06 2008

Keywords

Comments

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

Crossrefs

Cf. A138118.

Programs

  • GAP
    List([1..20], n-> 2^n*(2^(2*n-1)-1)); # G. C. Greubel, Jan 12 2020
    
  • Magma
    [2^n*(2^(2*n-1)-1): n in [1..20]] // G. C. Greubel, Jan 12 2020
    
  • Maple
    seq(2^n*(2^(2*n-1)-1), n = 1..20); # G. C. Greubel, Jan 12 2020
  • Mathematica
    Table[FromDigits[Join[Table[1, {2n - 1}], Table[0, {n}]], 2], {n, 1, 20}] (* Stefan Steinerberger, Nov 11 2008 *)
  • PARI
    vector(20, n, 2^n*(2^(2*n-1)-1)) \\ G. C. Greubel, Jan 12 2020
    
  • Python
    def a(n): return ((1 << (2*n-1)) - 1) << n
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Feb 28 2021
  • Sage
    [2^n*(2^(2*n-1)-1) for n in (1..20)] # G. C. Greubel, Jan 12 2020
    

Formula

From Colin Barker, Nov 04 2012: (Start)
a(n) = 2^(n-1)*(4^n - 2) = 2*A147590(n).
a(n) = 10*a(n-1) - 16*a(n-2).
G.f.: 2*x*(1+4*x)/((1-2*x)*(1-8*x)). (End)

A138306 Least prime p such that 2n = p + g, where g is a prime primitive root of p, or 0 if there is no such prime p.

Original entry on oeis.org

0, 0, 0, 5, 7, 7, 0, 0, 11, 13, 17, 13, 0, 17, 23, 19, 23, 0, 0, 23, 23, 31, 43, 29, 37, 41, 37, 37, 41, 41, 43, 0, 47, 61, 41, 43, 67, 47, 47, 67, 59, 53, 73, 47, 47, 61, 53, 59, 67, 0, 59, 61, 59, 67, 97, 89, 97, 79, 71, 61, 79, 71, 73, 67, 71, 71, 97, 83, 71, 137, 113, 0, 103, 89
Offset: 1

Views

Author

T. D. Noe, Mar 14 2008

Keywords

Comments

Goldbach meets prime primitive prime roots. Sequence A138118 gives the number of representations for each 2n and sequence A138307 lists the values of 2n that are not represented.

Crossrefs

Cf. A138305 (prime primitive roots).

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
Showing 1-10 of 10 results.