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.

A345985 Hamming distance between prime(n) and prime(n+1) in base 10.

This page as a plain text file.
%I A345985 #11 Jul 09 2021 23:57:39
%S A345985 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,
%T A345985 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,
%U A345985 1,2,1,2,2,1,2,1,2,3,1,1,2,1,1,1
%N A345985 Hamming distance between prime(n) and prime(n+1) in base 10.
%H A345985 Hugo Pfoertner, <a href="/A345985/b345985.txt">Table of n, a(n) for n = 1..10000</a>
%e A345985 Prime(4) = 7, prime(5) = 11, the words 7 and 11  are at Hamming distance 2 apart, so a(4) = 2.
%o A345985 (PARI) \\ abs Hamming distance in decimal digits
%o A345985 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};
%o A345985 a345985(limit)={my(pp=2);forprime(p=3,limit,print1(dhd(p,pp),", ");pp=p)};
%o A345985 a345985(prime(85)) \\ _Hugo Pfoertner_, Jul 09 2021
%Y A345985 Cf. A205510.
%K A345985 nonn,base,easy
%O A345985 1,4
%A A345985 _N. J. A. Sloane_, Jul 09 2021