A239706 Number of bases b for which the absolute value of the base-b alternate digital sum of n is b.
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, 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, 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
Offset: 1
Keywords
Examples
a(1) = 1, since |altDigitSum_1(1)| = 1 and |altDigitSum_b(1)| = 1 <> b for all b > 1. 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. 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.
Links
- Hieronymus Fischer, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Smalltalk
"Answer the number of bases b for which the absolute value of the alternate digital sum of n in base b is b. Valid for bases b > 0. Using methods which are defined in A239704 and A239705. Usage: n A239706 Answer: a(n)" A239706 ^self numOfBasesWithAltDigitalSumEQBase + self numOfBasesWithAltDigitalSumEQNegBase [by Hieronymus Fischer, May 08 2014]
Comments