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

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 *)

A100896 a(n) has decimal expansion 3nn3.

Original entry on oeis.org

3003, 3113, 3223, 3333, 3443, 3553, 3663, 3773, 3883, 3993, 310103, 311113, 312123, 313133, 314143, 315153, 316163, 317173, 318183, 319193, 320203, 321213, 322223, 323233, 324243, 325253, 326263, 327273, 328283, 329293, 330303, 331313, 332323
Offset: 0

Views

Author

Parthasarathy Nambi, Jan 10 2005

Keywords

Examples

			If n=5, then 3nn3 is 3553.
		

Crossrefs

Cf. A100846.

Programs

  • Magma
    [3003] cat [3*(1+10^(2*#Intseq(n)+1))+n*(10+10^(#Intseq(n)+1)): n in [1..40]]; // Vincenzo Librandi, Mar 09 2018
  • Maple
    f:= proc(n) local d; d:= ilog10(n)+1; 3*(1+10^(2*d+1))+n*(10+10^(d+1)) end proc:
    3003, seq(f(n),n=1..100); # Robert Israel, Mar 08 2018
  • Mathematica
    FromDigits/@Table[Join[{3},IntegerDigits[i],IntegerDigits[i],{3}],{i,0,40}] (* Harvey P. Dale, Sep 22 2014 *)

Formula

a(n) = 3nn3 where n=0, 1, 2, 3, ...
a(n) = 3*(1+10^(2*d+1))+n*(10+10^(d+1)) where d = A055642(n). - Robert Israel, Mar 08 2018

Extensions

More terms from Brian Lauer (bel136(AT)psu.edu), Feb 21 2006
Offset changed to 0 by Robert Israel, Mar 08 2018

A100897 a(n) is the decimal expansion of 7nn7.

Original entry on oeis.org

7007, 7117, 7227, 7337, 7447, 7557, 7667, 7777, 7887, 7997, 710107, 711117, 712127, 713137, 714147, 715157, 716167, 717177, 718187, 719197, 720207, 721217, 722227, 723237, 724247, 725257, 726267, 727277, 728287, 729297, 730307
Offset: 0

Views

Author

Parthasarathy Nambi, Jan 10 2005

Keywords

Examples

			If n=6, 7nn7 is 7667.
If n=15, 7nn7 is 715157 (a prime)
If n=18, 7nn7 is 718187 (a prime)
If n=19, 7nn7 is 719197 (a prime)
		

Crossrefs

Cf. A100846.

Programs

  • Maple
    a:= n-> parse(cat(7,n,n,7)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jan 24 2020
  • Mathematica
    Table[idn=IntegerDigits[n];FromDigits[Join[{7},idn,idn,{7}]],{n,0,30}] (* Harvey P. Dale, May 14 2013 *)

Formula

a(n) = 7nn7.

A102484 Numbers of the concatenated form 9nn9.

Original entry on oeis.org

9009, 9119, 9229, 9339, 9449, 9559, 9669, 9779, 9889, 9999, 910109, 911119, 912129, 913139, 914149, 915159, 916169, 917179, 918189, 919199, 920209, 921219, 922229, 923239, 924249, 925259, 926269, 927279, 928289, 929299, 930309
Offset: 1

Views

Author

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

Keywords

Examples

			For n=0 we concatenate 3, 0, 0 and 3 to get 3003.
For n=10 we concatenate 3, 10, 10 and 3 to get 310103.
		

Crossrefs

Cf. A100846 for 1nn1; A100896 for 3nn3; A100897 for 7nn7.
Cf. A055642.

Programs

  • Maple
    f:= n -> 9 + 9*10^(2*ilog10(n-1)+3)+(n-1)*(10+10^(2+ilog10(n-1))):
    f(1):= 9009;
    map(f, [$1..200]); # Robert Israel, May 09 2017
  • Mathematica
    With[{k = {9}}, Table[FromDigits@ Join[k, #, #, k] &@ IntegerDigits[n], {n, 0, 30}]] (* Michael De Vlieger, May 09 2017 *)

Formula

a(n) = 9*(1 + 10^(2*A055642(n-1)+1))+(n-1)*(10+10^(1+A055642(n-1))). - Robert Israel, May 09 2017

A102497 Primes of the concatenated form 1nn1 where n is an integer >=0.

Original entry on oeis.org

112121, 113131, 115151, 119191, 127271, 131311, 134341, 136361, 140401, 142421, 145451, 149491, 157571, 158581, 161611, 169691, 170701, 172721, 178781, 182821, 187871, 190901, 191911, 196961, 197971, 1100010001, 1100210021, 1101710171
Offset: 1

Views

Author

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

Keywords

Examples

			112121 is prime and is of the form 1nn1 for n=12.
1100010001 is prime and is of the form 1nn1 for n=1000.
		

Crossrefs

Cf. A100846; A100496 for the values of n that produce these primes.

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