Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A160078
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A160078 Positive integers which apparently never result in a palindrome under repeated applications of the function f(x) = x + (x with digits in binary expantion reversed). Binary analog of Lychrel numbers. +0
1
22, 26, 28, 35, 37, 41, 45, 46, 47, 49, 60, 61, 67, 75, 77, 78, 84, 86, 89, 90, 93, 94, 95, 97, 105, 106, 108, 110, 116, 120, 122, 124, 125, 131, 135, 139, 141, 147, 149, 152 (list; graph; listen)
OFFSET

1,1

COMMENT

number of iterations equals 1000, but all non-seeded numbers(under) fall out in 32 iterations

LINKS

Diofant.ru Problem: binary Lychrel numbers under 1024. (Russian language!) [From Dremov Dmitry (dremovd(AT)gmail.com), May 03 2009]

EXAMPLE

22 = 10110

10110 + 01101 = 100011

100011 + 110001 = 1010100...

Not forming polyndrom in 1000 iterations.

PROGRAM

(Python) def toSystem( n, k ) :

....d = []

....while n > 0 :

........d.append( n % k )

........n /= k

....return d[ -1::-1]

def makeint( l, system = 10 ) :

....i = 0

....for d in l :

........i = i * system + d

....return i

maxn = 1024

it = []

for i in range( 1, maxn ) :

....d = toSystem( i, 2 )

....isLychrel = True

....for j in range( 1000 ) :

........d = toSystem( makeint( d, 2 ) + makeint( d[::-1], 2 ), 2 )

........if d == d[::-1] :

............it.append( j + 1 )

............isLychrel = False

............break

....if isLychrel :

........it.append( 0 )

print 'Maximum iterations for non-seed numbers', max( it )

Lychrel = []

for i in range( len(it) ) :

....if it[i] == 0 :

........Lychrel.append( i + 1 )

print 'Count of binary Lychrel numbers', len( Lychrel )

print 'All binary lichler under', maxn

print 'Decimal form', Lychrel

print 'Binary form', map( lambda x: ''.join( map( str, toSystem( x, 2 ) ) ), Lychrel )

CROSSREFS

Binary A023108

Sequence in context: A108632 A045096 A124177 this_sequence A066059 A084891 A162422

Adjacent sequences: A160075 A160076 A160077 this_sequence A160079 A160080 A160081

KEYWORD

base,nonn

AUTHOR

Dremov Dmitry (dremovd(AT)gmail.com), May 01 2009

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 December 19 12:50 EST 2009. Contains 171053 sequences.


AT&T Labs Research