Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)
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 (list; graph; refs; listen; history; text; internal format)
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

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 September 11 21:59 EDT 2024. Contains 375839 sequences. (Running on oeis4.)