

A242100


Numbers of the form m = b^i + b^j, where b > 1 and i > j > 0.


2



6, 10, 12, 18, 20, 24, 30, 34, 36, 40, 42, 48, 56, 66, 68, 72, 80, 84, 90, 96, 108, 110, 130, 132, 136, 144, 150, 156, 160, 182, 192, 210, 222, 240, 246, 252, 258, 260, 264, 270, 272, 288, 306, 320, 324, 342, 350, 380, 384, 392, 420, 462, 506, 514, 516, 520
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

If m is a term, then there is a base b > 1 such that the baseb representation of m has digital sum = 2.
The base b for which m = b^i + b^j is not uniquely determined. Example: 12 = 2^3+2^2 = 3^2 +3^1.


LINKS

Hieronymus Fischer, Table of n, a(n) for n = 1..10000


FORMULA

a(n) < n^2 for n > 4.
lim a(n)/n^2 = 1, for n > infinity.


EXAMPLE

a(1) = 6, since 2 = 2^2 + 2^1.
a(7) = 30, since 30 = 3^3 + 3^1.
a(10) = 40.
a(10^2) = 1722.
a(10^3) = 377610.
a(10^4) = 70635620.
a(10^5) = 8830078992.
a(10^6) = 951958292172.
a(10^7) = 97932587392010.
a(10^8) = 9908034917287656.
a(10^9) = 995834160614903742.


PROG

(Smalltalk)
distinctPowersWithOffset: d
"Answers an array which holds the first n numbers of the form b^i + b^j + d, i>j>0, where b is any natural number > 1, d is any integer number, and n is the receiver (d=0 for this sequence).
Usage: n distinctPowersWithOffset: 0
Answer: #(6 10 12 ...) [first n terms]"
 n terms m 
terms := SortedCollection new.
n := self.
m := n squared max: 20.
terms := m floorDistinctPowersWithOffset: d.
^terms copyFrom: 1 to: n

floorDistinctPowersWithOffset: d
"Answers an array which holds the numbers < n of the form b^i + b^j + d, i>j>0, where b is any natural number > 1, d is any integer number, and n is the receiver (d=0 for this sequence).
Usage: n floorDistinctPowersWithOffset: 0
Answer: #(6 10 12 18 ...) [all terms < n]"
 bmax p q n m terms a 
terms := OrderedCollection new.
n := self.
bmax := ((4 * (n  d) + 1) sqrtTruncated  1) // 2.
2 to: bmax
do:
[:b 
p := b * b.
q := b.
a := p + q + d.
[a < n] whileTrue:
[[q < p and: [a < n]] whileTrue:
[terms add: a.
q := b * q.
a := p + q + d].
p := b * p.
q := b.
a := p + q + d]].
^terms asSet asOrderedCollection sorted


CROSSREFS

Cf. A001597, A018900, A239709, A239710.
Sequence in context: A262481 A119689 A066038 * A125592 A292431 A110085
Adjacent sequences: A242097 A242098 A242099 * A242101 A242102 A242103


KEYWORD

nonn


AUTHOR

Hieronymus Fischer, May 04 2014


STATUS

approved



