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-10 of 70 results. Next

A046034 Numbers whose digits are primes.

Original entry on oeis.org

2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532
Offset: 1

Views

Author

Keywords

Comments

If n is represented as a zerofree base-4 number (see A084544) according to n=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=2,3,5,7 for k=1..4. - Hieronymus Fischer, May 30 2012
According to A153025, it seems that 5, 235 and 72335 are the only terms whose square is also a term, i.e., which are also in the sequence A275971 of square roots of the terms which are squares, listed in A191486. - M. F. Hasler, Sep 16 2016

Examples

			a(100)   = 2277,
a(10^3)  = 55327,
a(9881)  = 3233232,
a(10^4)  = 3235757,
a(10922) = 3333333,
a(10^5)  = 227233257.
		

Crossrefs

Programs

  • Haskell
    a046034 n = a046034_list !! (n-1)
    a046034_list = filter (all (`elem` "2357") . show ) [0..]
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [n: n in [2..532] | Set(Intseq(n)) subset [2, 3, 5, 7]];  // Bruno Berselli, Jul 19 2011
    
  • Mathematica
    Table[FromDigits /@ Tuples[{2, 3, 5, 7}, n], {n, 3}] // Flatten (* Michael De Vlieger, Sep 19 2016 *)
  • PARI
    is_A046034(n)=Set(isprime(digits(n)))==[1] \\ M. F. Hasler, Oct 12 2013
    
  • Python
    def A046034(n):
        m = (3*n+1).bit_length()-1>>1
        return int(''.join(('2357'[(3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3] for j in range(m)))) # Chai Wah Wu, Feb 08 2023

Formula

A055642(a(n)) = A193238(a(n)). - Reinhard Zumkeller, Jul 19 2011
From Hieronymus Fischer, Apr 20, May 30 and Jun 25 2012: (Start)
a(n) = Sum_{j=0..m-1} ((2*b(j)+1) mod 8 + floor(b(j)/4) - floor((b(j)-1)/4))*10^j, where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
a(n) = Sum_{j=0..m-1} A010877(A005408(b(j)) + A002265(b(j)) - A002265(b(j)-1))*10^j.
Special values:
a(1*(4^n-1)/3) = 2*(10^n-1)/9.
a(2*(4^n-1)/3) = 1*(10^n-1)/3.
a(3*(4^n-1)/3) = 5*(10^n-1)/9.
a(4*(4^n-1)/3) = 7*(10^n-1)/9.
Inequalities:
a(n) <= 2*(10^log_4(3*n+1)-1)/9, equality holds for n = (4^k-1)/3, k>0.
a(n) <= 2*A084544(n), equality holds iff all digits of A084544(n) are 1.
a(n) > A084544(n).
Lower and upper limits:
lim inf a(n)/10^log_4(n) = (7/90)*10^log_4(3) = 0.48232167706987..., for n -> oo.
lim sup a(n)/10^log_4(n) = (2/9)*10^log_4(3) = 1.378061934485343..., for n -> oo.
where 10^log_4(n) = n^1.66096404744...
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(2 + z(j) + 2*z(j)^2 + 2*z(j)^3 - 7*z(j)^4)/(1-z(j)^4), where z(j) = x^4^j.
Also g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1-z(j))*(2 + 3*z(j) + 5*z(j)^2 + 7*z(j)^3)/(1-z(j)^4), where z(j)=x^4^j.
Also: g(x) = (1/(1-x))*(2*h_(4,0)(x) + h_(4,1)(x) + 2*h_(4,2)(x) + 2*h_(4,3)(x) - 7*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3)*x^(k*4^j)/(1-x^4^(j+1)). (End)
Sum_{n>=1} 1/a(n) = 1.857333779940977502574887651449435985318556794733869779170825138954093657197... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

More terms from Cino Hilliard, Aug 06 2006
Typo in second formula corrected by Hieronymus Fischer, May 12 2012
Two typos in example section corrected by Hieronymus Fischer, May 30 2012

