A227928
Powers of 2 or of 3 in order as occurring in the two ways of parenthesizing the terms in A006895.
Original entry on oeis.org
1, 2, 3, 4, 9, 8, 16, 27, 32, 81, 64, 128, 243, 256, 512, 729, 1024, 2187, 2048, 4096, 6561, 8192, 19683, 16384, 32768, 59049, 65536, 131072, 177147, 262144, 531441, 524288, 1048576, 1594323, 2097152, 4782969, 4194304, 8388608, 14348907, 16777216, 43046721
Offset: 1
. n | a(n) let x denote A006895
. ----+------
. 1 | 1 = x(0)
. 2 | 2 = x(1)
. 3 | 3 = 2 + 1 = x(1) + x(2)
. 4 | 4 = 1 + 3 = x(2) + x(3)
. 5 | 9 = 3 + 6 = x(3) + x(4)
. 6 | 8 = 6 + 2 = x(4) + x(5)
. 7 | 16 = x(6)
. 8 | 27 = 2 + 16 + 9 = x(5) + x(6) + x(7)
. 9 | 32 = 9 + 23 = x(7) + x(8)
. 10 | 81 = 23 + 58 = x(8) + x(9)
. 11 | 64 = 58 + 6 = x(9) + x(10)
. 12 | 128 = x(11)
. 13 | 243 = 6 + 128 + 109 = x(10) + x(11) + x(12)
. 14 | 256 = 109 + 147 = x(12) + x(13)
. 15 | 512 = x(14)
. 16 | 729 = 147 + 512 + 70 = x(13) + x(14) + x(15) .
A006899
Numbers of the form 2^i or 3^j.
Original entry on oeis.org
1, 2, 3, 4, 8, 9, 16, 27, 32, 64, 81, 128, 243, 256, 512, 729, 1024, 2048, 2187, 4096, 6561, 8192, 16384, 19683, 32768, 59049, 65536, 131072, 177147, 262144, 524288, 531441, 1048576, 1594323, 2097152, 4194304, 4782969, 8388608, 14348907, 16777216, 33554432
Offset: 1
- G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 78.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n = 1..500
- Boris Alexeev, Minimal DFAs for testing divisibility, arXiv:cs/0309052 [cs.CC], 2003.
- Jung-Chao Ban, Wen-Guei Hu, and Song-Sun Lin, Pattern generation problems arising in multiplicative integer systems, arXiv preprint arXiv:1207.7154 [math.DS], 2012.
- Lukas Spiegelhofer, Collisions of the binary and ternary sum-of-digits functions, arXiv:2105.11173 [math.NT], 2021.
- Eric Weisstein's World of Mathematics, Pillai's Theorem.
-
a006899 n = a006899_list !! (n-1)
a006899_list = 1 : m (tail a000079_list) (tail a000244_list) where
m us'@(u:us) vs'@(v:vs) = if u < v then u : m us vs' else v : m us' vs
-- Reinhard Zumkeller, Oct 09 2013
-
A:={seq(2^n,n=0..63)}: B:={seq(3^n,n=0..40)}: C:=sort(convert(A union B,list)): seq(C[j],j=1..39); # Emeric Deutsch, Aug 03 2005
-
seqMax = 10^20; Union[2^Range[0, Floor[Log[2, seqMax]]], 3^Range[0, Floor[Log[3, seqMax]]]] (* Stefan Steinerberger, Apr 08 2006 *)
-
is(n)=n>>valuation(n,2)==1 || n==3^valuation(n,3) \\ Charles R Greathouse IV, Aug 29 2016
-
upto(n) = my(res = vector(logint(n, 2) + logint(n, 3) + 1), t = 1); res[1] = 1; for(i = 2, 3, for(j = 1, logint(n, i), t++; res[t] = i^j)); vecsort(res) \\ David A. Corneth, Oct 26 2017
-
a(n) = my(i0= logint(3^(n-1),6), i= logint(3^n,6)); if(i > i0, 2^i, my(j=logint(2^n,6)); 3^j) \\ Ruud H.G. van Tol, Nov 10 2022
-
from sympy import integer_log
def A006899(n): return 1<Chai Wah Wu, Oct 01 2024
Showing 1-2 of 2 results.
Comments