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.

Previous Showing 11-13 of 13 results.

A046255 a(1) = 5; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.

Original entry on oeis.org

5, 9, 9, 21, 53, 67, 71, 87, 87, 91, 117, 161, 187, 213, 363, 419, 501, 537, 543, 739, 879, 1101, 1329, 1391, 1641, 1939, 2093, 2109, 2331, 2557, 2639, 2697, 2863, 3441, 3441, 4413, 4461, 4479, 4557, 5489, 6033, 6267, 6351, 6973, 7181, 7459, 7679, 8113, 8241
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Maple
    R:= 5: p:= 5: x:= 5:
    for count from 2 to 100 do
      for y from x by 2 do
        if isprime(10^(1+ilog10(y))*p+y) then
          R:= R, y; p:= 10^(1+ilog10(y))*p+y; x:= y;
          break
        fi
    od od:
    R; # Robert Israel, Nov 22 2020
  • Mathematica
    a[1] = 5; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 49}] (* Robert G. Wilson v, Aug 05 2005 *)
  • Python
    from sympy import isprime
    def aupton(terms):
      alst, astr = [5], "5"
      while len(alst) < terms:
        an = alst[-1]
        while an%5 ==0 or not isprime(int(astr + str(an))): an += 2
        alst, astr = alst + [an], astr + str(an)
      return alst
    print(aupton(49)) # Michael S. Branicky, May 09 2021

A046259 a(1) = 9; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.

Original entry on oeis.org

9, 11, 21, 21, 23, 33, 37, 93, 119, 129, 133, 147, 293, 321, 429, 433, 497, 627, 661, 897, 1161, 1187, 1197, 1711, 1769, 1807, 2097, 2099, 4143, 4149, 4197, 4587, 4587, 5629, 5711, 5889, 6153, 6351, 6399, 6511, 6651, 7179, 7563, 7661, 8071, 8163, 9663
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 9; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 48}] (* Robert G. Wilson v, Aug 05 2005 *)

A080155 a(1)=2; a(n) for n>1 is the smallest prime number > a(n-1) such that the concatenation of all previous terms is also prime.

Original entry on oeis.org

2, 3, 11, 31, 47, 229, 251, 577, 857, 859, 911, 1123, 1223, 1297, 1571, 2161, 2417, 2551, 2879, 3319, 5273, 6121, 6947, 7603, 8273, 12721, 12953, 13291, 15683, 16453, 17207, 18133, 20399, 23743, 23909, 25849, 28277, 28879, 35291, 35461, 36107, 43573
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 31 2003

Keywords

Comments

See A073640 for the sequence involving concatenation of 2 successive terms, A080153 for 3 successive terms. Primeness is established using Maple's isprime() function, so later terms should be regarded as "probable".

Examples

			E.g. a(5)=47 since this is the smallest prime>a(4) which, when concatenated with the concatenation of a(1) to a(4) (=231131), also yields a prime, in this case 23113147.
		

Crossrefs

Programs

  • Maple
    with(numtheory): pout := [2]: nout := [1]: for n from 2 to 5000 do: p := ithprime(n): d := parse(cat(seq(pout[i],i=1..nops(pout)),p)): if (isprime(d)) then pout := [op(pout),p]: nout := [op(nout),n]: fi: od: pout;
  • Mathematica
    f[s_List] := Block[{p=NextPrime@s[[-1]], pp=FromDigits@Flatten[IntegerDigits/@s]}, While[!PrimeQ[pp*10^Floor[Log[10,p]+1]+p], p=NextPrime@p]; Append[s,p]]; Nest[f,{2},40]

Formula

For any n>1, a(n) is prime and a(n) > a(n-1). a(n) is the smallest prime for which a(1)//a(2)//...//a(n) is prime. // denotes concatenation.
Previous Showing 11-13 of 13 results.