login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345985
Hamming distance between prime(n) and prime(n+1) in base 10.
3
1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 1
OFFSET
1,4
LINKS
EXAMPLE
Prime(4) = 7, prime(5) = 11, the words 7 and 11 are at Hamming distance 2 apart, so a(4) = 2.
PROG
(PARI) \\ abs Hamming distance in decimal digits
dhd(j, k)={my(dj=digits(j), dk=digits(k), s=0); s=abs(#dj-#dk); for(i=1, min(#dj, #dk), s+=(dj[i]!=dk[i])); s};
a345985(limit)={my(pp=2); forprime(p=3, limit, print1(dhd(p, pp), ", "); pp=p)};
a345985(prime(85)) \\ Hugo Pfoertner, Jul 09 2021
CROSSREFS
Cf. A205510.
Sequence in context: A300385 A317145 A330665 * A103765 A344772 A307610
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Jul 09 2021
STATUS
approved