%I A128546
%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,6065280,
%U A128546 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 k first 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, ...
%o A128546 Here is a (messy) C++ code which finds the terms of the sequence below
100000000
%o A128546 #include <stdio.h>
%o A128546 int main()
%o A128546 {
%o A128546 int k2;
%o A128546 for ( int k = 10 ; k < 100000000 ; k++ )
%o A128546 {
%o A128546 k2 = k;
%o A128546 int array [9];
%o A128546 for ( int i = 0 ; i <= 8; i++ )
%o A128546 {
%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 {
%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 {
%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
%o A128546 ", k);
%o A128546 }
%o A128546 return 0;
%o A128546 }
%Y A128546 Cf. A007629.
%Y A128546 Sequence in context: A039502 A039505 A166875 this_sequence A060875 A138600
A050845
%Y A128546 Adjacent sequences: A128543 A128544 A128545 this_sequence A128547 A128548
A128549
%K A128546 base,nonn
%O A128546 1,1
%A A128546 Pierre Karpman (pierre.karpman(AT)laposte.net), Oct 23 2007
|