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

A057692 Smallest prime which produces exactly n+1 different primes after n applications of the A048376 transform.

Original entry on oeis.org

2, 31, 641, 12422153, 66132153133
Offset: 0

Views

Author

G. L. Honaker, Jr., Oct 20 2000

Keywords

Comments

a(4) found by Carlos Rivera and confirmed to be the smallest by Paul Jobling (Paul.Jobling(AT)WhiteCross.com)
a(5) = 66132153133 leads to a final (probable) prime of 3560 digits. If zero is allowed, then a(5) = 12505785661 and the last (probable) prime would have 10982 digits. - Giovanni Resta, Sep 15 2011

Examples

			31 becomes 3331 and both 31 and 3331 are primes. 641 becomes 66666644441 and then 66666666666666666666666666666666666644444444444444441 and all 3 are primes.
		

Crossrefs

a(1,2,3,...) is a subsequence of A057628.

Programs

  • PARI
    A057692(n,s=2)={ forprime(p=s,, my(q=p); for(i=2,n, isprime(q=A048376(q))||next(2)); isprime(A048376(q))||return(p))} \\ Impractical for n>3. - M. F. Hasler, Jan 23 2013

Extensions

a(5) from Giovanni Resta, Sep 15 2011
Definition corrected by M. F. Hasler, Jan 23 2013

A000461 Concatenate n n times.

Original entry on oeis.org

1, 22, 333, 4444, 55555, 666666, 7777777, 88888888, 999999999, 10101010101010101010, 1111111111111111111111, 121212121212121212121212, 13131313131313131313131313, 1414141414141414141414141414, 151515151515151515151515151515, 16161616161616161616161616161616
Offset: 1

Views

Author

John Radu (Suttones(AT)aol.com)

Keywords

Examples

			From _Bruno Berselli_, Oct 05 2018: (Start)
.         1 * 9 = 09
.        22 * 9 = 198
.       333 * 9 = 2997
.      4444 * 9 = 39996
.     55555 * 9 = 499995
.    666666 * 9 = 5999994
.   7777777 * 9 = 69999993
.  88888888 * 9 = 799999992
. 999999999 * 9 = 8999999991
(End)
		

References

  • F. Smarandache, "Properties of the numbers", Univ. of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ.

Crossrefs

Programs

  • Haskell
    a000461 n = (read $ concat $ replicate n $ show n) :: Integer
    -- Reinhard Zumkeller, Apr 26 2011
    
  • Maple
    a:= n-> parse(cat(n$n)):
    seq(a(n), n=1..20);  # Alois P. Heinz, Apr 26 2011
  • Mathematica
    Table[Sum[(n)*10^(i*(Floor[Log[10, n]] + 1)), {i, 0, n - 1}], {n, 1, 30}] (* José de Jesús Camacho Medina, Dec 10 2014 *)
    Table[FromDigits[Flatten[IntegerDigits/@Table[n,{n}]]],{n,15}] (* Harvey P. Dale, Mar 01 2015 *)
    Table[FromDigits[PadRight[{},n IntegerLength[n],IntegerDigits[n]]],{n,15}] (* Harvey P. Dale, Jun 19 2016 *)
  • PARI
    a(n) = eval(concat(apply(x->Str(x), vector(n, k, n)))); \\ Michel Marcus, Oct 05 2018; Feb 12 2023
    
  • Python
    def a(n): return int(str(n)*n)
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Jan 22 2021

Formula

a(n) = n*(10^(n*L(n))-1)/(10^L(n)-1) where L(n) = A004216(n)+1 = floor(log_10(10n)). - Henry Bottomley, Jun 01 2000
A055642(a(n)) = n * A055642(n). - Reinhard Zumkeller, Apr 26 2011
a(n) = Sum_{i=0..n-1} (n*10^(i*(floor(log(10, n)) + 1))). - José de Jesús Camacho Medina, Dec 10 2014

