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.

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