Sum of the last digits
Lexicographically earliest sequence S of distinct nonnegative integers such that 9 out of the last 10 digits of S always sum up to a square.
S = 1000000000, 0, 1, 2, 3, 4, 6, 5, 7, 8, 9, 10, 11, 13, 12, 15, 14, 17, 16, 21, 18, 19, 20, 27, 22, 25, 23, 30, 24, 26, 31, 28, 29, 32, 34, 33, 36, 38, 35, 37, 40, 39, 41, 42, 43, 44, 47, 45, 50, 46, 51, 48, 52, 54, 55, 49, 57, 53, 56, 58, 59, 60, 64, 61, 62, 63
(terms computed by Michael S. Branicky, see the draft/seq here)
The smallest available 10-digit integer to start S with is a(1) = 1000000000.
The sequence is infinite as there are infinitely many integers whose 9 of the last 10 digits sum up to a square.
We start with a(1) = 1000000000:
S = 1000000000,
The last 10 digits of S are [1000000000]; we discard a 0 and the sum of the 9 remaining digits = 1 (a square). We try to extend S with 0:
S = 1000000000,0,
The last 10 digits of S are [0000000000]; we discard a 0 and the sum of the 9 remaining digits = 0 (a square). We try to extend S with 1:
S = 1000000000,0,1,
The last 10 digits of S are [0000000001]; we discard a 0 and the sum of the 9 remaining digits = 1 (a square). We try to extend S with 2:
S = 1000000000,0,1,2,
The last 10 digits of S are [0000000012]; we discard 2 and the sum of the 9 remaining digits = 1 (a square). We try to extend S with 3:
S = 1000000000,0,1,2,3,
The last 10 digits of S are [0000000123]; we discard 2 and the sum of the 9 remaining digits = 4 (a square). We try to extend S with 4:
S = 1000000000,0,1,2,3,4,
The last 10 digits of S are [0000001234]; we discard 1 and the sum of the 9 remaining digits = 9 (a square). We try to extend S with 5:
S = 1000000000,0,1,2,3,4,5,
The last 10 digits of S are [0000012345]; as no square can be reached, whatever we discard, we don’t extend S with 5. We try to extend S with 6:
S = 1000000000,0,1,2,3,4,6,
The last 10 digits of S are [0000012346]; we discard a 0 and the sum of the 9 remaining digits = 16 (a square). We try to extend S with 5:
S = 1000000000,0,1,2,3,4,6,5,
The last 10 digits of S are [0000123465]; we discard 5 and the sum of the 9 remaining digits = 16 (a square). We try to extend S with 7:
S = 1000000000,0,1,2,3,4,6,5,7,
The last 10 digits of S are [0001234657]; we discard 3 and the sum of the 9 remaining digits = 25 (a square). We try to extend S with 8:
S = 1000000000,0,1,2,3,4,6,5,7,8,
The last 10 digits of S are [0012346578]; we discard a 0 and the sum of the 9 remaining digits = 36 (a square). We try to extend S with 9:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,
The last 10 digits of S are [0123465789]; we discard 9 and the sum of the 9 remaining digits = 36 (a square). We try to extend S with 10:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,10,
The last 10 digits of S are [2346578910]; we discard 9 and the sum of the 9 remaining digits = 36 (a square). We try to extend S with 11:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,10,11,
The last 10 digits of S are [4657891011]; we discard 6 and the sum of the 9 remaining digits = 36 (a square). We try to extend S with 12:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,10,11,12,
The last 10 digits of S are [5789101112]; as no square can be reached, whatever we discard, we don’t extend S with 12. We try to extend S with 13:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,10,11,13,
The last 10 digits of S are [5789101113]; we discard 0 and the sum of the 9 remaining digits = 36 (a square). We try to extend S with 12:
S = 1000000000,0,1,2,3,4,6,5,7,8,9,10,11,13,12,
The last 10 digits of S are [8910111312]; we discard 2 and the sum of the 9 remaining digits = 25 (a square). Etc.
__________________
Variants
Many ideas:
– seq T = the remaining digits sum up to a prime number
– seq U = the remaining digits sum up to a Fibonacci number
– seq V (hereunder).
The value of the rightmost digit "d" of a(n) has been carefully chosen so that the last "d" digits of the sequence so far sum up to a prime. This is the lexicographically earliest seq of distinct terms > 0 with this property.
V = 12, 23, 2, 4, 6, 3, 13, 15, 8, 19, 26, 5, 17, ...
sum = 3 7 5 11 19 13 7 13 31 37 31 23 31 ...
Example
We take a(1) = 12 as no smaller integer is possible to start V with.
As the digit d is the rightmost digit of a(n), we have here d = 2. We must check now if the last 2 digits of V sum up to a oprime. This is the case as 1 + 2 = 3 (a prime);
a(2) = 23 and d = 3; the last 3 digits of V so far sum up to a prime (2 + 2 + 3 = 7);
a(3) = 2 and d = 2; the last 2 digits of V so far sum up to a prime (3 + 2 = 5);
a(4) = 4 and d = 4; the last 4 digits of V so far sum up to a prime (2 + 3 + 2 + 4 = 11);
a(5) = 6 and d = 6; the last 6 digits of V so far sum up to a prime (2 + 2 + 3 + 2 + 4 + 6 = 19);
a(6) = 3 and d = 3; the last 3 digits of V so far sum up to a prime (4 + 6 + 3 = 13);
a(7) = 13 and d = 3; the last 3 digits of V so far sum up to a prime (3 + 1 + 3 = 7); etc.
Variant W
The last digit d of a(n) asserts that the last d digits of a(n) sum up to a prime. I guess we (lexico-distinct) have:
W = 12, 32, 52, 92, 102, 112, 113, 132, 133, 152, 173, 192, 193, 202, 203, 212, 223, ...
Variant X
The last digit d of a(n) asserts that the last d digits of a(n) sum up to a square. I guess we (lexico-distinct) have:
X = 1, 11, 21, 22, 31, 41, 51, 61, 71, 72, 81, 91, 101, 103, 111, 121, 122, 131, 141, 151, 153,...
Variant Y
The first digit d of a(n) asserts that the first d digits of a(n) sum up to a prime. I guess we (lexico-distinct) have:
Y = 21, 23, 25, 29, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, ...
Commentaires
Enregistrer un commentaire