login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
545, 27272, 1818181, 636363636, 90909090909, 181818181818, 272727272727, 363636363636, 454545454545, 545454545454, 636363636363, 727272727272, 818181818181, 909090909090, 363636363636363, 81818181818181818, 7272727272727272727, 454545454545454545454 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence was inspired by a puzzle from David K. Butler.
LINKS
Ben Weiss, Multiples of 11
FORMULA
a(n) = a(n - 18) * 10^22 + (a(n - 18) mod 100) * 101010101010101010101.
PROG
(OBJC)
int main(int argc, const char * argv[]) {
// Search positive integers for solutions, up to 10^20.
for (int length = 1; length < 20; ++length) {
for (int a = 0; a <= 9; ++a) {
int b = 9 - a;
// Test number abababab... with length 'length'
int a_mod_11 = (a * ((length + 1) / 2)) % 11;
int b_mod_11 = (b * ((length ) / 2)) % 11;
int a_add = (b_mod_11 - a_mod_11 + 11) % 11;
if (a + a_add == 10) {
uint64_t num = 0;
uint64_t dec = 1;
for (int d = 0; d < length; ++d) {
num += ((d & 1) ? b : a) * dec;
dec *= 10;
}
NSLog(@"Found solution: %llu", num);
}
}
}
return 0;
}
CROSSREFS
Cf. A008593 (multiples of 11).
Sequence in context: A159626 A020259 A184379 * A053327 A252537 A099008
KEYWORD
base,nonn
AUTHOR
Ben Weiss, May 15 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)