# nice new seqs

N. J. A. Sloane njas at research.att.com
Mon Feb 5 18:45:59 CET 2001

```Forwarded message from David Wilson:

Date: Mon, 05 Feb 2001 10:57:35 -0500
From: "David W. Wilson" <wilson at aprisma.com>
To: "N. J. A. Sloane" <njas at research.att.com>
Subject: Re: nice new sequences

"N. J. A. Sloane" wrote:
>
> Gregory Allen (jukebox_999 at hotmail.com) sent in these two seqs:
>
> %I A059458
> %S A059458 10,11,111,101,1101,11101,11111,10111,10011,10001,10000000010001,
> %T A059458 10000001010001
> %N A059458 A binary sequence: a(1) = 10 (2 in decimal), and a(n+1) is obtained by trying to complement just one bit of a(n), starting with the least significant bit, until a new prime is reached.
> %C A059458 It is not known if the sequence is infinite.
> %O A059458 1,1
> %K A059458 nice,nonn,base,more
> %A A059458 Gregory Allen (jukebox_999 at hotmail.com), Feb 02 2001
> %Y A059458 The decimal sequence is given in A059459. A base ten analogue is in A059471.

10 11 111 101 1101 11101 11111 10111 10011 10001 10000000010001
10000001010001 10100001010001 100001010001 100001010011 1010011 1000011
1000111 1001111 10001001111 10000001111 10000000111 10000100111

>
> %I A059459
> %S A059459 2,3,7,5,13,29,31,23,19,17,8209,8273
> %N A059459 a(1) = 2; a(n+1) is obtained by writing a(n) in binary and trying to complement just one bit, starting with the least significant bit, until a new prime is reached.
> %C A059459 It is not known if the sequence is infinite.
> %O A059459 1,1
> %K A059459 more,nonn,base,nice
> %A A059459 Gregory Allen (jukebox_999 at hotmail.com), Feb 02 2001
> %Y A059459 Cf. A059458 (for this sequence written in binary), A059471.

2 3 7 5 13 29 31 23 19 17 8209 8273 10321 2129 2131 83 67 71 79 1103
1039 1031 1063 1061 1069 263213 263209 263201 265249 265313 264289
280673 280681 280697 280699 280703 280639 280607 280603 280859 280843

> (well, i extended them by hand, so don't blame him for errors)
>
> and I added these two analogues:
>
> %I A059471
> %S A059471 2,3,5,7,17,11,13,19,29,23,43,41,47,37,31,61,67,97,197,191
> %N A059471 a(1) = 2; a(n+1) is obtained by and trying to change just one digit of a(n), starting with the least significant digit, until a new prime is reached.
> %C A059471 It is not known if the sequence is infinite.
> %O A059471 1,1
> %K A059471 more,nonn,base,nice
> %A A059471 njas, Feb 3, 2001
> %Y A059471 Decimal analogue of  A059458. See also A059472 for primes that are missed.

The generalization of A059459 is not straightforward, since we cannot
complement decimal digits.  There are several potential generalizations of
complementing a binary digit to decimal digits:

A:  Replace a digit with any digit.
B:  Replace a the first digit with a nonzero digit, others with any digit.
C:  Replace a digit with a nonzer digit.
D:  Replace a digit with a larger digit.

A:
2 3 5 7 17 11 13 19 29 23 43 41 47 37 31 61 67 97 197 191 193 199 109
101 103 107 127 137 131 139 149 179 173 113 163 167 157 151 181 281 283
223 227 229 239 233 263 269 569 563 503 509 599 593 523 521 541 547 557

B:
2 3 5 7 17 11 13 19 29 23 43 41 47 37 31 61 67 97 197 191 193 199 109
101 103 107 127 137 131 139 149 179 173 113 163 167 157 151 181 281 283
223 227 229 239 233 263 269 569 563 503 509 599 593 523 521 541 547 557

C:
2 3 5 7 17 11 13 19 29 23 43 41 47 37 31 61 67 97 197 191 193 199 139
131 137 127 157 151 181 281 283 223 227 229 239 233 263 269 569 563 523
521 541 547 557 577 571 271 277 257 251 211 241 641 643 647 617 613 619

D:
2 3 5 7 17 19 29 59 79 89 389 2389 2399 2699 2999 4999 8999 98999
298999 598999 599999 799999 1799999 4799999 4999999 904999999 974999999
60974999999 68974999999 68975999999 3000068975999999 3000568975999999

A and B diverge at a(62) = 71, b(62) = 271.

D is an increasing sequence, the others can decrease.

The lengths of elements of A can decrease, the lengths of elements of
the other sequences is nondecreasing.

> %I A059472
> %S A059472 53,59,71,73,79,83,89
> %N A059472 Primes omitted from A059471.
> %O A059472 1,1
> %K A059472 more,nonn,base
> %A A059472 njas, Feb 3, 2001

For A, it is hard to tell which primes are omitted, though I suspect
some are.  The above primes are certain in A, since
A(62..68) = (71,73,79,59,53,83,89).

For B, we have the omitted primes

53 59 71 73 79 83 89 293 331 337 367 397 479 761 769 797 811 907 911
919 929 937 941 947 953 967 971 977 983 991 997 1021 1051 1087 1103
1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1301 1303 1307

For C we have the omitted primes (includes all primes with digit 0)

53 59 71 73 79 83 89 101 103 107 109 113 293 307 373 379 383 389 397
401 409 421 479 491 499 503 509 593 599 601 607 631 661 683 691 701 709
797 809 811 907 911 919 929 937 941 947 953 967 971 977 983 991 997

For D, the omitted primes aren't worth computing.

```