A024770 Right-truncatable primes: every prefix is prime.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 31, 37, 53, 59, 71, 73, 79, 233, 239, 293, 311, 313, 317, 373, 379, 593, 599, 719, 733, 739, 797, 2333, 2339, 2393, 2399, 2939, 3119, 3137, 3733, 3739, 3793, 3797, 5939, 7193, 7331, 7333, 7393, 23333, 23339, 23399, 23993, 29399, 31193
Offset: 1

Views

Author

Keywords

Comments

Primes in which repeatedly deleting the least significant digit gives a prime at every step until a single-digit prime remains. The sequence ends at a(83) = 73939133 = A023107(10).
The subsequence which consists of the following "chain" of consecutive right truncatable primes: 73939133, 7393913, 739391, 73939, 7393, 739, 73, 7 yields the largest sum, compared with other chains formed from subsets of this sequence: 73939133 + 7393913 + 739391 + 73939 + 7393 + 739 + 73 + 7 = 82154588. - Alexander R. Povolotsky, Jan 22 2008
Can also be seen as a table whose n-th row lists the n-digit terms; row lengths (0 for n >= 9) are given by A050986. The sequence can be constructed starting with the single-digit primes and appending, for each p in the list, the primes within 10*p and 10(p+1), formed by appending a digit to p. - M. F. Hasler, Nov 07 2018

References

  • Roozbeh Hazrat, Mathematica: A Problem-Centered Approach, Springer London 2010, pp. 86-89.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 112-113.

Crossrefs

Supersequence of A085823, A202263. Subsequence of A012883, A068669. - Jaroslav Krizek, Jan 28 2012
Supersequence of A239747.
Cf. A033664, A024785 (left-truncatable primes), A032437, A020994, A052023, A052024, A052025, A050986, A050987, A069866, A077390 (left-and-right-truncatable primes), A137812 (left-or-right truncatable primes), A254751, A254753.
Cf. A237600 for the base-16 analog.

Programs

  • Haskell
    import Data.List (inits)
    a024770 n = a024770_list !! (n-1)
    a024770_list = filter (\x ->
       all (== 1) $ map (a010051 . read) $ tail $ inits $ show x) a038618_list
    -- Reinhard Zumkeller, Nov 01 2011
    
  • Maple
    s:=[1,3,7,9]: a:=[[2],[3],[5],[7]]: l1:=1: l2:=4: do for j from l1 to l2 do for k from 1 to 4 do d:=[s[k],op(a[j])]: if(isprime(op(convert(d, base, 10, 10^nops(d)))))then a:=[op(a), d]: fi: od: od: l1:=l2+1: l2:=nops(a): if(l1>l2)then break: fi: od: seq(op(convert(a[j], base, 10, 10^nops(a[j]))),j=1..nops(a)); # Nathaniel Johnston, Jun 21 2011
  • Mathematica
    max = 100000; truncate[p_] := If[PrimeQ[q = Quotient[p, 10]], q, p]; ok[p_] := FixedPoint[ truncate, p] < 10; p = 1; A024770 = {}; While[ (p = NextPrime[p]) < max, If[ok[p], AppendTo[ A024770, p]]]; A024770 (* Jean-François Alcover, Nov 09 2011, after Pari *)
    eppQ[n_]:=AllTrue[FromDigits/@Table[Take[IntegerDigits[n],i],{i, IntegerLength[ n]-1}], PrimeQ]; Select[Prime[Range[3400]],eppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 14 2015 *)
  • PARI
    {fileO="b024770.txt";v=vector(100);v[1]=2;v[2]=3;v[3]=5;v[4]=7;j=4;j1=1; write(fileO,"1 2");write(fileO,"2 3");write(fileO,"3 5");write(fileO,"4 7"); until(0,if(j1>j,break);new=1;for(i=j1,j,if(new,j1=j+1;new=0);for(k=1,9, z=10*v[i]+k;if(isprime(z),j++;v[j]=z;write(fileO,j," ",z);))));} \\ Harry J. Smith, Sep 20 2008
    
  • PARI
    for(n=2, 31193, v=n; while(isprime(n), c=n; n=(c-lift(Mod(c, 10)))/10); if(n==0, print1(v, ", ")); n=v); \\ Arkadiusz Wesolowski, Mar 20 2014
    
  • PARI
    A024770=vector(9, n, p=concat(apply(t->primes([t, t+1]*10), if(n>1, p)))) \\ The list of n-digit terms, 1 <= n <= 9. Use concat(%) to "flatten" it. - M. F. Hasler, Nov 07 2018
    
  • Python
    from sympy import primerange
    p = lambda x: list(primerange(x, x+10)); A024770 = p(0); i=0
    while iA024770): A024770+=p(A024770[i]*10); i+=1 # M. F. Hasler, Mar 11 2020

