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.
%I A239706 #18 Oct 26 2014 04:54:52 %S A239706 1,0,1,0,2,0,1,0,1,1,2,0,1,0,1,0,2,0,3,1,1,0,3,0,1,0,1,0,3,0,1,0,2,2, %T A239706 1,0,1,0,2,1,2,0,2,0,1,1,2,0,2,0,1,0,3,1,2,0,2,1,3,0,2,0,1,0,2,0,1,1, %U A239706 2,0,3,0,1,0,1,2,3,0,1,1,1,0,5,0,1,1,1,0,4,0,2,1,1,0,3,0,1,0,3,0 %N A239706 Number of bases b for which the absolute value of the base-b alternate digital sum of n is b. %C A239706 For the definition of the alternate digital sum, see A055017 or A225693. %C A239706 For reference: we write altDigitSum_b(x) for the base-b alternate digital sum of x according to A055017. %C A239706 The number of counted bases includes the special base 1. The base-1 expansion of a natural number is defined as 1=1_1, 2=11_1, 3=111_1 and so on. As a result, the base-1 alternate digital sum is 0 if n is even, and is 1 if n is odd. %C A239706 For odd n we have altDigitSum_1(n) = 1, and thus a(n) >= 1. %C A239706 We have |altDigitSum_b(n)| < b for bases b that satisfy b > b0 := floor((sqrt(4n+5) - 1)/2), and thus a(n) <= b0. %C A239706 It follows from A239704 and A239705 that there are infinitely many n that satisfy |altDigitSum_b(n)| = b for a base b > 1. Consequently, a(n) >= 2 for n = 5, 11, 19, 29, 41, ... (oblong numbers minus 1 starting with the third such number) and a(n) >= 1 for n = 10, 33, 76, 145, 246, ... (sums of cubes and oblong numbers, starting with 2^3 + the second oblong number, see A002378). %C A239706 If b is a base such that the absolute value of the base-b alternate digital sum of n is b, then b + 1 is a divisor of n + 1 or of n - 1. %C A239706 a(b*n) > (b*n) mod 2 for all b > 1 which satisfy altDigitSum_b(n) = -b. %C A239706 a(b*n) > 0 for all b > 1 which satisfy altDigitSum_b(n) = b. %C A239706 The first n with a(n) = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... are n = 1, 5, 19, 89, 83, 359, 419, 629, 839, 3359, ... . %C A239706 a(n) = 0, if n is in the middle of a twin prime pair i.e., if n - 1 and n + 1 are primes. %H A239706 Hieronymus Fischer, <a href="/A239706/b239706.txt">Table of n, a(n) for n = 1..10000</a> %F A239706 a(n) = A239704(n) + A239705(n). %F A239706 a(n) > max(A239704(n), A239705(n)) for n = 9*2^k - 3, k = 2, 3, 4, ... . %F A239706 a(A002378(n)-1) >= 2, n > 1. %F A239706 a(n) > max(A239704(n), A239705(n)) for n = 9*2^k - 3, k = 2, 3, 4, ... . %F A239706 a(n) < floor(sigma_0(n-1)/2) + floor(sigma_0(n+1)/2). %e A239706 a(1) = 1, since |altDigitSum_1(1)| = 1 and |altDigitSum_b(1)| = 1 <> b for all b > 1. %e A239706 a(2) = 0, since |altDigitSum_1(2)| = 0 (because of 2 = 11_1), and |altDigitSum_2(2)| = 1 (because of 2 = 10_2), and |altDigitSum_b(2)| = 2 <> b for all b > 2. %e A239706 a(33) = 3, since |altDigitSum_1(33)| = 1, and |altDigitSum_2(33)| = 0 (because of 33 = 100001_2), and |altDigitSum_3(33)| = 3 (because of 33 = 1020_3), and |altDigitSum_b(33)| <> b for all other b > 3. %o A239706 (Smalltalk) %o A239706 "Answer the number of bases b for which the absolute value of %o A239706 the alternate digital sum of n in base b is b. %o A239706 Valid for bases b > 0. %o A239706 Using methods which are defined in A239704 and A239705. %o A239706 Usage: n A239706 %o A239706 Answer: a(n)" %o A239706 A239706 %o A239706 ^self numOfBasesWithAltDigitalSumEQBase + %o A239706 self numOfBasesWithAltDigitalSumEQNegBase %o A239706 [by _Hieronymus Fischer_, May 08 2014] %Y A239706 Cf. A055017, A225693, A187813. %Y A239706 Cf. A239703, A239704, A239705, A239707. %Y A239706 Cf. A002378, A008864, A000040, A000005. %K A239706 nonn %O A239706 1,5 %A A239706 _Hieronymus Fischer_, May 08 2014