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

A217263 Composite numbers such that every concatenation of their prime factors is prime.

Original entry on oeis.org

21, 33, 51, 63, 93, 111, 133, 177, 201, 219, 247, 253, 327, 411, 427, 549, 573, 589, 657, 679, 687, 763, 793, 813, 833, 889, 993, 1077, 1081, 1119, 1127, 1243, 1339, 1347, 1401, 1411, 1497, 1501, 1603, 1623, 1651, 1671, 1821, 1839, 1843, 1851, 1981, 2009, 2019
Offset: 1

Views

Author

Dmitri Kamenetsky, Sep 29 2012

Keywords

Comments

The smallest term with 3 or more prime factors is 63 = 3*3*7 (see A217264).
The smallest term with 4 or more prime factors is 21249 = 3*3*3*787 (see A217265).
The smallest term with 5 or more prime factors is 146461 = 7*7*7*7*61.
There is no term under 10^8 with 6 or more prime factors.
The smallest term with 3 or more distinct prime factors is 3311 = 7*11*43 (see A180679).
There is no term under 10^8 with 4 or more distinct prime factors.

Examples

			21 is 3*7. Both 37 and 73 are prime, so 21 is in the sequence.
63 is 3*3*7. 337, 373 and 733 are all prime, so 63 is in the sequence.
		

Crossrefs

Cf. A217264, A217265, A180679, A181559. Related sequences: A105184, A019549 and A106582.

A225135 Squares that are a concatenation of primes.

Original entry on oeis.org

25, 225, 289, 361, 529, 729, 2025, 2401, 2601, 2809, 3025, 4761, 5041, 5329, 5929, 7225, 7569, 11025, 11449, 11881, 13225, 15129, 19881, 20449, 21609, 22801, 23409, 24649, 25281, 26569, 27225, 29241, 29929, 31329, 32041, 32761, 34969, 36481, 39601, 47089
Offset: 1

Views

Author

Keywords

Comments

Lim inf a(n)/n^2 >= 2. Is it finite? - Charles R Greathouse IV, Apr 30 2013

Examples

			25 = 5^2 and can be separated into two prime numbers: 2|5.
231361 = 481^2 and can be separated into prime numbers in six ways: 2|3|1361, 2|3|13|61, 2|31|3|61, 2|313|61, 23|1361, and 23|13|61.
Leading zeros are allowed: 2025 = 2|02|5.
		

Crossrefs

Programs

  • Mathematica
    r[d_] := Catch@ Block[{z = Length@d}, z<1 || Do[ If[ PrimeQ@ FromDigits@ Take[d, i] && r@ Take[d, i-z], Throw@ True], {i, z}]]; Select[ Range[1000]^2, r@ IntegerDigits@ # &] (* Giovanni Resta, Apr 30 2013 *)
  • PARI
    has(n)=if(isprime(n),return(1)); if(n<202,return(isprime(n%10) && isprime(n\10))); my(k=n%10,v);if(k==5||k==2,return(if(n<6,1,n\=10;has(n/10^valuation(n,10)))));if(k%2==0,return(0));v=digits(n);for(i=1,#v,if(isprime(n%10^i) && has(n\10^i), return(1))); 0
    forstep(n=5,1e3,2,if(has(n^2),print1(n^2", ")))
    \\ Charles R Greathouse IV, Apr 30 2013
  • R
    library(gmp); isprime2=function(x) isprime(x)>0
    splithasproperty<-function(n,FUN,curdig=1,res=list(),curspl=c()) {
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}
        s=as.character(n)
        if(curdig>nchar(s)) return(res)
        if(length(curspl)>0) if(FUN(as.bigz(no0(substr(s,curdig,nchar(s)))))) res[[length(res)+1]]=curspl
        for(i in curdig:nchar(s))
            if(FUN(as.bigz(no0(substr(s,curdig,i)))))
                res=splithasproperty(n,FUN,i+1,res,c(curspl,i))
        res
    }
    which(sapply(1:100,function(x) length(splithasproperty(x^2,isprime2)))>0)^2
    

A253910 Concatenation of n-th prime and n-th nonprime.

Original entry on oeis.org

21, 34, 56, 78, 119, 1310, 1712, 1914, 2315, 2916, 3118, 3720, 4121, 4322, 4724, 5325, 5926, 6127, 6728, 7130, 7332, 7933, 8334, 8935, 9736, 10138, 10339, 10740, 10942, 11344, 12745, 13146, 13748, 13949, 14950, 15151, 15752, 16354, 16755, 17356, 17957, 18158, 19160, 19362, 19763, 19964, 21165, 22366, 22768, 22969
Offset: 1

Views

Author

Omar E. Pol, Feb 06 2015

Keywords

Comments

Concatenate A000040(n) and A018252(n).

Examples

			a(5) = 119 because the 5th prime is 11 and the 5th nonprime is 9.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    a253911 n = a253911_list !! (n-1)
    a253911_list = map read $
       zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]
    -- Reinhard Zumkeller, Feb 09 2015
  • PARI
    nprime(n)=c=0;k=1;while(k,if(!isprime(k),c++);if(c==n,return(k));k++)
    vector(50,n,eval(concat(Str(prime(n)),Str(nprime(n))))) \\ Derek Orr, Feb 06 2015
    

A253911 Concatenation of n-th nonprime and n-th prime.

Original entry on oeis.org

12, 43, 65, 87, 911, 1013, 1217, 1419, 1523, 1629, 1831, 2037, 2141, 2243, 2447, 2553, 2659, 2761, 2867, 3071, 3273, 3379, 3483, 3589, 3697, 38101, 39103, 40107, 42109, 44113, 45127, 46131, 48137, 49139, 50149, 51151, 52157, 54163, 55167, 56173, 57179, 58181, 60191, 62193, 63197, 64199, 65211, 66223, 68227, 69229
Offset: 1

