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 A128546 #12 Nov 09 2024 19:31:36 %S A128546 17,21,25,42,63,84,143,286,2355,5821,6618,11709,12482,33747,39571, %T A128546 129109,466957,1162248,1565166,1968084,3636638,3853951,4898376, %U A128546 6065280,13443745,13933175,17118698,22421197,24153462377 %N A128546 Inrepfigit (INverse REPetitive FIbonacci-like diGIT) numbers (or Htiek numbers). %C A128546 This sequence is similar to A007629 (Keith numbers). It consists of the numbers n>9 with the following property: n is a term of the sequence S whose first k terms are the k digits of n (with the first term equal to the units digit) and with S(n+1)=sum of the k previous terms. %e A128546 42 is in the sequence because the terms of the sequence it creates are 2, 4, 6, 10, 16, 26, 42, ... %t A128546 iKeithQ[n_Integer] := Module[{b = Reverse[IntegerDigits[n]], s, k = 0}, s = Total[b]; While[s < n, AppendTo[b, s]; k++; s = 2*s - b[[k]]]; s == n]; Select[Range[10, 100000], iKeithQ] (* _T. D. Noe_, Mar 15 2011 *) %o A128546 (C++) %o A128546 #include <stdio.h> %o A128546 // Here is a (messy) C++ code which finds the terms of the sequence below 100000000 %o A128546 int main() { %o A128546 int k2; %o A128546 for (int k = 10; k < 100000000; k++) { %o A128546 k2 = k; %o A128546 int array[9]; %o A128546 for (int i = 0; i <= 8; i++) { %o A128546 array[i] = k2 % 10; %o A128546 k2 /= 10; %o A128546 } %o A128546 bool c = true; %o A128546 int check = 8; %o A128546 for (int i = 0; i <= 8; i++) { %o A128546 if ((array[8 - i] == 0) && c) %o A128546 check--; %o A128546 else %o A128546 c = false; %o A128546 } %o A128546 bool b = false; %o A128546 int n = 0; %o A128546 while (n <= k && !b) { %o A128546 n = 0; %o A128546 for (int i = 0; i <= check; i++) %o A128546 n += array[i]; %o A128546 if (n == k) %o A128546 b = true; %o A128546 for (int i = 0; i < check; i++) %o A128546 array[i] = array[i + 1]; %o A128546 array[check] = n; %o A128546 } %o A128546 if (b) %o A128546 printf("%d", k); %o A128546 } %o A128546 return 0; %o A128546 } %Y A128546 Cf. A007629. %Y A128546 Cf. A097060 (reverse of these numbers). %K A128546 base,nonn %O A128546 1,1 %A A128546 Pierre Karpman (pierre.karpman(AT)laposte.net), Oct 23 2007