login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004050 Numbers of the form 2^j + 3^k, for j and k >= 0. 34
2, 3, 4, 5, 7, 9, 10, 11, 13, 17, 19, 25, 28, 29, 31, 33, 35, 41, 43, 59, 65, 67, 73, 82, 83, 85, 89, 91, 97, 113, 129, 131, 137, 145, 155, 209, 244, 245, 247, 251, 257, 259, 265, 275, 283, 307, 337, 371, 499, 513, 515, 521, 539, 593, 730, 731, 733, 737, 745, 755 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: Only 5, 11, 17, 35, and 259 can be expressed in two different ways. See A085634. - Robert G. Wilson v, Sep 19 2012

Number of terms less than or equal to 10^k, k > 0: 7, 29, 64, 118, 181, 254, 354, 453, 565, 708, 878, 1033, .... - Robert G. Wilson v, Sep 19 2012

Number of terms less than or equal to 10^10^k, k >= 0: 7, 708, 69923, 6962907, 696291189, 69624663057.... - Robert G. Wilson v, Sep 19 2012, Zak Seidov, Nov 29 2012

LINKS

Donovan Johnson, Table of n, a(n) for n = 1..10000

Douglas Edward Iannucci, On duplicate representations as 2^x+3^y for nonnegative integers x and y, arXiv:1907.03347 [math.NT], 2019.

MAPLE

lincom:=proc(a, b, n) local i, j, s, m; s:={}; for i from 0 to n do for j from 0 to n do m:=a^i+b^j; if m<=n then s:={op(s), m} fi od; od; lprint(sort([op(s)])); end: lincom(2, 3, 760); # Zerinvary Lajos, Feb 24 2007

MATHEMATICA

mx = 760; s = Union@ Flatten@ Table[2^i + 3^j, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx - 2^i]}] (* Robert G. Wilson v, Sep 19 2012 *)

PROG

(Haskell)

import Data.Set (singleton, deleteFindMin, insert)

a004050 n = a004050_list !! (n-1)

a004050_list = f 1 $ singleton (2, 1, 1) where

   f x s = if y /= x then y : f y s'' else f x s''

           where s'' = insert (u * 2 + v, u * 2, v) $

                       insert (u + 3 * v, u, 3 * v) s'

                 ((y, u, v), s') = deleteFindMin s

-- Reinhard Zumkeller, May 20 2015

(PARI) ispow2(n)=n>>valuation(N, 2)==1

is(n)=my(k); if(n%2, if(n<3, return(0)); for(k=0, logint(n-2, 3), if(ispow2(n-3^k), return(1))); 0, ispower(n-1, , &k); k==3 || n==2 || n==4) \\ Charles R Greathouse IV, Aug 29 2016

CROSSREFS

Cf. A085634.

Cf. A226806-A226832 (cases to 8^j + 9^k).

Cf. A004051 (primes), A000079, A000243.

Sequence in context: A160718 A122090 A066050 * A123538 A092999 A077154

Adjacent sequences:  A004047 A004048 A004049 * A004051 A004052 A004053

KEYWORD

nonn

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Sascha Kurz, Jan 02 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 12:35 EDT 2021. Contains 346273 sequences. (Running on oeis4.)