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-20 of 25 results. Next

A036340 Concatenation of prime p and nextprime(p) is prime -> cycles of 3 steps possible.

Original entry on oeis.org

467, 941, 959941, 3396199, 4858943, 5696101, 6475643, 7566133, 7584253, 7592261, 9305281, 9463877, 11430491, 13442243, 14374837, 15941473, 17414497, 17691997, 19584223, 21421849, 22310159, 22808459, 27601163, 29198881
Offset: 0

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

Terms from 3396199 up to 17691997 found by Jo Yeong Uk (hyukjo(AT)sigma.chungnam.ac.kr).

Crossrefs

A034592 Cycle of 2 steps possible for 'concatenate a(n) and nextprime(a(n)) is a prime'.

Original entry on oeis.org

0, 36, 150, 284, 464, 467, 525, 584, 644, 777, 855, 941, 1058, 1120, 1179, 1362, 1788, 1855, 2368, 2520, 2547, 2550, 2576, 2743, 2988, 3063, 3273, 3339, 3410, 3930, 4054, 4370, 4739, 4843, 4910, 5253, 5445, 5550, 5671, 5967, 6512, 6721, 6987, 7131, 7216
Offset: 0

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Examples

			a(n)=777 -> nextprime(a(n)) is 787 so '777787' is prime (=step 1); a(n2)=777787 -> nextprime(a(n2)) is 777817 so '777787777817' is prime (=step 2).
		

Crossrefs

A174034 The smallest prime p such that the double-concatenation prime(n) // prime(n+1) // p is a prime number.

Original entry on oeis.org

3, 3, 7, 19, 17, 7, 17, 7, 3, 23, 11, 11, 11, 17, 3, 3, 7, 3, 11, 17, 29, 19, 13, 7, 37, 7, 23, 37, 7, 23, 7, 7, 7, 11, 7, 53, 29, 31, 31, 13, 11, 17, 7, 11, 11, 29, 23, 47, 7, 7, 7, 13, 11, 19, 67, 19, 13, 101, 59, 13, 13, 31, 17, 23, 7, 13, 29, 73, 29, 7
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Mar 06 2010

Keywords

Comments

It is conjectured that a(n) = 3 for infinitely many n.

Examples

			n=1: 2 // 3 // 3 = 233, which is prime, so a(1) = 3.
n=2: 3 // 5 // 2 = 352, which is not prime, but 3 // 5 // 3 = 353 is, so a(2) = 3.
		

Crossrefs

Programs

  • PARI
    A174034(n)={ n=eval(Str(prime(n),prime(n+1))); for( d=1,99, n*=10; forprime( p=10^(d-1),10^d, isprime(n+p) & return(p)))} \\ M. F. Hasler, Dec 01 2010
  • Sage
    concat = lambda xx: Integer(''.join(map(str,xx)))
    A174034 = lambda x: next((p for p in Primes() if is_prime(concat([nth_prime(x), nth_prime(x+1), p])))) # D. S. McNeil, Dec 02 2010
    

Extensions

Edited and terms checked by D. S. McNeil, Dec 01 2010

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
    

A229814 Primes which are a concatenation of prime(i) and prime(prime(i)) for some i.

Original entry on oeis.org

23, 1759, 2383, 41179, 61283, 71353, 83431, 127709, 2271433, 3372269, 3532381, 4993559, 5033593, 5714153, 7275503, 8876899, 9117109, 9377351, 9717649, 10618513, 142711909, 157913297, 166314107, 169314437, 170914591, 187116073, 187716127, 190716451, 194916901
Offset: 1

Views

Author

K. D. Bajpai, Sep 30 2013

Keywords

Examples

			a(2)=1759: prime(7)= 17 and prime(17)= 59. Concatenating 17 and 59 gives 1759 which is prime.
a(4)=41179: prime(13)= 41 and prime(41)= 179. Concatenating 41 and 179 gives 41179 which is prime.
		

Crossrefs

Programs

  • Maple
    K := proc(n) local a,b,d; a :=ithprime(n);  b:=ithprime(a); d:=parse(cat(a,b)); if isprime(d) then return (d) end if; end proc:
    seq(K(n), n=1..1000);

A267721 a(n) is the least term of A030461 with gap = 6*n between consecutive primes or 0 if no such term exists.

Original entry on oeis.org

3137, 199211, 523541, 16691693, 1393313963, 2428124317, 3498135023, 7318973237, 4028940343, 191353191413, 221327221393, 507217507289, 937253937331, 10402271040311, 843911844001, 25654632565559, 81661078166209, 55778515577959, 82237498223863
Offset: 1

Views

Author

Jean-Marc Rebert, Jan 20 2016

Keywords

Comments

Subsequence of A030461.
a(n) is the concatenation of the smallest prime p and the next prime q, such that p + 6n = q and the concatenations of these 2 primes is also prime. a(n) = 0 if no such term exists.

