OFFSET
1,1
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.
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..20001
EXAMPLE
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)
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 *)
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Jan 05 2019
STATUS
approved