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

A173426 a(n) is obtained by starting with 1, sequentially concatenating all decimal numbers up to n, and then, starting from n-1, sequentially concatenating all decimal numbers down to 1.

Original entry on oeis.org

1, 121, 12321, 1234321, 123454321, 12345654321, 1234567654321, 123456787654321, 12345678987654321, 12345678910987654321, 123456789101110987654321, 1234567891011121110987654321, 12345678910111213121110987654321, 123456789101112131413121110987654321
Offset: 1

Views

Author

Umut Uludag, Feb 18 2010

Keywords

Comments

The first prime in this sequence is the 20-digit number a(10) = 12345678910987654321. On Jul 20 2015, Shyam Sunder Gupta reported on the Number Theory Mailing List that he has found what is probably the second prime in the sequence. This is the 2446th term, namely the 17350-digit probable prime 1234567..244524462445..7654321. See A359148. - N. J. A. Sloane, Jul 29 2015 - Aug 03 2015
There are no other (PR)prime members in this sequence for n<60000. - Serge Batalov, Jul 29 2015
David Broadhurst gives heuristic arguments which suggest that this sequence contains infinitely many primes.
See A075023 and A075024 for the smallest and largest prime factor of the terms. - M. F. Hasler, Jul 29 2015
Using summation in decimal length clades, one can obtain analytical expressions for the sequence:
a(n) = A002275(n)^2, for 1 <= n < 10;
a(n) = (120999998998*10^(4*n-28) - 2*10^(2*n-9) + 8790000000121)/99^2, for 10 <= n < 10^2;
a(n) = (120999998998*10^(6*n-227) - (1099022*10^(6*n-406) + 242*10^(3*n-108) - 1087789*10^191)/111^2 + 8790000000121)/99^2, for 10^2 <= n < 10^3; etc. - Serge Batalov, Jul 29 2015
Curiously, 1234567891010987654321 is also a prime (see A259937). - N. J. A. Sloane, Nov 30 2021

References

  • D. Broadhurst, Primes from concatenation: results and heuristics, Number Theory List, Aug 01 2015 and later postings.

Crossrefs

This sequence and A002477 (Wonderful Demlo numbers) agree up to the 9th term.

