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.

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.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 28 2014

Keywords

Comments

Inclusion of the single-digit terms is conventional: here the property is vacuously satisfied since no sum can be constructed by inserting a + sign between two digits, therefore all possible sums are prime. (It is not allowed to prefix a leading zero (e.g., to forbid 4 = 04 = 0+4) since in that case all terms must be prime and one would get A089392.)
The restriction on leading zeros means that numbers with digit 0 other than in the last position are excluded, so this sequence equals A252996 with terms in A252480 removed.
Since all primes > 2 are odd, all terms different from 11 and 20 have the last digit of opposite parity to that of all other digits.
As A252996, this sequence is "finite" (without rigorous proof), and up to 5e16 the only terms with more than 11 digits are 5391391551358 and 97393713331910, the latter being probably the largest element of this sequence (due to Giovanni Resta).
(See links for "intellectual ownership": The sequence (without single-digit terms) was suggested by Eric Angelini, a first list of terms computed by Lars Blomberg, then others. Hans Havermann observed that this is a variant of what had been termed "magnanimous numbers" at least 10 years ago by A. Murthy, G. Resta and/or C. Rivera, cf. A089392 and links.)

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  -
		

Crossrefs

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)

A323142 Envelope numbers (see the Comments section for the definition).

Original entry on oeis.org

100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 700, 701, 702, 703, 704
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jan 05 2019

Keywords

Comments

An envelope number N has two parts E and C such that C is a multiple of E; E is the concatenation of the first and the last digit of N (the Envelope) and C is the concatenation of the other digits (the Content of the envelope). The integer 12348 is a member of the sequence as 234 (the Content) is a multiple of 18 (the Envelope): indeed 234 = 18*13. Contents that have a leading zero are not admitted (10347 is not a regular envelope number though 34 is a multiple of 17).
Note that some envelope numbers might fit into another envelope (and so on): see the Crossrefs section.
This sequence begins with the same 90 terms of A252480 then differs: A252480(91) = 1000 and A323142(91) = 1100

Examples

			100 has a Content of 0 which is indeed a multiple of the Envelope 10 (0 = 10*0)
101 has a Content of 0 which is indeed a multiple of the Envelope 11 (0 = 11*0)
102 has a Content of 0 which is indeed a multiple of the Envelope 12 (0 = 12*0)
...
1100 has a Content of 10 which is indeed a multiple of the Envelope 10 (10 = 10*1)
1111 has a Content of 11 which is indeed a multiple of the Envelope 11 (11 = 11*1)
1122 has a Content of 12 which is indeed a multiple of the Envelope 12 (12 = 12*1)
...
1263 has a Content of 26 which is indeed a multiple of the Envelope 13 (26 = 13*2)
		

Crossrefs

Cf. A323143 (envelope numbers that fit into successive bigger envelopes).
Cf. A252480.

Programs

  • Mathematica
    Select[Range[100, 704], Or[#1 == 0, Mod[#1, #2] == 0] & @@ {If[And[First@ # == 0, Length@ # > 1], -1, FromDigits@ #] &@ Most@ Rest@ #, FromDigits@ {First@ #, Last@ #}} &@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 07 2019 *)
  • PARI
    isok(n,base=10) = my (d=digits(n,base)); #d>=3 && (#d==3 || d[2]) && ((n-d[1]*base^(#d-1))\base) % (d[1]*base+d[#d])==0 \\ Rémy Sigrist, Jan 06 2019
Showing 1-2 of 2 results.