The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A236036 a(n) is the smallest (2n+1)-digit prime number whose central digit equals the sum of its other digits. 1
 10513, 1005013, 100040201, 10000400021, 1000004000111, 100000040002001, 10000000400000111, 1000000004000100011, 100000000040000000021, 10000000000400010000011, 1000000000004000000000111, 100000000000040000010000101, 10000000000000400000000011001 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS Sequence starts at n=2, since no such 3-digit prime exists. LINKS Giovanni Resta, Table of n, a(n) for n = 2..100 EXAMPLE a(3) = 1005013 because the central digit 5 equals the sum of the other digits 1+0+0+0+1+3. MAPLE with(numtheory):for n from 2 to 10 do:m:=2*n-2:ii:=1:ii:=0:for k from 10^m to 10^(m+1)-1 while(ii=0)do:x:=convert(k, base, 10):n1:=nops(x):s:=sum('x[j]', 'j'=1..n1):s1:=s-x[n]:if x[n]=s1 and type(k, prime)=true then ii:=1: printf ( "%d %d \n", n, k):else fi:od:od: MATHEMATICA a[n_] := Catch@Block[{p}, Do[p = Select[ Union[ FromDigits /@ Flatten[ Permutations /@ (IntegerPartitions[d + n - 1, {n}, Range@d] - 1), 1]] + d*10^n + 10^(2*n), PrimeQ, 1]; If[p != {}, Throw@p[[1]]], {d, {4, 5}}]]; a /@ Range[2, 14] (* Giovanni Resta, Jan 20 2014 *) PROG (PARI) isspecial(p, n) = {d = digits(p); s = sumdigits(p); d[n+1] == (s - d[n+1]); } a(n) = {forprime (p = 10^(2*n), 10^(2*n+1), if (isspecial(p, n), return (p)); ); return (0); } \\ Michel Marcus, Jan 19 2014 CROSSREFS Cf. A000040, A235119. Sequence in context: A348758 A214192 A235119 * A216489 A120500 A371623 Adjacent sequences: A236033 A236034 A236035 * A236037 A236038 A236039 KEYWORD nonn,base AUTHOR Michel Lagneau, Jan 18 2014 EXTENSIONS a(9)-a(14) from Giovanni Resta, Jan 20 2014 Name simplified by Jon E. Schoenfield, Sep 09 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 17 19:13 EDT 2024. Contains 374377 sequences. (Running on oeis4.)