cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 28 results. Next

A004050 Numbers of the form 2^j + 3^k, for j and k >= 0.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A226806-A226832 (cases to 8^j + 9^k).
Cf. A004051 (primes), A000079, A000243.

Programs

  • 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
    
  • 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 *)
  • 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
    
  • Python
    def aupto(lim):
        s, pow3 = set(), 1
        while pow3 < lim:
            for j in range((lim-pow3).bit_length()):
                s.add(2**j + pow3)
            pow3 *= 3
        return sorted(set(s))
    print(aupto(756)) # Michael S. Branicky, Jul 29 2021

Formula

There are log^2 x/(log 2 log 3) + O(log x) terms up to x. Bounds on the error term can be made explicit. - Charles R Greathouse IV, Oct 28 2022

Extensions

More terms from Sascha Kurz, Jan 02 2003

A226832 Numbers of the form 8^j + 9^k, for j and k >= 0.

Original entry on oeis.org

2, 9, 10, 17, 65, 73, 82, 89, 145, 513, 521, 593, 730, 737, 793, 1241, 4097, 4105, 4177, 4825, 6562, 6569, 6625, 7073, 10657, 32769, 32777, 32849, 33497, 39329, 59050, 59057, 59113, 59561, 63145, 91817, 262145, 262153, 262225, 262873, 268705, 321193, 531442
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226831 (cases to 7^j + 9^k).

Programs

  • Mathematica
    a = 8; b = 9; mx = 600000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]
  • PARI
    ispowof(n,k)=k^valuation(n,k)==n
    is(n)=if(n%8 != 1, return(ispowof(n-1,9))); for(k=0,logint(n-1,9), if(ispowof(n-9^k,8), return(1))); 0 \\ Charles R Greathouse IV, Aug 29 2016

A226807 Numbers of the form 3^j + 4^k, for j and k >= 0.

Original entry on oeis.org

2, 4, 5, 7, 10, 13, 17, 19, 25, 28, 31, 43, 65, 67, 73, 82, 85, 91, 97, 145, 244, 247, 257, 259, 265, 283, 307, 337, 499, 730, 733, 745, 793, 985, 1025, 1027, 1033, 1051, 1105, 1267, 1753, 2188, 2191, 2203, 2251, 2443, 3211, 4097, 4099, 4105, 4123, 4177, 4339
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Comments

Conjecture: Each integer n > 8 can be written as a sum of finitely many numbers of the form 3^a + 4^b (a,b >= 0) with no one dividing another. This has been verified for all n <= 1500. - Zhi-Wei Sun, Apr 18 2023

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).

Programs

  • Mathematica
    a = 3; b = 4; mx = 5000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226809 Numbers of the form 3^j + 5^k, for j and k >= 0.

Original entry on oeis.org

2, 4, 6, 8, 10, 14, 26, 28, 32, 34, 52, 82, 86, 106, 126, 128, 134, 152, 206, 244, 248, 268, 368, 626, 628, 634, 652, 706, 730, 734, 754, 854, 868, 1354, 2188, 2192, 2212, 2312, 2812, 3126, 3128, 3134, 3152, 3206, 3368, 3854, 5312, 6562, 6566, 6586, 6686, 7186
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).
Cf. A193769, A226790 (a(n)/2 with/without repetition).

Programs

  • Mathematica
    a = 3; b = 5; mx = 8000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226810 Numbers of the form 4^j + 5^k, for j and k >= 0.

Original entry on oeis.org

2, 5, 6, 9, 17, 21, 26, 29, 41, 65, 69, 89, 126, 129, 141, 189, 257, 261, 281, 381, 626, 629, 641, 689, 881, 1025, 1029, 1049, 1149, 1649, 3126, 3129, 3141, 3189, 3381, 4097, 4101, 4121, 4149, 4221, 4721, 7221, 15626, 15629, 15641, 15689, 15881, 16385, 16389
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).

Programs

  • Mathematica
    a = 4; b = 5; mx = 20000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226816 Numbers of the form 3^j + 7^k, for j and k >= 0.

Original entry on oeis.org

