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

A086043 Concatenation of first n twin primes.

Original entry on oeis.org

3, 35, 357, 35711, 3571113, 357111317, 35711131719, 3571113171929, 357111317192931, 35711131719293141, 3571113171929314143, 357111317192931414359, 35711131719293141435961, 3571113171929314143596171, 357111317192931414359617173, 357111317192931414359617173101
Offset: 1

Views

Author

Cino Hilliard, Sep 08 2003

Keywords

Comments

After 3, 357111317192931414359 is the only prime in the sequence for n up to 10000.
Although 5 appears in two twin prime pairs (3, 5) and (5, 7), 5 is concatenated only once in the sequence. - Daniel Forgues, Aug 23 2016
a(n) == 0 mod 3 for n odd, a(n) == 2 mod 3 for n even. - Robert Israel, Sep 01 2016

Crossrefs

Programs

  • Maple
    Primes:= select(isprime, {seq(i,i=1..100,2)}):
    T1:= Primes intersect map(`+`,Primes,2):
    Twins:= sort(convert(T1 union map(`-`,T1,2),list)):
    dcat:= (a,b) -> a*10^(1+ilog10(b))+b:
    A[1]:= 3:
    for n from 2 to nops(Twins) do A[n]:= dcat(A[n-1],Twins[n]) od:
    seq(A[i],i=1..nops(Twins)); # Robert Israel, Sep 01 2016
  • Mathematica
    Table[FromDigits@ Flatten@ Map[IntegerDigits, Take[#, n]], {n, Length@ #}] &[Union@ Join[#, # + 2] &@ Select[Prime@ Range@ 17, NextPrime@ # - 2 == # &]] (* Michael De Vlieger, Sep 01 2016 *)
    Module[{tps=Union[Flatten[Select[Partition[Prime[Range[50]],2,1],#[[2]]-#[[1]] == 2&]]]},FromDigits[Flatten[IntegerDigits/@#]]&/@Table[Take[tps,n],{n,Length[tps]}]] (* Harvey P. Dale, Jun 16 2022 *)
  • PARI
    concattwprb(n) = { y=3; forprime(x=5,n, if(isprime(x+2) || isprime(x-2), y=eval(concat(Str(y),Str(x))); print1(y",") ) ) }

Extensions

Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar

A086060 Concatenation of the larger members of first n pairs of twin primes.

Original entry on oeis.org

5, 57, 5713, 571319, 57131931, 5713193143, 571319314361, 57131931436173, 57131931436173103, 57131931436173103109, 57131931436173103109139, 57131931436173103109139151, 57131931436173103109139151181
Offset: 3

Views

Author

Cino Hilliard, Sep 08 2003

Keywords

Comments

5713...20832089 is the only prime for n up to 10000.

Crossrefs

Programs

  • PARI
    concattwpr(n) = { y=5; print1(5","); forprime(x=7,n, if(isprime(x-2), y=eval(concat(Str(y),Str(x))); print1(y",") ) ) }
Showing 1-2 of 2 results.