Examples

			a(1) = A030461(2) = 3137. gap =  37 - 31 = 6 = 6 * 1.
a(2) = 199211, because 199211 is the first term in A030461, with gap = 211 - 199 = 12 = 6 * 2.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[seq(i,i=3..10^7,2)]):
    cati:= (x,y) -> 10^(1+ilog10(y))*x+y;
    for i from 1 to nops(Primes)-1 do
      g:= Primes[i+1]-Primes[i];
      if g mod 6 <> 0 then next fi;
      if assigned(A[g/6]) then next fi;
      z:= cati(Primes[i],Primes[i+1]);
      if isprime(z) then A[g/6]:= z fi;
    od:
    seq(A[i],i=1..max(map(op,[indices(A)]))); # Robert Israel, Jan 24 2016

A225120 Square numbers whose decimal representation can be divided into two or more semiprimes.

Original entry on oeis.org

49, 64, 144, 256, 576, 625, 1156, 1296, 1444, 1521, 2209, 2916, 3364, 3844, 3969, 4096, 4356, 4489, 4624, 6889, 7744, 8649, 9025, 9216, 9409, 9604, 10201, 10404, 10609, 10816, 12321, 12996, 13456, 14161, 15129, 15376, 15625, 15876, 17956, 18496, 18769, 20164
Offset: 1

Views

Author

Keywords

Comments

For 300 < n < 10000, 12.77*n^1.86 provides an estimate of a(n) to within 10%.
The density of squares included in the sequence asymptotically approaches 1.
There are infinitely many squares that are not in the sequence. For example, no square ending in 0 can be in the sequence. Another such infinite class is given by (50k+5)^2, for k>0. Indeed, these squares all end in "025" and since the only semiprime ending in 25 is 25 itself, then the other semiprime must end in 0, but this is impossible since the only semiprime ending in 0 is 10. - Giovanni Resta, May 03 2013

Examples

			a(50) = 25921, which is 161^2, and can be separated into semiprimes three ways: 25|921, 25|9|21, and 259|21.
		

Crossrefs

Programs

  • R
    issemipr<-function(n) ifelse(n<4,F,length(factorize(n))==2)
    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,issemipr))>0))^2

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)

A225151 Squares which are a decimal concatenation of triprimes.

Original entry on oeis.org

12544, 15376, 19044, 20164, 27556, 28561, 42436, 45369, 45796, 75076, 81796, 86436, 87025, 89401, 98596, 114244, 116964, 123201, 124609, 125316, 126025, 127449, 128164, 131044, 139876, 141376, 150544, 174724, 175561, 184041, 188356, 190969, 191844, 207025
Offset: 1

Views

Author

Keywords

Examples

			a(10) is 75076, which splits into 75|076. 75 = 3*5*5; 76 = 2*2*19.
		

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^2, istriprime)))>0)^2

A225575 Primes p such that if q is the next prime after p then the concatenation of p with q and the concatenation of q with p are both primes.

Original entry on oeis.org

199, 233, 257, 353, 523, 653, 971, 1973, 2333, 3259, 3637, 3761, 4283, 4993, 5927, 6353, 6529, 6563, 7907, 8831, 9293, 9851, 10711, 10861, 11731, 13037, 13177, 13681, 15241, 16381, 16693, 16931, 18341, 18899, 19577, 21787, 23857, 24071, 28621, 31657, 32911
Offset: 1

Views

Author

W. Edwin Clark, May 10 2013

Keywords

Comments

This sequence was suggested by Puzzle 687 at Prime Puzzles (see Links).
If q = p + 2 (that is, p is the lesser of a twin prime, A001359), then p is not in the sequence. - Alonso del Arte, May 10 2013
In general, q-p == 0 (mod 6). - Zak Seidov, May 11 2013

Examples

			The prime following 199 is 211 and both 199211 and 211199 are prime.
		

Crossrefs

Cf. A030459.

Programs

  • Magma
    conc:=func; [p:p in PrimesUpTo(17000)| IsPrime(conc(p,(NextPrime(p)))) and IsPrime(conc(NextPrime(p),p))]; // Marius A. Burtea, Jan 25 2020
  • Maple
    a:=NULL;
    for i from 1 to 2000 do
      p:=ithprime(i);
      q:=nextprime(p);
      s:=convert(p,string);
      t:=convert(q,string);
      if isprime(parse(cat(s,t))) and isprime(parse(cat(t,s))) then a:=a,p; fi;
    od:
    a;
  • Mathematica
    concatQ[{a_,b_}]:=Module[{idna=IntegerDigits[a],idnb=IntegerDigits[b]},AllTrue[ FromDigits/@ {Join[idna,idnb], Join[idnb,idna]},PrimeQ]]; Transpose[Select[ Partition[ Prime[Range[2000]],2,1],concatQ]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 16 2015 *)
Previous Showing 11-20 of 25 results. Next