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.

A353023 Positive integers k with the property that they cannot be converted to a multiple of 11 by changing at most a single decimal digit.

This page as a plain text file.
%I A353023 #39 Oct 07 2024 14:17:26
%S A353023 545,27272,1818181,636363636,90909090909,181818181818,272727272727,
%T A353023 363636363636,454545454545,545454545454,636363636363,727272727272,
%U A353023 818181818181,909090909090,363636363636363,81818181818181818,7272727272727272727,454545454545454545454
%N A353023 Positive integers k with the property that they cannot be converted to a multiple of 11 by changing at most a single decimal digit.
%C A353023 This sequence was inspired by a puzzle from David K. Butler.
%H A353023 Ben Weiss, <a href="https://blog.benweiss.com/2022/05/16/multiples-of-11/">Multiples of 11</a>
%F A353023 a(n) = a(n - 18) * 10^22 + (a(n - 18) mod 100) * 101010101010101010101.
%o A353023 (Objective-C)
%o A353023 int main(int argc, const char * argv[]) {
%o A353023   // Search positive integers for solutions, up to 10^20.
%o A353023   for (int length = 1; length < 20; ++length) {
%o A353023     for (int a = 0; a <= 9; ++a) {
%o A353023       int b = 9 - a;
%o A353023       // Test number abababab... with length 'length'
%o A353023       int a_mod_11 = (a * ((length + 1) / 2)) % 11;
%o A353023       int b_mod_11 = (b * ((length    ) / 2)) % 11;
%o A353023       int a_add = (b_mod_11 - a_mod_11 + 11) % 11;
%o A353023       if (a + a_add == 10) {
%o A353023         uint64_t num = 0;
%o A353023         uint64_t dec = 1;
%o A353023         for (int d = 0; d < length; ++d) {
%o A353023           num += ((d & 1) ? b : a) * dec;
%o A353023           dec *= 10;
%o A353023         }
%o A353023         NSLog(@"Found solution: %llu", num);
%o A353023       }
%o A353023     }
%o A353023   }
%o A353023   return 0;
%o A353023 }
%Y A353023 Cf. A008593 (multiples of 11).
%K A353023 base,nonn
%O A353023 1,1
%A A353023 _Ben Weiss_, May 15 2022