Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A128546
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A128546 Inrepfigit (INverse REPetitive FIbonacci-like diGIT) numbers (or Htiek numbers). +0
2
17, 21, 25, 42, 63, 84, 143, 286, 2355, 5821, 6618, 11709, 12482, 33747, 39571, 129109, 466957, 1162248, 1565166, 1968084, 3636638, 3853951, 4898376, 6065280, 13443745, 13933175, 17118698, 22421197, 24153462377 (list; graph; listen)
OFFSET

1,1

COMMENT

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.

EXAMPLE

42 is in the sequence because the terms of the sequence it creates are 2, 4, 6, 10, 16, 26, 42, ...

PROGRAM

Here is a (messy) C++ code which finds the terms of the sequence below 100000000

#include <stdio.h>

int main()

{

int k2;

for ( int k = 10 ; k < 100000000 ; k++ )

{

k2 = k;

int array [9];

for ( int i = 0 ; i <= 8; i++ )

{

array[i] = k2 % 10;

k2 /= 10;

}

bool c = true;

int check=8;

for ( int i = 0; i <=8; i++ )

{

if ((array[8-i]==0)&&c)

check--;

else

c=false;

}

bool b = false;

int n = 0;

while ( n <= k && !b )

{

n = 0;

for ( int i = 0; i <= check; i++ )

n += array[i];

if ( n == k )

b = true;

for ( int i = 0 ; i < check ; i++ )

array[i] = array[i+1];

array[check] = n;

}

if ( b )

printf("%d

", k);

}

return 0;

}

CROSSREFS

Cf. A007629.

Sequence in context: A039502 A039505 A166875 this_sequence A060875 A138600 A050845

Adjacent sequences: A128543 A128544 A128545 this_sequence A128547 A128548 A128549

KEYWORD

base,nonn

AUTHOR

Pierre Karpman (pierre.karpman(AT)laposte.net), Oct 23 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research