[go: up one dir, main page]

login
Search: a007089 -id:a007089
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers whose representation in base 3 (A007089) ends in an odd number of zeros.
+20
20
0, 3, 6, 12, 15, 21, 24, 27, 30, 33, 39, 42, 48, 51, 54, 57, 60, 66, 69, 75, 78, 84, 87, 93, 96, 102, 105, 108, 111, 114, 120, 123, 129, 132, 135, 138, 141, 147, 150, 156, 159, 165, 168, 174, 177, 183, 186, 189, 192, 195, 201, 204, 210, 213, 216, 219, 222, 228, 231
OFFSET
1,2
COMMENTS
Previous name: Complement of A007417.
Also numbers having infinitary divisor 3, or the same, having factor 3 in their Fermi-Dirac representation as product of distinct terms of A050376. - Vladimir Shevelev, Mar 18 2013
For n > 1: where even terms occur in A051064. - Reinhard Zumkeller, May 23 2013
If we exclude a(1) = 0, these are numbers whose squarefree part is divisible by 3, which can be partitioned into numbers whose squarefree part is congruent to 3 mod 9 (A055041) and 6 mod 9 (A055040) respectively. - Peter Munn, Jul 14 2020
The inclusion of 0 as a term might be viewed as a cultural preference: if we habitually wrote numbers enclosed in brackets and then used a null string of digits for zero, the natural number sequence in ternary would be [], [1], [2], [10], [11], [12], [20], ... . - Peter Munn, Aug 02 2020
The asymptotic density of this sequence is 1/4. - Amiram Eldar, Sep 20 2020
LINKS
Aviezri S. Fraenkel, The vile, dopey, evil and odious game players, Discrete Math. 312 (2012), no. 1, 42-46.
FORMULA
a(n) = 3 * A007417(n-1) for n > 1.
A014578(a(n)) = 0.
For n > 1, A007949(a(n)) mod 2 = 1. [Edited by Peter Munn, Aug 02 2020]
{a(n) : n >= 2} = {A052330(A042964(k)) : k >= 1} = {A064614(A036554(k)) : k >= 1}. - Peter Munn, Aug 31 2019 and Dec 06 2020
MAPLE
isA145204 := proc(n) local d, c;
if n = 0 then return true fi;
d := A007089(n); c := 0;
while irem(d, 10) = 0 do c := c+1; d := iquo(d, 10) od;
type(c, odd) end:
select(isA145204, [$(0..231)]); # Peter Luschny, Aug 05 2020
MATHEMATICA
Select[ Range[0, 235], (# // IntegerDigits[#, 3]& // Split // Last // Count[#, 0]& // OddQ)&] (* Jean-François Alcover, Mar 18 2013 *)
Join[{0}, Select[Range[235], OddQ @ IntegerExponent[#, 3] &]] (* Amiram Eldar, Sep 20 2020 *)
PROG
(Haskell)
a145204 n = a145204_list !! (n-1)
a145204_list = 0 : map (+ 1) (findIndices even a051064_list)
-- Reinhard Zumkeller, May 23 2013
(Python)
import numpy as np
def isA145204(n):
if n == 0: return True
c = 0
d = int(np.base_repr(n, base = 3))
while d % 10 == 0:
c += 1
d //= 10
return c % 2 == 1
print([n for n in range(231) if isA145204(n)]) # Peter Luschny, Aug 05 2020
CROSSREFS
Subsequence of A008585, A028983.
Subsequences: A016051, A055040, A055041, A329575.
Cf. A007089, A007417 (complement), A050376, A182581 (characteristic function).
Positions of 0s in A014578.
Excluding 0: the positions of odd numbers in A007949; equivalently, of even numbers in A051064; symmetric difference of A003159 and A036668.
Related to A042964 via A052330.
Related to A036554 via A064614.
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 04 2008
EXTENSIONS
New name using a comment of Vladimir Shevelev by Peter Luschny, Aug 05 2020
STATUS
approved
Numbers n such that n in ternary representation (A007089) has a block of exactly a prime number of consecutive zeros.
+20
3
9, 18, 27, 28, 29, 36, 45, 54, 55, 56, 63, 72, 82, 83, 84, 85, 86, 87, 88, 89, 90, 99, 108, 109, 110, 117, 126, 135, 136, 137, 144, 153, 163, 164, 165, 166, 167, 168, 169, 170, 171, 180, 189, 190, 191, 198, 207, 216, 217, 218, 225, 234, 243, 246, 247, 248, 249
OFFSET
1,1
COMMENTS
Related to the Baum-Sweet sequence, but ternary rather than binary and prime rather than odd.
a(n) is in this sequence iff n (base 3) = A007089(n) has a block (not a subblock) of a prime number (A000040) of consecutive zeros.
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 157.
LINKS
J.-P. Allouche, Finite Automata and Arithmetic, Séminaire Lotharingien de Combinatoire, B30c (1993), 23 pp.
EXAMPLE
a(1) = 9 because 9 (base 3) = 100, which has a block of 2 zeros.
a(2) = 18 because 18 (base 3) = 200, which has a block of 2 zeros.
a(3) = 27 because 27 (base 3) = 1000, which has a block of 3 zeros.
81 is not in this sequence because 81 (base 3) = 10000 has a block of 4 consecutive zeros and it does not matter that this has subblocks with 2 or 3 consecutive zeros because subblocks do not count here.
243 is in this sequence because 243 (base 3) = 100000, which has a block of 5 zeros.
252 is in this sequence because 252 (base 3) = 100100 which has two blocks of 2 consecutive zeros, but we do not require there to be only one such prime-zeros block.
2187 is in this sequence because 2187 (base 3) = 10000000, which has a block of 7 zeros.
MATHEMATICA
Select[Range[250], Or @@ (First[ # ] == 0 && PrimeQ[Length[ # ]] &) /@ Split[IntegerDigits[ #, 3]] &] (* Ray Chandler, Sep 12 2005 *)
PROG
(Python)
from re import split
from sympy import isprime
def ternary (n):
if n == 0:
return '0'
nums = []
while n:
n, r = divmod(n, 3)
nums.append(str(r))
return ''.join(reversed(nums))
seq_list, n = [], 1
while len(seq_list) < 10000:
for d in split('1+|2+', ternary(n)[1:]):
if isprime(len(d)):
seq_list.append(n)
n += 1
# W. Zane Billings, Jun 28 2019
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Sep 11 2005
STATUS
approved
The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
(Formerly M4679)
+10
754
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111
OFFSET
0,3
COMMENTS
List of binary numbers. (This comment is to assist people searching for that particular phrase. - N. J. A. Sloane, Apr 08 2016)
Or, numbers that are sums of distinct powers of 10.
Or, numbers having only digits 0 and 1 in their decimal representation.
Complement of A136399; A064770(a(n)) = a(n). - Reinhard Zumkeller, Dec 30 2007
From Rick L. Shepherd, Jun 25 2009: (Start)
Nonnegative integers with no decimal digit > 1.
Thus nonnegative integers n in base 10 such that kn can be calculated by normal addition (i.e., n + n + ... + n, with k n's (but not necessarily k + k + ... + k, with n k's)) or multiplication without requiring any carry operations for 0 <= k <= 9. (End)
For n > 1: A257773(a(n)) = 10, numbers that are Belgian-k for k=0..9. - Reinhard Zumkeller, May 08 2015
For any integer n>=0, find the binary representation and then interpret as decimal representation giving a(n). - Michael Somos, Nov 15 2015
N is in this sequence iff A007953(N) = A101337(N). A028897 is a left inverse. - M. F. Hasler, Nov 18 2019
For n > 0, numbers whose largest decimal digit is 1. - Stefano Spezia, Nov 15 2023
REFERENCES
Heinz Gumin, "Herrn von Leibniz' 'Rechnung mit Null und Eins'", Siemens AG, 3. Auflage 1979 -- contains facsimiles of Leibniz's papers from 1679 and 1703.
Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991, p. 383.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) = Sum_{i=0..m} d(i)*10^i, where Sum_{i=0..m} d(i)*2^i is the base 2 representation of n.
a(n) = (1/2)*Sum_{i>=0} (1-(-1)^floor(n/2^i))*10^i. - Benoit Cloitre, Nov 20 2001
a(n) = A097256(n)/9.
a(2n) = 10*a(n), a(2n+1) = a(2n)+1.
G.f.: 1/(1-x) * Sum_{k>=0} 10^k * x^(2^k)/(1+x^(2^k)) - for sequence as decimal integers. - Franklin T. Adams-Watters, Jun 16 2006
a(A000290(n)) = A001737(n). - Reinhard Zumkeller, Apr 25 2009
a(n) = Sum_{k>=0} A030308(n,k)*10^k. - Philippe Deléham, Oct 19 2011
For n > 0: A054055(a(n)) = 1. - Reinhard Zumkeller, Apr 25 2012
a(n) = Sum_{k=0..floor(log_2(n))} floor((Mod(n/2^k, 2)))*(10^k). - José de Jesús Camacho Medina, Jul 24 2014
EXAMPLE
a(6)=110 because (1/2)*((1-(-1)^6)*10^0 + (1-(-1)^3)*10^1 + (1-(-1)^1)*10^2) = 10 + 100.
G.f. = x + 10*x^2 + 11*x^3 + 100*x^4 + 101*x^5 + 110*x^6 + 111*x^7 + 1000*x^8 + ...
.
000 The numbers < 2^n can be regarded as vectors with
001 a fixed length n if padded with zeros on the left
010 side. This represents the n-fold Cartesian product
011 over the set {0, 1}. In the example on the left,
100 n = 3. (See also the second Python program.)
101 Binary vectors in this format can also be seen as a
110 representation of the subsets of a set with n elements.
111 - Peter Luschny, Jan 22 2024
MAPLE
A007088 := n-> convert(n, binary): seq(A007088(n), n=0..50); # R. J. Mathar, Aug 11 2009
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 2]], {n, 0, 39}]
Table[Sum[ (Floor[( Mod[f/2 ^n, 2])])*(10^n) , {n, 0, Floor[Log[2, f]]}], {f, 1, 100}] (* José de Jesús Camacho Medina, Jul 24 2014 *)
FromDigits/@Tuples[{1, 0}, 6]//Sort (* Harvey P. Dale, Aug 10 2017 *)
PROG
(PARI) {a(n) = subst( Pol( binary(n)), x, 10)}; /* Michael Somos, Jun 07 2002 */
(PARI) {a(n) = if( n<=0, 0, n%2 + 10*a(n\2))}; /* Michael Somos, Jun 07 2002 */
(PARI) a(n)=fromdigits(binary(n), 10) \\ Charles R Greathouse IV, Apr 08 2015
(Haskell)
a007088 0 = 0
a007088 n = 10 * a007088 n' + m where (n', m) = divMod n 2
-- Reinhard Zumkeller, Jan 10 2012
(Python)
def a(n): return int(bin(n)[2:])
print([a(n) for n in range(40)]) # Michael S. Branicky, Jan 10 2021
(Python)
from itertools import product
n = 4
for p in product([0, 1], repeat=n): print(''.join(str(x) for x in p))
# Peter Luschny, Jan 22 2024
CROSSREFS
The basic sequences concerning the binary expansion of n are this one, A000120 (Hammingweight: sum of bits), A000788 (partial sums of A000120), A000069 (A000120 is odd), A001969 (A000120 is even), A023416 (number of bits 0), A059015 (partial sums). Bisections A099820 and A099821.
Cf. A028897 (convert binary to decimal).
KEYWORD
nonn,base,nice,easy
STATUS
approved
Numbers in base 4.
(Formerly M0900)
+10
318
0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 200, 201, 202, 203, 210, 211, 212, 213, 220, 221, 222, 223, 230, 231, 232, 233, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333
OFFSET
0,3
COMMENTS
Nonnegative integers with no decimal digit > 3. Thus nonnegative integers in base 10 whose tripling (trebling) by normal addition or multiplication requires no carry operation. - Rick L. Shepherd, Jun 25 2009
Interpreted in base 10: a(x)+a(y) = a(z) => x+y = z. The converse is not true in general. - Karol Bacik, Sep 27 2012
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) = Sum_{d(i)*10^i: i=0, 1, ..., m}, where Sum_{d(i)*4^i: i=0, 1, ..., m} is the base 4 representation of n.
a(0) = 0, a(n) = 10*a(n/4) if n==0 (mod 4), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
MAPLE
A007090 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 4): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007090(n), n=0..54); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 4]], {n, 0, 60}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%4, a(n-1)+1, 10*a(n/4)))
(PARI) A007090(n)=sum(i=1, #n=digits(n, 4), n[i]*10^(#n-i)) \\ M. F. Hasler, Jul 25 2015 (Corrected by Jinyuan Wang, Oct 02 2019)
(PARI) apply( A007090(n)=fromdigits(digits(n, 4)), [0..66]) \\ M. F. Hasler, Nov 18 2019
(Haskell)
a007090 0 = 0
a007090 n = 10 * a007090 n' + m where (n', m) = divMod n 4
-- Reinhard Zumkeller, Apr 08 2013, Aug 11 2011
CROSSREFS
Cf. A007608, A000042, A007088 (base 2), A007089 (base 3), A007091 (base 5), A007092 (base 6), A007093 (base 7), A007094 (base 8), A007095 (base 9), A193890, A107715.
KEYWORD
nonn,easy,base
STATUS
approved
Numbers in base 5.
(Formerly M0595)
+10
318
0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 130, 131, 132, 133, 134, 140, 141, 142, 143, 144, 200, 201, 202, 203, 204, 210, 211, 212, 213, 214, 220, 221, 222, 223, 224, 230
OFFSET
0,3
COMMENTS
From Rick L. Shepherd, Jun 25 2009: (Start)
Nonnegative integers with no decimal digit > 4.
Thus nonnegative integers in base 10 whose doubling by normal addition or multiplication requires no carry operation. (End)
It appears that this sequence corresponds to the numbers n for which twice the sum of digits of n is the sum of digits of 2*n. - Rémy Sigrist, Nov 22 2009
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(0)=0 a(n)=10*a(n/5) if n==0 (mod 5) a(n)=a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
a(n) = n + 1/2*Sum_{k >= 1} 10^k*floor(n/5^k). Cf. A037454, A037462 and A102491. - Peter Bala, Dec 01 2016
MAPLE
A007091 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 5): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007091(n), n=0..58); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 5]], {n, 0, 60}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%5, a(n-1)+1, 10*a(n/5)))
(PARI) apply( A007091(n)=fromdigits(digits(n, 5)), [0..66]) \\ M. F. Hasler, Nov 18 2019
(Python)
from gmpy2 import digits
def A007091(n): return int(digits(n, 5)) # Chai Wah Wu, Dec 26 2021
CROSSREFS
Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007092 (base 6), A007093 (base 7), A007094 (base 8), A007095 (base 9).
KEYWORD
nonn,easy,base
STATUS
approved
Numbers in base 9.
(Formerly M0490)
+10
308
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84
OFFSET
0,3
COMMENTS
Also numbers without 9 as a digit.
Complement of A011539: A102683(a(n)) = 0; A068505(a(n)) != a(n)). - Reinhard Zumkeller, Dec 29 2011
REFERENCES
Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(0) = 0, a(n) = 10*a(n/9) if n==0 (mod 9), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
Sum_{n>1} 1/a(n) = A082838 = 22.92067... (Kempner series). - Bernard Schott, Dec 29 2018; edited by M. F. Hasler, Jan 13 2020
MAPLE
A007095 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 9): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007095(n), n=0..67); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 75}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%9, a(n-1)+1, 10*a(n/9)))
(PARI) A007095(n)=fromdigits(digits(n, 9)) \\ Michel Marcus, Dec 29 2018
(Magma) [ n: n in [0..74] | not 9 in Intseq(n) ]; // Bruno Berselli, May 28 2011
(sh) seq 0 1000 | grep -v 9; # Joerg Arndt, May 29 2011
(Haskell)
a007095 = f . subtract 1 where
f 0 = 0
f v = 10 * f w + r where (w, r) = divMod v 9
-- Reinhard Zumkeller, Oct 07 2014, Dec 29 2011
(Python) # and others: see OEIS Wiki page (cf. LINKS).
CROSSREFS
Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007091 (base 5), A007092 (base 6), A007093 (base 7), A007094 (base 8); A057104, A037479.
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8).
Cf. A082838.
KEYWORD
nonn,easy,base
STATUS
approved
Numbers whose base-3 representation contains no 2.
(Formerly M2353)
+10
239
0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 243, 244, 246, 247, 252, 253, 255, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352
OFFSET
1,3
COMMENTS
3 does not divide binomial(2s, s) if and only if s is a member of this sequence, where binomial(2s, s) = A000984(s) are the central binomial coefficients.
This is the lexicographically earliest increasing sequence of nonnegative numbers that contains no arithmetic progression of length 3. - Robert Craigen (craigenr(AT)cc.umanitoba.ca), Jan 29 2001
In the notation of A185256 this is the Stanley Sequence S(0,1). - N. J. A. Sloane, Mar 19 2010
Complement of A074940. - Reinhard Zumkeller, Mar 23 2003
Sums of distinct powers of 3. - Ralf Stephan, Apr 27 2003
Numbers n such that central trinomial coefficient A002426(n) == 1 (mod 3). - Emeric Deutsch and Bruce E. Sagan, Dec 04 2003
A039966(a(n)+1) = 1; A104406(n) = number of terms <= n.
Subsequence of A125292; A125291(a(n)) = 1 for n>1. - Reinhard Zumkeller, Nov 26 2006
Also final value of n - 1 written in base 2 and then read in base 3 and with finally the result translated in base 10. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007
a(n) modulo 2 is the Thue-Morse sequence A010060. - Dennis Tseng, Jul 16 2009
Also numbers such that the balanced ternary representation is the same as the base 3 representation. - Alonso del Arte, Feb 25 2011
Fixed point of the morphism: 0 -> 01; 1 -> 34; 2 -> 67; ...; n -> (3n)(3n+1), starting from a(1) = 0. - Philippe Deléham, Oct 22 2011
It appears that this sequence lists the values of n which satisfy the condition sum(binomial(n, k)^(2*j), k = 0..n) mod 3 <> 0, for any j, with offset 0. See Maple code. - Gary Detlefs, Nov 28 2011
Also, it follows from the above comment by Philippe Lallouet that the sequence must be generated by the rules: a(1) = 0, and if m is in the sequence then so are 3*m and 3*m + 1. - L. Edson Jeffery, Nov 20 2015
Add 1 to each term and we get A003278. - N. J. A. Sloane, Dec 01 2019
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section E10, pp. 317-323.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
David W. Wilson, Table of n, a(n) for n = 1..10000 (first 1024 terms from T. D. Noe)
J.-P. Allouche, G.-N. Han, and J. Shallit, On some conjectures of P. Barry, arXiv:2006.08909 [math.NT], 2020.
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
J.-P. Allouche, J. Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
Megumi Asada, Bruce Fang, Eva Fourakis, Sarah Manski, Nathan McNew, Steven J. Miller, Gwyneth Moreland, Ajmain Yamin, and Sindy Xin Zhang, Avoiding 3-Term Geometric Progressions in Hurwitz Quaternions, Williams College (2023).
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
Noam Benson-Tilsen, Samuel Brock, Brandon Faunce, Monish Kumar, Noah Dokko Stein, and Joshua Zelinsky, Total Difference Labeling of Regular Infinite Graphs, arXiv:2107.11706 [math.CO], 2021.
Raghavendra Bhat, Cristian Cobeli, and Alexandru Zaharescu, Filtered rays over iterated absolute differences on layers of integers, arXiv:2309.03922 [math.NT], 2023. See page 16.
Matvey Borodin, Hannah Han, Kaylee Ji, Tanya Khovanova, Alexander Peng, David Sun, Isabel Tu, Jason Yang, William Yang, Kevin Zhang, and Kevin Zhao, Variants of Base 3 over 2, arXiv:1901.09818 [math.NT], 2019.
Ben Chen, Richard Chen, Joshua Guo, Tanya Khovanova, Shane Lee, Neil Malur, Nastia Polina, Poonam Sahoo, Anuj Sakarda, Nathan Sheffield, and Armaan Tipirneni, On Base 3/2 and its Sequences, arXiv:1808.04304 [math.NT], 2018.
Karl Dilcher and Larry Ericksen, Hyperbinary expansions and Stern polynomials, Elec. J. Combin, Vol. 22 (2015), Article P2.24.
P. Erdős, V. Lev, G. Rauzy, C. Sandor, and A. Sarkozy, Greedy algorithm, arithmetic progressions, subset sums and divisibility, Discrete Math., Vol. 200, No. 1-3 (1999), pp. 119-135 (see Table 1). alternate link.
Joseph L. Gerver and L. Thomas Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., Vol. 33, No. 148 (1979), pp. 1353-1359.
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 45.
Kathrin Kostorz, Robert W. Hölzel and Katharina Krischer, Distributed coupling complexity in a weakly coupled oscillatory network with associative properties, New J. Phys., Vol. 15 (2013), #083010; doi:10.1088/1367-2630/15/8/083010.
Clark Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., Vol. 274, Vol. 1-3 (2004), pp. 147-160.
John W. Layman, Some Properties of a Certain Nonaveraging Sequence, J. Integer Sequences, Vol. 2 (1999), Article 99.1.3.
Manfred. Madritsch and Stephan Wagner, A central limit theorem for integer partitions, Monatsh. Math., Vol. 161, No. 1 (2010), pp. 85-114.
Richard A. Moy and David Rolnick, Novel structures in Stanley sequences, Discrete Math., Vol. 339, No. 2 (2016), pp. 689-698; arXiv preprint, arXiv:1502.06013 [math.CO], 2015.
A. M. Odlyzko and R. P. Stanley, Some curious sequences constructed with the greedy algorithm, 1978, remark 1 (PDF, PS, TeX).
Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228. [?Broken link]
Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228.
David Rolnick and Praveen S. Venkataramana, On the growth of Stanley sequences, Discrete Math., Vol. 338, No. 11 (2015), pp. 1928-1937, see p. 1930; arXiv preprint, arXiv:1408.4710 [math.CO], 2014.
Ralf Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
Zoran Sunic, Tree morphisms, transducers and integer sequences, arXiv:math/0612080 [math.CO], 2006.
B. Vasic, K. Pedagani and M. Ivkovic, High-rate girth-eight low-density parity-check codes on rectangular integer lattices, IEEE Transactions on Communications, Vol. 52, Issue 8 (2004), pp. 1248-1252.
Eric Weisstein's World of Mathematics, Central Binomial Coefficient.
FORMULA
a(n) = A005823(n)/2 = A003278(n)-1 = A033159(n)-2 = A033162(n)-3.
Numbers n such that the coefficient of x^n is > 0 in prod (k >= 0, 1 + x^(3^k)). - Benoit Cloitre, Jul 29 2003
a(n+1) = Sum_{k=0..m} b(k)* 3^k and n = Sum( b(k)* 2^k ).
a(2n+1) = 3a(n+1), a(2n+2) = a(2n+1) + 1, a(0) = 0.
a(n+1) = 3*a(floor(n/2)) + n - 2*floor(n/2). - Ralf Stephan, Apr 27 2003
G.f.: (x/(1-x)) * Sum_{k>=0} 3^k*x^2^k/(1+x^2^k). - Ralf Stephan, Apr 27 2003
a(n) = Sum_{k = 1..n-1} (1 + 3^A007814(k)) / 2. - Philippe Deléham, Jul 09 2005
From Reinhard Zumkeller, Mar 02 2008: (Start)
A081603(a(n)) = 0.
If the offset were changed to zero, then: a(0) = 0, a(n+1) = f(a(n) + 1, f(a(n)+1) where f(x, y) = if x < 3 and x <> 2 then y else if x mod 3 = 2 then f(y+1, y+1) else f(floor(x/3), y). (End)
With offset a(0) = 0: a(n) = Sum_{k>=0} A030308(n,k)*3^k. - Philippe Deléham, Oct 15 2011
a(2^n) = A003462(n). - Philippe Deléham, Jun 06 2015
We have liminf_{n->infinity} a(n)/n^(log(3)/log(2)) = 1/2 and limsup_{n->infinity} a(n)/n^(log(3)/log(2)) = 1. - Gheorghe Coserea, Sep 13 2015
a(2^k+m) = a(m) + 3^k with 1 <= m <= 2^k and 1 <= k, a(1)=0, a(2)=1. - Paul Weisenhorn, Mar 22 2020
Sum_{n>=2} 1/a(n) = 2.682853110966175430853916904584699374821677091415714815171756609672281184705... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 12 2022
A065361(a(n)) = n-1. - Rémy Sigrist, Feb 06 2023
a(n) ≍ n^k, where k = log 3/log 2 = 1.5849625007. (I believe the constant varies from 1/2 to 1.) - Charles R Greathouse IV, Mar 29 2024
EXAMPLE
a(6) = 12 because 6 = 0*2^0 + 1*2^1 + 1*2^2 = 2+4 and 12 = 0*3^0 + 1*3^1 + 1*3^2 = 3 + 9.
This sequence regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ...:
0
1
3, 4
9, 10, 12, 13
27, 28, 30, 31, 36, 37, 39, 40
81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121
... - Philippe Deléham, Jun 06 2015
MAPLE
t := (j, n) -> add(binomial(n, k)^j, k=0..n):
for i from 1 to 400 do
if(t(4, i) mod 3 <>0) then print(i) fi
od; # Gary Detlefs, Nov 28 2011
# alternative Maple program:
a:= proc(n) option remember: local k, m:
if n=1 then 0 elif n=2 then 1 elif n>2 then k:=floor(log[2](n-1)): m:=n-2^k: procname(m)+3^k: fi: end proc:
seq(a(n), n=1.. 20); # Paul Weisenhorn, Mar 22 2020
# third Maple program:
a:= n-> `if`(n=1, 0, irem(n-1, 2, 'q')+3*a(q+1)):
seq(a(n), n=1..100); # Alois P. Heinz, Jan 26 2022
MATHEMATICA
Table[FromDigits[IntegerDigits[k, 2], 3], {k, 60}]
Select[Range[0, 400], DigitCount[#, 3, 2] == 0 &] (* Harvey P. Dale, Jan 04 2012 *)
Join[{0}, Accumulate[Table[(3^IntegerExponent[n, 2] + 1)/2, {n, 57}]]] (* IWABUCHI Yu(u)ki, Aug 01 2012 *)
FromDigits[#, 3]&/@Tuples[{0, 1}, 7] (* Harvey P. Dale, May 10 2019 *)
PROG
(PARI) A=vector(100); for(n=2, #A, A[n]=if(n%2, 3*A[n\2+1], A[n-1]+1)); A \\ Charles R Greathouse IV, Jul 24 2012
(PARI) is(n)=while(n, if(n%3>1, return(0)); n\=3); 1 \\ Charles R Greathouse IV, Mar 07 2013
(PARI) a(n) = fromdigits(binary(n-1), 3); \\ Gheorghe Coserea, Jun 15 2018
(Haskell)
a005836 n = a005836_list !! (n-1)
a005836_list = filter ((== 1) . a039966) [0..]
-- Reinhard Zumkeller, Jun 09 2012, Sep 29 2011
(Python)
def A005836(n):
return int(format(n-1, 'b'), 3) # Chai Wah Wu, Jan 04 2015
(Julia)
function a(n)
m, r, b = n, 0, 1
while m > 0
m, q = divrem(m, 2)
r += b * q
b *= 3
end
r end; [a(n) for n in 0:57] |> println # Peter Luschny, Jan 03 2021
CROSSREFS
Cf. A039966 (characteristic function).
For generating functions Product_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
Row 3 of array A104257.
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
See also A000452.
KEYWORD
nonn,nice,easy,base,tabf
EXTENSIONS
Offset corrected by N. J. A. Sloane, Mar 02 2008
Edited by the Associate Editors of the OEIS, Apr 07 2009
STATUS
approved
Numbers in base 8.
(Formerly M0498)
+10
221
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77, 100, 101, 102, 103, 104, 105, 106, 107, 110, 111
OFFSET
0,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(0) = 0; a(n) = 10*a(n/8) if n == 0 (mod 8); a(n) = a(n-1) + 1 otherwise. - Benoit Cloitre, Dec 22 2002
G.f.: sum(d>=0, 10^d*(x^(8^d) +2*x^(2*8^d) +3*x^(3*8^d) +4*x^(4*8^d) +5*x^(5*8^d) +6*x^(6*8^d) +7*x^(7*8^d)) * (1-x^(8^d)) / ((1-x^(8^(d+1)))*(1-x))). - Robert Israel, Aug 03 2014
MAPLE
A007094 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 8): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007094(n), n=0..66); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[FromDigits[IntegerDigits[n, 8]], {n, 0, 70}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%8, a(n-1)+1, 10*a(n/8)))
(PARI) apply( A007094(n)=fromdigits(digits(n, 8)), [0..77]) \\ M. F. Hasler, Nov 18 2019
(Haskell)
a007094 0 = 0
a007094 n = 10 * a007094 n' + m where (n', m) = divMod n 8
-- Reinhard Zumkeller, Aug 29 2013
(Python)
def a(n): return int(oct(n)[2:])
print([a(n) for n in range(74)]) # Michael S. Branicky, Jun 28 2021
CROSSREFS
Cf. A057104; A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007091 (base 5), A007092 (base 6), A007093 (base 7), A007095 (base 9).
KEYWORD
nonn,easy,base
STATUS
approved
Numbers in base 7.
(Formerly M0511)
+10
198
0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 33, 34, 35, 36, 40, 41, 42, 43, 44, 45, 46, 50, 51, 52, 53, 54, 55, 56, 60, 61, 62, 63, 64, 65, 66, 100, 101, 102, 103, 104, 105, 106, 110, 111, 112, 113, 114, 115, 116, 120
OFFSET
0,3
REFERENCES
Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 67.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(0) = 0, a(n) = 10*a(n/7) if n==0 (mod 7), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
MAPLE
A007093 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 7): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007093(n), n=0..63); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 7]], {n, 0, 66}]
PROG
(PARI) a(n)=if(n<1, 0, if(n%7, a(n-1)+1, 10*a(n/7)))
(PARI) a(n) = fromdigits(digits(n, 7)); \\ Michel Marcus, Aug 12 2018
KEYWORD
nonn,easy,base
STATUS
approved
Numbers in base 6.
(Formerly M0532)
+10
188
0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 30, 31, 32, 33, 34, 35, 40, 41, 42, 43, 44, 45, 50, 51, 52, 53, 54, 55, 100, 101, 102, 103, 104, 105, 110, 111, 112, 113, 114, 115, 120, 121, 122, 123, 124, 125, 130, 131, 132, 133, 134, 135, 140, 141, 142, 143, 144, 145
OFFSET
0,3
COMMENTS
Nonnegative integers with no decimal digits > 5. - Karol Bacik, Sep 25 2012
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(0)=0, a(n) = 10*a(n/6) if n==0 (mod 6), and a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
a(n) = Sum{d(i)*10^i: i=0,1,...,m}, where Sum{d(i)*6^i: i=1,2,...,m} = n, and d(i) in {0,1,...,5}. - Karol Bacik, Sep 25 2012
MAPLE
A007092 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n, base, 6): return op(convert(l, base, 10, 10^nops(l))): end: seq(A007092(n), n=0..59); # Nathaniel Johnston, May 06 2011
MATHEMATICA
Table[ FromDigits[ IntegerDigits[n, 6]], {n, 0, 65}]
PROG
(PARI) a(n)=if(n%6, a(n-1)+1, if(n, 10*a(n/6), 0)) \\ corrected by Charles R Greathouse IV, Sep 25 2012
(PARI) a(n)=n=digits(n, 6); n[1]=Str(n[1]); eval(concat(n)) \\ Charles R Greathouse IV, Sep 25 2012
(PARI) apply( A007092(n)=fromdigits(digits(n, 6)), [0..66]) \\ M. F. Hasler, Nov 18 2019
(Haskell)
a007092 0 = 0
a007092 n = 10 * a007092 n' + m where (n', m) = divMod n 6
-- Reinhard Zumkeller, Mar 06 2015
CROSSREFS
Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007091 (base 5), A007093 (base 7), A007094 (base 8), A007095 (base 9).
KEYWORD
nonn,easy,base
STATUS
approved

Search completed in 0.104 seconds