Programs

  • Maple
    a:= n-> parse(cat($1..n, n-i$i=1..n-1)):
    seq(a(n), n=1..14);  # Alois P. Heinz, Dec 01 2021
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@Join[Range[n],Reverse[Range[ n-1]]]]],{n,15}] (* Harvey P. Dale, Sep 02 2015 *)
  • PARI
    A173426(n)=eval(concat(vector(n*2-1,k,if(kM. F. Hasler, Jul 29 2015
    
  • Python
    def A173426(n): return int(''.join(str(d) for d in range(1,n+1))+''.join(str(d) for d in range(n-1,0,-1))) # Chai Wah Wu, Dec 01 2021

Formula

a(n) = concatenate(1,2,3,...,n-2,n-1,n,n-1,n-2,...,3,2,1).

Extensions

More terms from and minor edits by M. F. Hasler, Jul 29 2015

A007907 Concatenation of sequence (1, 2, ..., floor((n-1)/2), floor(n/2), floor(n/2)-1, ..., 1) for n >= 1.

Original entry on oeis.org

1, 11, 121, 1221, 12321, 123321, 1234321, 12344321, 123454321, 1234554321, 12345654321, 123456654321, 1234567654321, 12345677654321, 123456787654321, 1234567887654321, 12345678987654321
Offset: 1

Views

Author

R. Muller

Keywords

Comments

For n < 4900, a(2) = A259937(1) = 11, a(19) = A173426(10) = 12345678910987654321, a(20) = A259937(10) = 1234567891010987654321 and a(4891) = A173426(2446) = 1234567..244524462445..7654321 are primes (see A173426 and A259937). - XU Pingya, May 19 2017

References

  • M. Le, The Primes in the Smarandache Symmetric Sequences, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 174-175.

Crossrefs

Programs

  • Mathematica
    Table[FromDigits@ Flatten@ Map[IntegerDigits, Apply[Join, {#, If[OddQ@ n, Rest@ #, #] &@ Reverse@ #}]] &@ Range@ Ceiling[n/2], {n, 17}] (* Michael De Vlieger, May 20 2017 *)

A274766 Multiplication of pair of contiguous repunits, i.e., (0*1, 1*11, 11*111, 111*1111, 1111*11111, ...).

Original entry on oeis.org

0, 11, 1221, 123321, 12344321, 1234554321, 123456654321, 12345677654321, 1234567887654321, 123456789987654321, 12345679010987654321, 1234567901220987654321, 123456790123320987654321, 12345679012344320987654321, 1234567901234554320987654321
Offset: 0

Views

Author

Rodolfo A. Fiorini, Jul 05 2016

Keywords

Comments

From the second to the tenth term they look like in A259937, but it is a completely different sequence.
The inverse of sequence terms, except the first one, give a sequence of periodic terms with periods as in A002378, the sequence of oblong (or promic, or heteromecic) numbers: a(n) = n*(n+1). Digit string period L of inverse a(n) is given by L = n*(n+1).

Examples

			a(10) = rep(10)*rep(11) = 12345679010987654321, digit string period of 1/a(10) -> L = 10*11 = 110.
		

Crossrefs

Programs

  • Mathematica
    Table[(10^n - 1) (10^(n + 1) - 1)/81, {n, 0, 20}] (* Bruno Berselli, Jul 05 2016 *)
  • PARI
    concat(0, Vec(11*x/((1-x)*(1-10*x)*(1-100*x)) + O(x^99))) \\ Altug Alkan, Jul 05 2016
    
  • PARI
    a(n) = (1-11*10^n+10^(1+2*n))/81 \\ Colin Barker, Jul 05 2016

Formula

O.g.f.: 11*x/((1 - x)*(1 - 10*x)*(1 - 100*x)).
E.g.f.: (1 - 11*exp(9*x) + 10*exp(99*x))*exp(x)/81.
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>2, a(0)=0, a(1)=11, a(2)=1221.
a(n) = (10^n - 1)*(10^(n+1) - 1)/81 = A002275(n)*A002275(n+1).

Extensions

Edited and added formulae by Bruno Berselli, Jul 05 2016
Last term corrected by Colin Barker, Jul 05 2016

A244861 Consider the concatenation in ascending order of the first x natural numbers and then concatenate its reverse. Sequence gives the decimal expansion of the sum of the reciprocals of such numbers.

Original entry on oeis.org

0, 9, 1, 7, 3, 6, 2, 8, 2, 4, 7, 4, 1, 9, 3, 3, 7, 2, 5, 0, 0, 2, 9, 5, 9, 8, 4, 2, 9, 8, 2, 9, 3, 9, 5, 0, 9, 3, 2, 0, 7, 5, 2, 7, 3, 0, 0, 9, 2, 8, 1, 4, 2, 5, 7, 2, 9, 3, 5, 1, 1, 3, 6, 0, 3, 2, 9, 5, 6, 0, 8, 7, 6, 6, 6, 9, 6, 7, 8, 2, 7, 0, 7, 6, 2, 4
Offset: 0

Views

Author

Paolo P. Lava, Nov 12 2014

Keywords

Comments

Decimal expansion of 1/11 + 1/1221 + 1/123321 + ... + 1/123456789987654321 + 1/1234567891001987654321 + 1/12345678910111101987654321 + 1/123456789101112211101987654321 + ...
0.0917362824741933725002959842982939... = [0, 10, 1, 9, 12, 4, 1, 3, 6].
Rational approximation up to the 11th decimal digit: 14649/159686.

Examples

			0.091736282474193372500295984298293950932...
		

Crossrefs

Cf. A259937.

Programs

  • Maple
    with(numtheory): T:=proc(w) local x,y,z; x:=w; y:=0;
    for z from 1 to ilog10(x)+1 do y:=y*10+(x mod 10); x:=trunc(x/10); od; y: end:
    P:=proc(q) local a,b,n; a:=0; b:=0; for n from 1 to q do
    a:=trunc(a/10^((ilog10(a)+1)/2))*10^(ilog10(n)+1)+n; a:=a*10^(ilog10(a)+1)+T(a);
    b:=b+1/a; od; evalf(b,500); end: P(300);

A261138 The concatenation of 123456...n and the reverse of this number.

Original entry on oeis.org

11, 1221, 123321, 12344321, 1234554321, 123456654321, 12345677654321, 1234567887654321, 123456789987654321, 1234567891001987654321, 12345678910111101987654321, 123456789101112211101987654321, 1234567891011121331211101987654321, 12345678910111213144131211101987654321
Offset: 1

Views

Author

Umut Uludag, Aug 10 2015

Keywords

Comments

Let R(n) denote the number obtained by formally reversing the digits of n, including any leading zeros that may appear; a(n) is the decimal concatenation of 1,2,...,n,R(n),R(n-1),...,R(3),R(2),R(1). - N. J. A. Sloane, Dec 01 2021
A palindromic version of A173426.
Has same start as A259937, but A259937 generates non-palindromic terms for n>9.
All terms are multiples of 11 (cf. A349805).

Examples

			For n=10 we concatenate 1,2,3,...,10,01,9,8,...3,2,1 getting 1234567891001987654321.
		

Crossrefs

Programs

  • Maple
    with(StringTools);
    myReverse := n -> Reverse(convert(n,string));
    A349804:=proc(n) local i,L,R;
    L:=""; R:="";
    for i from n to 1 by -1 do
    L:=Join( [convert(i,string), L],"");
    R:=Join( [R, myReverse(convert(i,string))],"");
    od:
    parse(Join([L,R],""));
    end proc; # N. J. A. Sloane, Dec 01 2021
    # second Maple program:
    a:= n-> (s-> parse(cat(s, seq(s[-i], i=1..length(s)))))(cat("", $1..n)):
    seq(a(n), n=1..14); # Alois P. Heinz, Dec 01 2021
  • Mathematica
    Table[d = Flatten[IntegerDigits /@ Range@ n]; FromDigits@ Flatten[{d, Reverse@ d}], {n, 13}] (* Michael De Vlieger, Aug 20 2015 *)
  • Python
    def A349804(n): return int((lambda x: x+x[::-1])(''.join(str(d) for d in range(1,n+1)))) # Chai Wah Wu, Dec 01 2021

Formula

a(n) = concatenate( A007908(n), A138793(n) retaining leading zeros).

Extensions

More than the usual number of terms are shown in order to distinguish this from several similar sequences.
Edited by N. J. A. Sloane, Dec 11 2021

A272617 Concatenation of the numbers from n down to 1 with numbers from 1 to n.

Original entry on oeis.org

11, 2112, 321123, 43211234, 5432112345, 654321123456, 76543211234567, 8765432112345678, 987654321123456789, 1098765432112345678910, 11109876543211234567891011, 121110987654321123456789101112, 1312111098765432112345678910111213, 14131211109876543211234567891011121314
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(1) is the only prime number.
No other prime terms up to a(8000). - Giovanni Resta, May 07 2016

Examples

			a(1) = concatenate("1", "1") = 11.
a(2) = concatenate("2", "1", "1", "2") = 2112.
a(3) = concatenate("3", "2", "1", "1", "2", "3") = 321123.
		

Crossrefs

Programs

  • Mathematica
    FromDigits@Flatten@IntegerDigits@Join[Reverse@#, #] & /@ Table[Range@n, {n, 20}]
  • PARI
    a(n)={fromdigits(concat(concat(Vecrev(vector(n,i,digits(i)))), concat(vector(n,i,digits(i)))))} \\ Andrew Howroyd, Dec 23 2019

Formula

a(n) = A000422(n) concatenated with A007908(n).

Extensions

Terms a(11) and beyond from Andrew Howroyd, Dec 23 2019
Showing 1-6 of 6 results.