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

A100846 Concatenate (1,n,n,1).

Original entry on oeis.org

1001, 1111, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 110101, 111111, 112121, 113131, 114141, 115151, 116161, 117171, 118181, 119191, 120201, 121211, 122221, 123231, 124241, 125251, 126261, 127271, 128281, 129291, 130301, 131311, 132321
Offset: 0

Views

Author

Parthasarathy Nambi, Jan 07 2005

Keywords

Examples

			For n = 0, concatenate(1,n,n,1) is 1001 = a(0).
For n = 5, concatenate(1,n,n,1) is 1551 = a(5).
For n = 10, concatenate(1,n,n,1) is 110101 = a(10).
		

Crossrefs

Cf. A100896 (3nn3), 7nn7 (A100897), 9nn9 (A102484).
For primes in these sequences: A102496, A102497 (1nn1); A102498, A102499 (3nn3); A102500, A102501 (7nn7); A102502, A102503 (9nn9); A102504 (intersection).

Programs

  • Maple
    seq(seq((10^(2*d+1)+1+(10^(d+1)+10)*n), n=`if`(d>1,10^(d-1),0) .. 10^d-1),d=1..3);
    # Robert Israel, Dec 30 2015, edited for n=0 by M. F. Hasler, Jun 25 2018
  • Mathematica
    For[n = 0, n < 30, n++, l := Floor[Log[10, Min[n,1]] + 1]; gvout := (n*10^l + n)*10 + 1; m := Floor[Log[10, gvout]]; giveout := 10^(m + 1) + out; Print[giveout]] (* Stefan Steinerberger, Jan 27 2006, edited for n=0 by M. F. Hasler, Jun 25 2018 *)
  • PARI
    A100846(n)=eval(Str(1,n,n,1)) \\ M. F. Hasler, Jun 22 2018

Formula

G.f.: 1001 + x*(31-11*x)/(1-x)^2 + Sum_{k>=0} 90*(12*10^(2*k)*(1-x)+10^k*x)*x^(10^k)/(1-x)^2. - Robert Israel, Dec 30 2015

Extensions

More terms from Stefan Steinerberger, Jan 27 2006
Definition reworded and missing 1001 added by M. F. Hasler, Jun 22 2018

A102496 Values of n for which the concatenation of the form 1nn1 (sequence A100846) are primes.

Original entry on oeis.org

12, 13, 15, 19, 27, 31, 34, 36, 40, 42, 45, 49, 57, 58, 61, 69, 70, 72, 78, 82, 87, 90, 91, 96, 97, 1000, 1002, 1017, 1018, 1024, 1033, 1035, 1063, 1068, 1069, 1074, 1084, 1086, 1090, 1095, 1110, 1114, 1116, 1117, 1126, 1128, 1173, 1174, 1179, 1185, 1189, 1192
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 12 2005

Keywords

Comments

All terms == 0 or 1 (mod 3), and have an even number of decimal digits. - Robert Israel, May 09 2017

Examples

			For n=12 we have 112121, which is prime.
For n=13 we have 113131, which is prime.
For n=1000 we have 1100010001, which is prime.
		

Crossrefs

Cf. A100846. The primes themselves are in sequence A102497.

Programs

  • Maple
    f:= n -> 1 + 1*10^(2*ilog10(n)+3)+(n)*(10+10^(2+ilog10(n))):
    select(n -> isprime(f(n)), [$1..2000]); # Robert Israel, May 09 2017
  • Mathematica
    Select[Range@ 1200, PrimeQ[FromDigits@ Join[{1}, #, #, {1}]] &@ IntegerDigits[#] &] (* Michael De Vlieger, May 09 2017 *)

A102504 Values of n for which the concatenations 1nn1, 3nn3, 7nn7 and 9nn9 are all primes.

Original entry on oeis.org

2092, 2131, 2797, 3433, 4126, 5524, 5710, 6817, 8383, 8815, 9472, 114613, 116329, 130213, 206776, 239389, 282298, 286642, 306046, 307180, 311317, 318310, 341386, 360733, 366529, 377005, 425665, 430597, 460441, 475642, 475660, 478078, 490870
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 13 2005

Keywords

Examples

			E.g. n=2092 leads to 1209220921, 3209220923, 7209220927 and 9209220929, all of which are primes.
		

Crossrefs

For full sequences of integers of form 1nn1 (A100846), 3nn3 (A100896), 7nn7 (A100897), 9nn9 (A102484). For primes in these sequences: 1nn1 (A102496, A102497), 3nn3 (A102498, A102499), 7nn7 (A102500, A102501), 9nn9 (A102502, A102503).

Programs

  • Mathematica
    foQ[n_, o_] := Block[{id = IntegerDigits[n]}, PrimeQ[ FromDigits[ Join[{o}, id, id, {o}] ]]]; Select[ Range[500985], foQ[ #, 1] && foQ[ #, 3] && foQ[ #, 7] && foQ[ #, 9] &] (* Robert G. Wilson v, Jan 14 2005 *)
Showing 1-3 of 3 results.