2, 4, 8, 10, 16, 28, 34, 50, 52, 58, 76, 82, 88, 130, 244, 250, 292, 344, 346, 352, 370, 424, 586, 730, 736, 778, 1072, 2188, 2194, 2236, 2402, 2404, 2410, 2428, 2482, 2530, 2644, 3130, 4588, 6562, 6568, 6610, 6904, 8962, 16808, 16810, 16816, 16834, 16888
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).
Cf. A226791 ((3^j + 7^k)/2).

Programs

  • Mathematica
    a = 3; b = 7; mx = 20000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226831 Numbers of the form 7^j + 9^k, for j and k >= 0.

Original entry on oeis.org

2, 8, 10, 16, 50, 58, 82, 88, 130, 344, 352, 424, 730, 736, 778, 1072, 2402, 2410, 2482, 3130, 6562, 6568, 6610, 6904, 8962, 16808, 16816, 16888, 17536, 23368, 59050, 59056, 59098, 59392, 61450, 75856, 117650, 117658, 117730, 118378, 124210, 176698, 531442
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).
Cf. A226795 ((7^j + 9^k)/2).

Programs

  • Mathematica
    a = 7; b = 9; mx = 600000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]
  • PARI
    list(lim)=my(v=List(),J,K); for(j=0,logint((lim\=1)-1,7), J=7^j; K=1; while(J+K<=lim, listput(v,J+K); K*=9)); Set(v) \\ Charles R Greathouse IV, Feb 18 2021

A226808 Numbers of the form 2^j + 5^k, for j and k >= 0.

Original entry on oeis.org

2, 3, 5, 6, 7, 9, 13, 17, 21, 26, 27, 29, 33, 37, 41, 57, 65, 69, 89, 126, 127, 129, 133, 141, 153, 157, 189, 253, 257, 261, 281, 381, 513, 517, 537, 626, 627, 629, 633, 637, 641, 657, 689, 753, 881, 1025, 1029, 1049, 1137, 1149, 1649, 2049, 2053, 2073, 2173
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Comments

Conjecture: Each integer n > 4 can be written as a_1 + ... + a_k, where a_1,...,a_k are numbers of the form 2^a + 5^b (a,b>=0) (i.e., terms of the current sequence) with no one dividing another. This has been verified for n = 5..1200. - Zhi-Wei Sun, Apr 14 2023

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).

Programs

  • Mathematica
    a = 2; b = 5; mx = 3000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226812 Numbers of the form 3^j + 6^k, for j and k >= 0.

Original entry on oeis.org

2, 4, 7, 9, 10, 15, 28, 33, 37, 39, 45, 63, 82, 87, 117, 217, 219, 225, 243, 244, 249, 279, 297, 459, 730, 735, 765, 945, 1297, 1299, 1305, 1323, 1377, 1539, 2025, 2188, 2193, 2223, 2403, 3483, 6562, 6567, 6597, 6777, 7777, 7779, 7785, 7803, 7857, 8019, 8505
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Comments

Conjecture: Any positive integer not among 1, 3, 5, 6, 8, 12, 27 can be written as a sum of distinct terms of the current sequence with no summand dividing another. - Zhi-Wei Sun, May 01 2023

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).

Programs

  • Mathematica
    a = 3; b = 6; mx = 9000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]

A226814 Numbers of the form 5^j + 6^k, for j and k >= 0.

Original entry on oeis.org

2, 6, 7, 11, 26, 31, 37, 41, 61, 126, 131, 161, 217, 221, 241, 341, 626, 631, 661, 841, 1297, 1301, 1321, 1421, 1921, 3126, 3131, 3161, 3341, 4421, 7777, 7781, 7801, 7901, 8401, 10901, 15626, 15631, 15661, 15841, 16921, 23401, 46657, 46661, 46681, 46781, 47281
Offset: 1

Views

Author

T. D. Noe, Jun 19 2013

Keywords

Crossrefs

Cf. A004050 (2^j + 3^k), A226806-A226832 (cases to 8^j + 9^k).

Programs

  • Mathematica
    a = 5; b = 6; mx = 50000; Union[Flatten[Table[a^n + b^m, {m, 0, Log[b, mx]}, {n, 0, Log[a, mx - b^m]}]]]
Showing 1-10 of 28 results. Next