A211681 Numbers such that all the substrings of length <= 2 are primes.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 53, 73, 237, 373, 537, 737, 2373, 3737, 5373, 7373, 23737, 37373, 53737, 73737, 237373, 373737, 537373, 737373, 2373737, 3737373, 5373737, 7373737, 23737373, 37373737, 53737373, 73737373, 237373737, 373737373, 537373737, 737373737
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

The terms are primes for n = 1, 2, 3, 4, 5, 6, 7, 8, 10, 21, 23, 27, 31, 43, 45, 60, 67, 82, 91, .... The further terms until index 102 are composite. For the subsequence with prime terms see A211682. - [updated by Hieronymus Fischer, Oct 02 2018]
From Hieronymus Fischer, Oct 02 2018: (Start)
For indices n > 8, prime terms satisfy n mod 24 = 1, 3, 5, 7, 10, 12, 19, 21, 23. However, this condition is not sufficient. Indeed, for n <= 200 most of those terms are proven composite unless the terms with n = 103, 106, 123, 156, 165, 175, 178, 191, 193 and 195 which are potentially prime.
The terms are composite for n > 10 and n mod 24 = 0, 2, 4, 6, 8, 9, 11, 13, 14, 15, 16, 17, 18, 20, 22 (see formula section for the details).
(End)
Cf. A213299 for the partial sums.

Examples

			a(11)=537, since all substrings of length <= 2 are primes (5, 3, 7, 53 and 37).
