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.

A019519 Concatenate odd numbers.

Original entry on oeis.org

1, 13, 135, 1357, 13579, 1357911, 135791113, 13579111315, 1357911131517, 135791113151719, 13579111315171921, 1357911131517192123, 135791113151719212325, 13579111315171921232527, 1357911131517192123252729, 135791113151719212325272931
Offset: 1

Views

Author

R. Muller

Keywords

References

  • S. Smarandoiu, Convergence of Smarandache continued fractions, Abstract 96T-11-195, Abstracts Amer. Math. Soc., 17 (No. 4, 1996), 680.

Crossrefs

Primes are in A048847, while their indices are in A046036.
Cf. A019520 (similar, with even numbers), A067095.

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n=1, 1, parse(cat(a(n-1), 2*n-1))) end:
    seq(a(n), n=1..20); # Alois P. Heinz, Jan 13 2021
  • Mathematica
    nn=20;With[{odds=Range[1,2nn+1,2]},Table[FromDigits[Flatten[ IntegerDigits/@ Take[odds,n]]],{n,nn}]] (* Harvey P. Dale, Aug 14 2014 *)
  • PARI
    a(n)=my(s=""); for(k=1, n, s=Str(s, 2*k-1)); eval(s); \\ Michel Marcus, Dec 07 2021
  • Python
    def a(n): return int("".join(map(str, range(1, 2*n, 2))))
    print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Jan 13 2021
    

Formula

Sequence grows like 10^K, where K = 2 + floor(log_10(n)) + floor(log_10(a(n-1))). More generally we may consider a(n)= F(a(n-1),n)*B^K + G(a(n-1),n); K = floor(log_B H(a(n-1),n)); F(a(n-1),n); G(a(n-1),n); H(a(n-1),n) integer polynomials; B integer. - Ctibor O. Zizka, Mar 08 2008
Lim_{n->oo} a(n)/A019520(n) = 0 (see A067095). - Bernard Schott, Dec 07 2021

Extensions

More terms from Erich Friedman
More terms from Harvey P. Dale, Aug 14 2014

A046036 Indices of the concatenation of the first k odd numbers (A019519) which are primes.

Original entry on oeis.org

2, 10, 16, 34, 49, 2570
Offset: 1

Views

Author

Keywords

Comments

No others with k <= 12000. - Eric W. Weisstein, Mar 01 2004
No others with k <= 25000. - Michael S. Branicky, Aug 28 2025

Crossrefs

Programs

Formula

a(n) = (A066811(n)+1)/2. - Michel Marcus, Jan 31 2014

A066811 Numbers k such that the concatenation of odd numbers from 1 to k is a prime.

Original entry on oeis.org

3, 19, 31, 67, 97, 5139
Offset: 1

Views

Author

Patrick De Geest, Jan 20 2002

Keywords

Comments

a(7) > 50000. - Michael S. Branicky, Aug 28 2025

Examples

			19 is a term because 135791113151719 is a prime.
		

Crossrefs

Programs

  • Mathematica
    p = ""; Do[p = p <> ToString[2*n+1]; If[PrimeQ[ToExpression[p]], Print[2*n+1]], {n, 0, 2569}] (* Ryan Propper, Aug 26 2005 *)
  • Python
    from sympy import isprime
    def agen():
      k, str1tok = 1, '1'
      while True:
        if isprime(int(str1tok)): yield k
        k, str1tok = k + 2, str1tok + str(k + 2)
    g = agen()
    print([next(g) for i in range(5)]) # Michael S. Branicky, Mar 19 2021

Formula

a(n) = 2*A046036(n) - 1. - Michel Marcus, Jan 31 2014

Extensions

a(6) from Ryan Propper, Aug 26 2005

A138965 Least prime factor of concatenation of first n odd numbers.

Original entry on oeis.org

1, 13, 3, 23, 37, 3, 11617, 5, 3, 135791113151719, 29, 3, 5, 11, 3, 135791113151719212325272931, 17, 3, 7, 13, 3, 131, 5, 3, 11, 25471443030907588399109, 3, 5, 7, 3, 181, 41, 3, 135791113151719212325272931333537394143454749515355575961636567, 19, 3, 40351, 5, 3, 7, 11, 3, 5, 57041, 3, 351269, 11, 3, 135791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597
Offset: 1

Views

Author

M. F. Hasler, Apr 14 2008

Keywords

Crossrefs

Programs

  • PARI
    t=1; for( n=2,99, print1( factor( eval( t=Str( t,2*n-1 )))[1,1], ", "))

Formula

A138965(n) = A020639(A019519(n)) (= 3 if n = 0 (mod 3)).

A350153 Prime numbers created by concatenating all numbers 1 through k for some k > 1, then continuing to concatenate all numbers from k-1 towards 1. Primes are added to the sequence as they are found as k increases.

Original entry on oeis.org

12343, 1234543, 12345678910987, 12345678910987654321, 12345678910111213141516171819202122212019181716151413, 12345678910111213141516171819202122232425262728293029
Offset: 1

Views

Author

Patrick Quam, Dec 16 2021

Keywords

Comments

A173426(n) is the concatenation of all numbers from 1 up to k and then back down to 1. The prime terms of A173426 have been called "memorable primes" (see the Numberphile video). These "unmemorable primes" are a superset created by concatenating 1..k in ascending order followed by concatenating the numbers k-1..1 in descending order. Any primes found during either concatenation process are added to the sequence (e.g., k = 5, 1234543 is included. If 12345 were prime, it would be included as well).

Examples

			For k=10, the first prime obtained by concatenating the numbers 1..10 and then concatenating the first one or more numbers from 9..1 is 12345678910987.
		

Crossrefs

Programs

  • Maple
    select(isprime, [seq(seq(parse(cat($1..n, n-i$i=1..t)),
                    t=0..n-1), n=1..30)])[];  # Alois P. Heinz, Dec 19 2021
  • Mathematica
    lst={};Table[s=Flatten[IntegerDigits/@Range@n];k=n-1;
    While[k!=-1,If[PrimeQ[p=FromDigits@s],AppendTo[lst,p]];s=Join[s,IntegerDigits@k];k--],{n,100}];lst (* Giorgos Kalogeropoulos, Dec 17 2021 *)
  • Python
    from itertools import count, chain, islice, accumulate
    from sympy import isprime
    def A350153gen(): return filter(lambda p:isprime(p),(int(s) for n in count(1) for s in accumulate(str(d) for d in chain(range(1,n+1),range(n-1,0,-1)))))
    A350153_list = list(islice(A350153gen(),20)) # Chai Wah Wu, Dec 20 2021

A104239 Number of distinct prime factors of 135...(2n-1) (concatenation of n odd numbers).

Original entry on oeis.org

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

Views

Author

Parthasarathy Nambi, Apr 16 2005

Keywords

Comments

Interestingly, 135791113151719 is prime.

Examples

			The number of distinct prime factors of 13 is 1 (a prime) - the second term in the sequence.
The number of distinct prime factors of 135 is 2 - the third term in the sequence.
The number of distinct prime factors of 1357 is 2 - the fourth term in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[PrimeNu[FromDigits[Flatten[IntegerDigits/@Range[1,2n+1,2]]]],{n,50}]] (* Harvey P. Dale, Jun 15 2019 *)

Extensions

Corrected and extended by Franklin T. Adams-Watters, Sep 01 2006
Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar
Showing 1-6 of 6 results.