Views

Author

Omar E. Pol, Feb 06 2015

Keywords

Comments

Concatenate A018252(n) and A000040(n).

Examples

			a(5) = 911 because the 5th nonprime is 9 and the 5th prime is 11.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    a253911 n = a253911_list !! (n-1)
    a253911_list = map read $
       zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]
    -- Reinhard Zumkeller, Feb 09 2015
  • Mathematica
    cncat[{a_,b_}]:=FromDigits[Flatten[IntegerDigits/@{a,b}]]; Module[ {nn=100,np,len},np = Select[Range[nn],!PrimeQ[#]&];len=Length[np];cncat/@Thread[{np,Prime[Range[len]]}]] (* Harvey P. Dale, Oct 17 2020 *)
  • PARI
    nprime(n)=c=0; k=1; while(k, if(!isprime(k), c++); if(c==n, return(k)); k++)
    vector(50, n, eval(concat(Str(nprime(n)), Str(prime(n))))) \\ Derek Orr, Feb 06 2015
    

A173935 a(n) is the least prime that is the concatenation of two primes in exactly n different ways.

Original entry on oeis.org

2, 23, 313, 3137, 233347, 739397, 379837313, 73932013313, 7399973479337
Offset: 0

Views

Author

Robert G. Wilson v, Mar 02 2010

Keywords

Examples

			23 = 2 & 3, 313 = 3 & 13 and 31 & 3, etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, id = IntegerDigits@n, k = 0}, len = Length@ id; While[ k < len, If[ Union@ PrimeQ[ FromDigits@# & /@ {id[[;; k + 1]], id[[k + 2 ;;]]}] == {True}, c++ ]; k++ ]; c]; t = Table[0, {10}]; p = 2; While[p < 10^8, a = f@p; If[ t[[a]] == 0, t[[a]] = p; Print[{a, p}]]; p = NextPrime@ p]

Extensions

a(6) from Robert G. Wilson v, Mar 04 2010
a(7) from Donovan Johnson, Nov 09 2010
a(8) from Giovanni Resta, Mar 04 2014

A225136 Numbers that are concatenations of triprimes.

Original entry on oeis.org

88, 128, 188, 208, 278, 288, 308, 428, 448, 458, 508, 528, 638, 668, 688, 708, 758, 768, 788, 808, 812, 818, 820, 827, 828, 830, 842, 844, 845, 850, 852, 863, 866, 868, 870, 875, 876, 878, 888, 892, 898, 899, 928, 988, 998, 1028, 1058, 1108, 1148, 1168, 1178
Offset: 1

Views

Author

Keywords

Examples

			88 = 8|8, both of which are triprime because 8=2*2*2.
458 = 45 | 8 = 3*3*5 | 2*2*2.
12428 can be split into triprimes in three ways: 12|428, 12|42|8, and 124|28.
		

Crossrefs

Programs

  • R
    library(gmp); istriprime=function(x) ifelse(x<8,F,length(factorize(x))==3)
    splithasproperty<-function(n,FUN,curdig=1,res=list(),curspl=c()) {
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}
        s=as.character(n)
        if(curdig>nchar(s)) return(res)
        if(length(curspl)>0) if(FUN(as.bigz(no0(substr(s,curdig,nchar(s)))))) res[[length(res)+1]]=curspl
        for(i in curdig:nchar(s))
            if(FUN(as.bigz(no0(substr(s,curdig,i)))))
                res=splithasproperty(n,FUN,i+1,res,c(curspl,i))
        res
    }
    which(sapply(1:500,function(x) length(splithasproperty(x,istriprime)))>0)

A351925 Squares which are the concatenation of two primes.

Original entry on oeis.org

25, 289, 361, 529, 729, 2401, 2601, 2809, 4761, 5329, 5929, 7569, 11449, 11881, 15129, 19881, 21609, 22801, 23409, 24649, 25281, 26569, 29241, 29929, 31329, 34969, 36481, 39601, 47961, 52441, 53361, 54289, 57121, 58081, 59049, 71289, 77841, 83521, 89401
Offset: 1

Views

Author

Max Z. Scialabba, Feb 25 2022

Keywords

Comments

The first term that is the concatenation of two primes in more than one way is a(11) = 5929 = 5 | 929 = 59 | 29. - Robert Israel, Oct 01 2023

Examples

			25 is the concatenation of 2 and 5, both primes.
4761 is the concatenation of 47 and 61, both primes.
		

Crossrefs

Cf. A000290 (squares), A039686, A106582, inverse of A167535.

Programs

  • Maple
    L:= NULL: count:=0:
    for x from 1 by 2 while count < 100 do
      xs:= x^2;
      for i from 1 to ilog10(xs) do
        a:= xs mod 10^i;
        if a > 10^(i-1) and isprime(a) then
          b:= (xs-a)/10^i;
          if isprime(b) then
            L:= L, xs; count:= count+1; break
          fi fi
    od od:
    L; # Robert Israel, Oct 01 2023
  • PARI
    isb(n)={my(d=10); while(dAndrew Howroyd, Feb 26 2022
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        for k in count(1):
            s = str(k*k)
            if any(s[i] != '0' and isprime(int(s[:i])) and isprime(int(s[i:])) for i in range(1, len(s))):
                yield k*k
    print(list(islice(agen(), 39))) # Michael S. Branicky, Feb 26 2022

Formula

Intersection of A106582 and A000290.
Showing 1-7 of 7 results.