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.

A051640 a(n) contains the digit b-1 in all bases b from 2 to n.

This page as a plain text file.
%I A051640 #14 May 18 2020 22:39:51
%S A051640 1,2,7,14,23,47,47,239,239,239,239,5927,13679,13679,13679,57119,
%T A051640 159119,500399,500399,1627919,2585519,3694397,7305479,17067599,
%U A051640 41126399,41126399,41126399,61483967,586370399,589188599,1278033119,1278033119,1278033119,1278033119,1278033119
%N A051640 a(n) contains the digit b-1 in all bases b from 2 to n.
%e A051640 47 = 101111 (base 2), 1202 (base 3), 233 (base 4), 142 (base 5), 115 (base 6), 65 (base 7), 57 (base 8). Base 2 representation contains digit 1, base 3 representation contains digit 2, base 4 representation contains digit 3, etc., so a(8)=47.
%o A051640 (Python)
%o A051640 from sympy.ntheory.factor_ import digits
%o A051640 def A051640(n):
%o A051640     m = 0
%o A051640     while True:
%o A051640         for b in range(2,n+1):
%o A051640             if b-1 not in digits(m,b)[1:]:
%o A051640                 break
%o A051640         else:
%o A051640             return m
%o A051640         m += 1 # _Chai Wah Wu_, May 18 2020
%K A051640 base,nonn,nice
%O A051640 2,2
%A A051640 _Jeff Burch_, Jun 04 2000
%E A051640 More terms from Ulrich Schimke (ulrschimke(AT)aol.com), Jun 12 2000
%E A051640 Definition corrected by _Franklin T. Adams-Watters_, Apr 10 2006
%E A051640 a(34)-a(36) from _Chai Wah Wu_, May 18 2020