A252495 Restricted magnanimous numbers: numbers such that the sum obtained by inserting a "+" anywhere between two digits gives a prime, but no "leading zeros" may appear.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 16, 20, 21, 23, 25, 29, 30, 32, 34, 38, 41, 43, 47, 49, 50, 52, 56, 58, 61, 65, 67, 70, 74, 76, 83, 85, 89, 92, 94, 98, 110, 112, 116, 118, 130, 136, 152, 158, 170, 172, 221, 227, 229, 245, 265, 281, 310, 316, 334, 338, 356
Offset: 1
Examples
110 is in the sequence since 1+10=11 and 11+0 = 11 are both prime. 101 is not in the sequence because although 10+1 = 11 and 1+01 = 2 are prime, the latter sum is forbidden since 01 has a leading zero. Number, smallest and largest of the n-digit terms: | n # min max | 1 10 0 9 | 2 33 11 98 | 3 69 110 998 | 4 90 1112 9910 | 5 81 11116 99998 | 6 71 111112 999994 | 7 54 1115756 9959374 | 8 25 11771992 95559998 | 9 9 117711170 995955112 |10 4 1777137770 9151995592 |11 4 22226226625 46884486265 |12 0 - |13 1 5391391551358 |14 1 97393713331910 |15 0 -
Links
- M. F. Hasler, Table of n, a(n) for n = 1..452
- E. Angelini and L. Blomberg, Insert "+" and always get a prime, Dec 2014
- G. Resta, magnanimous numbers, 2013.
- C. Rivera, Puzzle 401. Magnanimous primes, 2007.
Programs
-
PARI
is(n)=!for(i=1,#Str(n)-1,ispseudoprime([1,1]*(divrem(n,10^i)))||return)&&(n<100||vecmin(digits(n\10))) t=0;vector(100,i,until(is(t++),);t)
Comments