A053422 n times (n 1's): a(n) = n*(10^n - 1)/9.

Original entry on oeis.org

0, 1, 22, 333, 4444, 55555, 666666, 7777777, 88888888, 999999999, 11111111110, 122222222221, 1333333333332, 14444444444443, 155555555555554, 1666666666666665, 17777777777777776, 188888888888888887, 1999999999999999998, 21111111111111111109, 222222222222222222220, 2333333333333333333331
Offset: 0

Views

Author

Henry Bottomley, Mar 07 2000

Keywords

Comments

R_a(n) is the least repunit divisible by the square of R_n = (10^n - 1)/9. - Lekraj Beedassy, Jun 07 2006

Crossrefs

Programs

  • Magma
    I:=[0, 1, 22, 333]; [n le 4 select I[n] else 22*Self(n-1) - 141*Self(n-2) +220*Self(n-3) -100*Self(n-4): n in [1..30]]; // G. C. Greubel, May 25 2018
  • Mathematica
    LinearRecurrence[{22,-141,220,-100}, {0, 1, 22, 333}, 50] (* G. C. Greubel, May 25 2018 *)
    CoefficientList[Series[x (1-10x^2)/((1-x)^2(1-10x)^2),{x,0,30}],x] (* Harvey P. Dale, Jun 29 2021 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x*(1-10*x^2)/((1-x)^2*(1-10*x)^2))) \\ G. C. Greubel, May 25 2018
    
  • Sage
    [gaussian_binomial(n,1,10)*n for n in range(0,22)] # Zerinvary Lajos, May 29 2009
    

Formula

a(n) = n*A002275(n) = a(n-1)*10n/(n-1) + n.
O.g.f.: x*(1-10*x^2)/((1-x)^2*(1-10*x)^2). - R. J. Mathar, Jan 21 2008
E.g.f.: x*exp(x)*(10*exp(9*x) - 1)/9. - Stefano Spezia, Sep 14 2023

Extensions

Corrected by Jason Earls, Sep 02 2006

A048377 Append d digits d after each digit d in decimal expansion of n.

Original entry on oeis.org

0, 11, 222, 3333, 44444, 555555, 6666666, 77777777, 888888888, 9999999999, 110, 1111, 11222, 113333, 1144444, 11555555, 116666666, 1177777777, 11888888888, 119999999999, 2220, 22211, 222222, 2223333, 22244444, 222555555, 2226666666
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

a(10^n) = 11 * 10^n; A007953(a(n)) = A003132(n) + A007953(n). [Reinhard Zumkeller, Jul 10 2011]

Examples

			12 becomes 1 1 2 22 = 11222.
		

Crossrefs

Cf. A048376.

Programs

  • Haskell
    import Data.Char (digitToInt)
    a048377 :: Integer -> Integer
    a048377 n =
       read $ concat $ zipWith replicate (map ((+ 1) . digitToInt) ns) ns
          where ns = show n
    -- Reinhard Zumkeller, Jul 10 2011
  • Mathematica
    den[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Flatten[Table[ Table[ idn[[i]],{idn[[i]]+1}],{i,Length[idn]}]]]]; Array[den,30,0] (* Harvey P. Dale, Sep 04 2013 *)

A057628 Primes such that replacing each digit d with d copies of the digit d produces a prime. Zeros are not allowed.

Original entry on oeis.org

11, 31, 53, 131, 149, 223, 283, 311, 313, 331, 397, 463, 641, 691, 937, 941, 1439, 1511, 1741, 1871, 1949, 1993, 1999, 2111, 2447, 2939, 3163, 3391, 3433, 3499, 3559, 3593, 3659, 3911, 3931, 5227, 5399, 5923, 6163, 6269, 6653, 6719, 7177, 7741, 8389
Offset: 1

Views

Author

G. L. Honaker, Jr., Oct 10 2000

Keywords

Comments

"Replacing each digit d with d copies of the digit d" is the function A048376. Therefore this is the largest subset of A038618 stable under the map A048376.

