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

A074338 a(1) = 2; 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

2, 3, 9, 11, 13, 63, 71, 93, 187, 189, 201, 207, 243, 347, 369, 439, 473, 529, 611, 847, 1209, 1331, 1423, 1581, 1593, 1617, 1679, 1791, 2067, 2529, 2541, 2563, 2751, 3347, 3583, 3677, 3777, 4359, 4701, 4771, 5657, 6183, 6193, 6353, 6511, 6539, 6769, 6939
Offset: 1

Views

Author

Zak Seidov, Sep 23 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Block[{k = a[n - 1] + 1 + Mod[a[n - 1], 2], 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 *)

Extensions

More terms from Robert G. Wilson v, Aug 05 2005

A111525 a(1) = 10; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.

Original entry on oeis.org

10, 1, 3, 3, 3, 29, 1, 3, 3, 11, 9, 7, 23, 61, 11, 3, 91, 137, 7, 11, 31, 93, 17, 9, 273, 51, 397, 9, 99, 41, 111, 129, 111, 801, 109, 131, 297, 37, 621, 21, 807, 143, 87, 57, 231, 187, 53, 169, 77, 613, 867, 41, 199, 773, 523, 227, 27, 499, 171, 329, 67, 483, 393, 179
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 10; a[n_] := a[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 63}]

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.

A358344 a(1) = 0; a(n) = the smallest number such that the concatenation a(1)a(2)...a(n) is prime in the smallest allowed base; sequence terminates at index m if a(1)a(2)...a(m)k is composite in the smallest allowed base for all k.

Original entry on oeis.org

0, 2, 1, 2, 2, 3, 1, 5, 9, 7, 21, 5, 31, 49, 39, 104, 2, 34, 44, 74, 22, 64, 16, 107, 549, 81, 207, 273, 87, 497, 27, 556, 42, 150, 32, 44, 144, 340, 28, 198, 677, 13, 61, 209, 377, 893, 329, 391, 49, 83, 425, 197, 1017, 205, 191, 163, 1131, 291, 281, 295, 389
Offset: 1

Views

Author

Samuel Harkness, Nov 11 2022

Keywords

Comments

For all n > 1, a(n) > 0.
For all n > 3, if a(n) is even or odd, then until a new number a(n+k) > a(n), all a(n+k) must also be even or odd, respectively.
"Smallest allowed base" is max{a(1), a(2), ..., a(n)} + 1. E.g., a(3) uses base 3 because max{0, 2, 1} + 1 = 3.
Treat a(n) >= 10 as one "digit". E.g., if three consecutive terms were 8, 12, 4, treat the concatenation as "8C4" to be read in base 13 instead of "8124."
It is unknown whether this sequence has infinite terms. There exist initial values which, using the method described in the definition, reach a point that guarantees no new primes. E.g., Michael S. Branicky showed for a(1) = 13, after 4 terms {13, 9, 3, 5} the tested number for a fifth term "k" is not prime for 0 <= k < 13, and the equation for the tested number once k >= 13 is 13*(k+1)^4 + 9*(k+1)^3 + 3*(k+1)^2 + 5(k+1) + k = (k+2)(13*k^3 + 35*k^2 + 38*k + 15), thus never prime. Because there exist initial values which guarantee no new terms after various lengths, any initial value may eventually reach such a point.

Examples

			For a(6): The concatenation a(1)a(2)a(3)a(4)a(5) gives 2122. The smallest base in which 2122 can be read is max{2, 1, 2, 2} + 1 = 3, so test 21220_3 = 213 (nonprime), 21221_3 = 214 (nonprime), 21222_3 = 215 (nonprime). Now, 21223 is the next candidate; note that the new smallest allowed base is max{2, 1, 2, 2, 3} + 1 = 4, so test 21223_4 = 619 (prime). Thus, a(6) = 3.
		

Crossrefs

Programs

  • Mathematica
    V = {0}; While[Length[V] <= 60, c = 0; d = 0; b = Max[V] + 1; CCC = 0; While[c == 0, X = V; X = Append[X, d]; CCC = 0; For[i = 1, i <= Length[X], i++, CCC += Part[X, i]*b^(Length[X] - i)]; If[PrimeQ[CCC], c = 1]; d++; If[d == b, b++]]; V = X]; Print[V]
  • Python
    from sympy import isprime
    from itertools import count, islice
    def fd(d, b): return sum(di*b**i for i, di in enumerate(d[::-1]))
    def anext(alst):
        b = max(alst)
        return next(k for k in count(1) if isprime(fd(alst+[k], max(b, k)+1)))
    def agen():
        alst = [0]
        while True: yield alst[-1]; alst.append(anext(alst))
    print(list(islice(agen(), 61))) # Michael S. Branicky, Nov 11 2022

Extensions

Escape clause added by Jianing Song, Nov 28 2022
Previous Showing 11-14 of 14 results.