a(21)=237373, the substrings of length <= 2 are 2, 3, 7, 23, 37, 73.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits/@Select[Tuples[{2,3,5,7},n],AllTrue[FromDigits/@ Partition[ #,2,1],PrimeQ]&],{n,9}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 13 2020 *)

Formula

a(1+8*k) = 2*10^(2k) + 37*(10^(2k)-1)/99,
a(2+8*k) = 3*10^(2k) + 73*(10^(2k)-1)/99,
a(3+8*k) = 5*10^(2k) + 37*(10^(2k)-1)/99,
a(4+8*k) = 7*10^(2k) + 37*(10^(2k)-1)/99,
a(5+8*k) = 23*10^(2k) + 73*(10^(2k)-1)/99,
a(6+8*k) = 37*10^(2k) + 37*(10^(2k)-1)/99,
a(7+8*k) = 53*10^(2k) + 73*(10^(2k)-1)/99,
a(8+8*k) = 73*10^(2k) + 73*(10^(2k)-1)/99, for k >= 0.
a(n) = ((2*n+7) mod 8 + dn3 - dn2)*10^dn_1 + floor((37+36*(dn2-dn1))*10^dn_1/99), where dn1 = floor((n+1)/4), dn2 = floor((n+2)/4), dn3 = floor((n+3)/4), dn_1 = floor((n-1)/4). [updated by Hieronymus Fischer, Oct 02 2018]
From Hieronymus Fischer, Oct 02 2018: (Start)
a(24k + 0) = 73*(10^(6k-2) + (10^(6k-2)-1)/99), for k > 0.
a(24k + 2) = 3*(1245790*(10^(6k)-1)/999999 + 1),
a(24k + 4) = 7*(1053390*(10^(6k)-1)/999999 + 1),
a(24k + 6) = 37*(10^(6k) + (10^(6k)-1)/99),
a(24k + 8) = 73*(10^(6k) + (10^(6k)-1)/99),
a(24k + 9) = 3*(79124500*(10^(6k)-1)/999999 + 79),
a(24k + 11) = 3*(79124500*(10^(6k)-1)/999999 + 79 + 10^(6k+2)),
a(24k + 13) = 3*(791245000*(10^(6k)-1)/999999 + 791),
a(24k + 14) = 37*(10^(6k+2) + (10^(6k+2)-1)/99),
a(24k + 15) = 3*(791245000*(10^(6k)-1)/999999 + 791 + 10^(6k+3)),
a(24k + 16) = 73*(10^(6k+2) + (10^(6k+2)-1)/99),
a(24k + 17) = 7*(3391050000*(10^(6k)-1)/999999 + 3391),
a(24k + 18) = 7*(5339100000*(10^(6k)-1)/999999 + 5339),
a(24k + 20) = 3*(24579100000*(10^(6k)-1)/999999 + 24579),
a(24k + 22) = 37*(10^(6k+4) + (10^(6k+4)-1)/99), for k >= 0.
(End)
Recursion for n>8:
a(n) = 10*(1+a(n-4)) - a(n-4) mod 10.
G.f.: (2*x*(1+x^10) + 3*x^2*(1 + x^3 + x^5 + x^6) + 5*x^3*(1+x^6) + 7*x^4*(1+x^2))/((1-10*x^4)*(1-x^8)). [corrected by Hieronymus Fischer, Sep 03 2012]
From Chai Wah Wu, Feb 08 2023: (Start)
a(n) = a(n-1) + 9*a(n-4) - 9*a(n-5) + 10*a(n-8) - 10*a(n-9) for n > 9.
G.f.: x*(2*x^7 - 2*x^6 + 5*x^5 - 2*x^4 + 2*x^3 + 2*x^2 + x + 2)/((x - 1)*(x^4 + 1)*(10*x^4 - 1)). (End)

A211682 Prime numbers such that all the substrings of length <= 2 are primes.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 53, 73, 373, 237373, 537373, 5373737, 53737373, 53737373737, 237373737373, 737373737373737, 53737373737373737, 373737373737373737373, 53737373737373737373737, 53737373737373737373737373, 373737373737373737373737373, 5373737373737373737373737373737
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

A211681 restricted to primes. Contains A085823. In contrast to A085823 this sequence seems to be not finite (conjecture).

Examples

			a(10)=237373, since all substrings of length <= 2 are primes (2, 3, 7, 23, 37, 73) and 237373 is prime.
		

Crossrefs

Extensions

The originally submitted terms with index 20 and 21 are composite and have been erased therefore. - Hieronymus Fischer, Sep 24 2018
a(20)-a(22) from Giovanni Resta, Oct 08 2018

A211684 Numbers > 1000 such that all the substrings of length = 3 are primes (substrings with leading '0' are considered to be nonprime).

Original entry on oeis.org

1131, 1137, 1139, 1271, 1277, 1311, 1313, 1317, 1373, 1379, 1397, 1491, 1499, 1571, 1577, 1631, 1673, 1677, 1733, 1739, 1797, 1811, 1911, 1919, 1937, 1971, 1977, 1991, 1997, 2113, 2233, 2239, 2271, 2277, 2293, 2331, 2337, 2397, 2419, 2571
Offset: 1

Views

Author

Hieronymus Fischer, Jun 08 2012

Keywords

Comments

Only numbers > 1000 are considered, since all 3-digit primes are trivial members. See A069489 for the sequence with prime terms > 1000.
The sequence is infinite (for example, consider the continued concatenation of '19' or of '337': 1919, 19191, 191919, ..., 3373, 33733, 337337, ... are members).
Infinitely many terms are palindromic.
A 10-automatic sequence realized by a linear recurrence relation. - Charles R Greathouse IV, Jan 04 2013

Examples

			a(1) = 1131, since all substrings of length = 3 (113 and 131) are primes.
a(33) = 2271, since all substrings of length = 3 (227, 271) are primes.
		

Crossrefs

A211685 Prime numbers > 1000 such that all the substrings of length >= 3 are primes (substrings with leading '0' are considered to be nonprime).

Original entry on oeis.org

1277, 1373, 1499, 1571, 1733, 1811, 1997, 2113, 2239, 2293, 2719, 3137, 3313, 3373, 3491, 3499, 3593, 3673, 3677, 3733, 3739, 3797, 4211, 4337, 4397, 4673, 4877, 4919, 5233, 5419, 5479, 6131, 6173, 6197, 6199, 6311, 6317, 6599, 6619, 6733
Offset: 1

Views

Author

Hieronymus Fischer, Jun 08 2012

Keywords

Comments

Only numbers > 1000 are considered, since all 3-digit primes are trivial members.
By definition, each term of the sequence with more than 4 digits is built up by an overlapped union of previous terms, i.e., a(59)=33739 has the two embedded previous terms a(14)=3373 and a(21)=3739.
The sequence is finite, the last term is 349199 (n=63). Proof of finiteness: Let p be a number with more than 6 digits. By the argument above, each 6-digit substring of p must be a previous term. The only 6-digit term is 349199. Thus, there is no number p with the desired property.

Examples

			a(1)=1277, since all substrings of length >= 3 are primes (127, 277, and 1277).
a(63)=349199, all substrings of length >= 3 (349, 491, 919, 199, 3491, 4919, 9199, 34919, 49199 and 349199) are primes.
		

Crossrefs

A213300 Largest number with n nonprime substrings (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

373, 3797, 37337, 73373, 373379, 831373, 3733797, 3733739, 8313733, 9973331, 37337397, 82337397, 99733313, 99733317, 99793373, 733133733, 831373379, 997333137, 997337397, 997933739, 7331337337, 8313733797, 9733733797, 9973331373, 9979337397, 9982337397
Offset: 0

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n nonprime substrings is nonempty and finite. Proof of existence: Define m(n):=2*sum_{j=i..k} 10^j, where k:=floor((sqrt(8n+1)-1)/2), i:= n - k(k+1)/2. For n=0,1,2,3,... the m(n) are 2, 22, 20, 222, 220, 200, 2222, 2220, 2200, 2000, 22222, 22220, ... . m(n) has k+1 digits and (k-i+1) 2’s. Thus the number of nonprime substrings of m(n) is ((k+1)(k+2)/2)-k-1+i=(k(k+1)/2)+i=n. This proves existence. Proof of finiteness: Each 4-digit number has at least 1 nonprime substring. Hence each 4*(n+1)-digit number has at least n+1 nonprime substrings. Consequently, there is a boundary b < 10^(4n+3) such that all numbers > b have more than n nonprime substrings. It follows that the set of numbers with n nonprime substrings is finite.
The following statements hold true:
For all n>=0 there are minimal numbers with n nonprime substrings (cf. A213302 - A213304).
For all n>=0 there are maximal numbers with n nonprime substrings (= A213300 = this sequence).
For all n>=0 there are minimal numbers with n prime substrings (cf. A035244).
The greatest number with n prime substrings does not exist. Proof: If p is a number with n prime substrings, than 10*p is a greater number with n prime substrings.
Comment from N. J. A. Sloane, Sep 01 2012: it is a surprise that any number greater than 373 has a nonprime substring!

Examples

			a(0)=373, since 373 is the greatest number such that all substrings are primes, hence it is the maximal number with 0 nonprime substrings.
a(1)=3797, since the only nonprime substring of 3797 is 9 and all greater numbers have more than 1 nonprime substrings.
a(2)=37337, since the nonprime substrings of 37337 are 33 and 7337 and all greater numbers have > 2 nonprime substrings.
		

Crossrefs

Formula

a(n) >= A035244(A000217(A055642(a(n)))-n).

A213321 Minimal prime with n prime substrings (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

2, 13, 23, 113, 137, 373, 1973, 1733, 1373, 11317, 17333, 31379, 37337, 113173, 211373, 313739, 337397, 1113173, 1137337, 2313797, 2337397, 11131733, 12337397, 11373379, 33133733, 111733373, 113137337, 123733739, 291733373, 113733797, 1173313373, 1137333137, 1237337393, 1137337973
Offset: 1

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Examples

			a(1)=2, since 2 is a prime has 1 prime substring (2).
a(2)=13, since 13 is prime and has 2 prime substrings (3 and 13)
		

Crossrefs

Formula

a(n) > 10^floor((sqrt(8*n+1)-1)/2).
min(a(k), k>=n-1) <= A079397(n-1), n>0.
a(n) >= A035244(n), n>0.

A217302 Minimal natural number (in decimal representation) with n prime substrings in binary representation (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 2, 5, 7, 11, 15, 27, 23, 31, 55, 47, 63, 111, 95, 187, 127, 223, 191, 381, 255, 447, 503, 383, 511, 1015, 895, 767, 1023, 1533, 1791, 1535, 1919, 3039, 3069, 3067, 3839, 3967, 6079, 6139, 6135, 7679, 8063, 8159, 12159, 12271, 15359, 16127
Offset: 0

Views

Author

Hieronymus Fischer, Nov 22 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n prime substrings in binary representation is not empty. Proof: A000975(n+1) has exactly n prime substrings in binary representation (see A000975).
All terms with n > 1 are odd.

Examples

			a(1) = 2 = 10_2, since 2 is the least number with 1 prime substring (=10_2) in binary representation.
a(2) = 5 = 101_2, since 5 is the least number with 2 prime substrings in binary representation (10_2 and 101_2).
a(4) = 11 = 1011_2, since 11 is the least number with 4 prime substrings in binary representation (10_2, 11_2, 101_2 and 1011_2).
a(8) = 31 = 11111_2, since 31 is the least number with 8 prime substrings in binary representation (4 times 11_2, 3 times 111_2, and 11111_2).
a(9) = 47 = 101111_2, since 47 is the least number with 9 prime substrings in binary representation (10_2, 3 times 11_2, 101_2, 2 times 111_2, 1011_2, and 10111_2).
		

Crossrefs

Formula

a(n) >= 2^ceiling(sqrt(8*n+1)-1)/2).
a(n) <= A000975(n+1).
a(n+1) <= 2*a(n)+1.

A217309 Minimal natural number (in decimal representation) with n prime substrings in base-9 representation (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 2, 11, 23, 101, 173, 902, 1562, 1559, 8120, 14032, 14033, 73082, 126290, 604523, 657743, 723269, 1136684, 5918933, 5972147, 10227787, 25051529, 53276231, 54333278, 92071913, 441753767, 479669051, 483743986, 828662228, 3971590751, 4315446629
Offset: 0

Views

Author

Hieronymus Fischer, Nov 22 2012

Keywords

Comments

The sequence is well-defined in that for each n the set of numbers with n prime substrings is not empty. Proof: Define m(0):=1, m(1):=2 and m(n+1):=9*m(n)+2 for n>0. This results in m(n)=2*sum_{j=0..n-1} 9^j = (9^n - 1)/4 or m(n)=1, 2, 22, 222, 2222, 22222, …, (in base-9) for n=0,1,2,3,…. Evidently, for n>0 m(n) has n 2’s and these are the only prime substrings in base-9 representation. This is why every substring of m(n) with more than one digit is a product of two integers > 1 (by definition) and can therefore not be a prime number.
No term is divisible by 9.

Examples

			a(1) = 2 = 2_9, since 2 is the least number with 1 prime substring in base-9 representation.
a(2) = 11 = 12_9, since 11 is the least number with 2 prime substrings in base-9 representation (2_9 and 12_9).
a(3) = 23 = 25_9, since 23 is the least number with 3 prime substrings in base-9 representation (2_9, 3_9, and 23_9).
a(4) = 101 = 122_9, since 101 is the least number with 4 prime substrings in base-9 representation (2 times 2_9, 12_9=11, and 122_9=101).
a(7) = 1562 = 2125_9, since 1562 is the least number with 7 prime substrings in base-9 representation (2 times 2_9, 5_9, 12_9=11, 21_9=19, 25_9=23, and 212_9=173).
		

Crossrefs

Formula

a(n) > 9^floor(sqrt(8*n-7)-1)/2), for n>0.
a(n) <= (9^n - 1)/4, n>0.
a(n+1) <= 9*a(n)+3.
Showing 1-10 of 70 results. Next