Examples

			E.g. 641 becomes 66666644441 which is also prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1500]],PrimeQ[FromDigits[Flatten[Table[#,{#}]&/@ IntegerDigits[#]]]]&&DigitCount[#,10,0]==0&]  (* Harvey P. Dale, Mar 27 2011 *)
  • PARI
    is_A057628(n)={vecmin(digits(n)) && is_A057630(n)} \\ M. F. Hasler, Jan 23 2013

Extensions

More terms from Patrick De Geest, Oct 15 2000.
Offset changed to 1, according to OEIS conventions, by M. F. Hasler, Jan 23 2013

A057630 Primes such that replacing each digit d with d copies of the digit d produces a prime. Zeros are allowed.

Original entry on oeis.org

11, 31, 53, 101, 131, 149, 223, 283, 311, 313, 331, 397, 463, 503, 641, 691, 937, 941, 1031, 1049, 1069, 1301, 1409, 1439, 1511, 1609, 1741, 1871, 1949, 1993, 1999, 2083, 2111, 2203, 2447, 2803, 2939, 3001, 3011, 3061, 3163, 3301, 3391, 3433, 3499, 3559
Offset: 1

Views

Author

G. L. Honaker, Jr., Oct 10 2000

Keywords

Comments

"Replacing each digit d with d copies of the digit d" is the function A048376, well defined on the set of positive integers. Therefore (the range of) the present sequence is the largest subset of A000040 stable under the operation A048376.
A004022 is a subsequence. - Chai Wah Wu, Dec 19 2019

Examples

			E.g. 641 becomes 66666644441 which is also prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[FromDigits[Flatten[Table[#,{#}]&/@ IntegerDigits[ #]]]]&]  (* Harvey P. Dale, Dec 18 2010 *)
  • PARI
    is_A057630(n)={isprime(A048376(n)) && isprime(n)} \\ M. F. Hasler, Jan 23 2013
    
  • Python
    from sympy import isprime, nextprime
    A057630_list, dlist, p = [], [str(d)*d for d in range(10)], 2
    while len(A057630_list) < 10000:
        if isprime(int(''.join(dlist[int(d)] for d in str(p)))):
            A057630_list.append(p)
        p = nextprime(p) # Chai Wah Wu, Dec 19 2019, corrected Jan 01 2022

Extensions

More terms from Patrick De Geest, Oct 15 2000
Offset changed to 1, according to OEIS conventions, by M. F. Hasler, Jan 23 2013

A158849 a(10n+m) is the integer with n+m concatenations of the digit m in base 10, 0<=m<=9.

Original entry on oeis.org

1, 22, 333, 4444, 55555, 666666, 7777777, 88888888, 999999999, 0, 11, 222, 3333, 44444, 555555, 6666666, 77777777, 888888888, 9999999999, 0, 111, 2222, 33333, 444444, 5555555, 66666666, 777777777, 8888888888, 99999999999, 0, 1111
Offset: 1

Views

Author

Paul Curtz, Mar 28 2009

Keywords

Crossrefs

Extensions

Edited by R. J. Mathar, Apr 04 2009

A118115 Partial sums of n concatenated n times.

Original entry on oeis.org

1, 23, 356, 4800, 60355, 727021, 8504798, 97393686, 1097393685, 10101010102107494695, 1121212121213218605806, 122333333333334430727018, 13253646464646465743858331, 1427395060606060607157999745, 152942546575757575758673151260, 16314558708191919191920289312876
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2006

Keywords

Examples

			a(2) = 1 + 22 = 23 is prime.
a(6) = 1 + 22 + 333 + 4444 + 55555 + 666666 = 727021 is prime.
For what value of n is the next prime a(n)?
a(158), which has 474 digits, is prime. - _Harvey P. Dale_, Oct 17 2011
		

References

  • F. Smarandache, "Properties of the numbers", Univ. of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ.

Crossrefs

Cf. A000461 (concatenate n n times), A004216, A048376, A053422.

Programs

  • Mathematica
    Accumulate[FromDigits/@Table[Flatten[IntegerDigits/@PadLeft[{},n,n]], {n,15}]] (* Harvey P. Dale, Oct 17 2011 *)

Formula

a(n) = Sum_{i=1..n} A000461(i). a(n) = Sum_{i=1..n} i*(10^(i*L(i))-1)/(10^L(i)-1) where L(i) = A004216(i) + 1 = floor(log_10(10i)).

A118117 Concatenate n F(n) times.

Original entry on oeis.org

1, 2, 33, 444, 55555, 66666666, 7777777777777, 888888888888888888888, 9999999999999999999999999999999999, 10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2006

Keywords

Comments

A000461 Concatenate n n times.

Examples

			a(6) = 6 concatenated F(6) times = 6 concatenated 8 times = 66666666, where F(n) = the n-th Fibonacci number.
		

References

  • F. Smarandache, "Properties of the numbers", Univ. of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ.

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@PadRight[{},Fibonacci[n],n]]],{n,10}] (* Harvey P. Dale, Aug 09 2020 *)

Formula

a(n) = n concatenated A000045(n) times. a(n) = A000027(n) concatenated A000045(n) times.
Showing 1-9 of 9 results.