login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A274231
Ternary representation with index set {0, 1, 5}.
0
0, 1, 3, 4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 17, 20, 24, 25, 27, 28, 29, 30, 31, 32, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 60, 61, 65, 72, 73, 75, 76, 77, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 101, 105, 106, 108, 109, 110, 111, 112, 113
OFFSET
1,3
COMMENTS
A number m is in the sequence if m = b_r * 3^r + b_(r-1) * 3^(r-1) + ... + b_0, where b_i is in {0, 1, 5}.
The maximal sets of consecutive numbers in this sequences can be associated with the Fibonacci numbers (A000045) and Pell numbers (A000129).
REFERENCES
Thomas Koshy, Pell and Pell-Lucas Numbers with Applications, Springer New York Heidelberge Dordrecht London, Cambridge, 2014, p.193
LINKS
Wipawee Tangjai, Density and spacing properties of some families of non-standard ternary representations, Doctoral Dissertation, University of Illinois at Urbana-Champaign, 2014.
Wipawee Tangjai, A Non-standard Ternary Representation of Integers, Thai J. Math (2020) Special Issue: Annual Meeting in Mathematics 2019, 269-283.
FORMULA
G.f.: (1/(1-x))(1-x^2+x^3)(1-x^(2*3)+x^(3^2))...(1-x^(2*3^k)+x^(3^(k+1)) ...
EXAMPLE
a(1) = 0;
a(2) = 3*a(1) + 1 = 1;
a(3) = 3*a(2) = 3;
a(4) = 3*a(2) + 1;
a(5) = 3*a(1) + 5 = 5;
a(6) = 3*a(2) + 5.
MATHEMATICA
Select[Union[Table[FromDigits[IntegerDigits[k, 3] /. 2 -> 5, 3], {k, 0, 3^5 - 1}]], # < 3^5 &] (* Giovanni Resta, Jun 24 2016 *)
PROG
(R) #This program generates numbers from a(1) to a(135)
#it can be increased by changing number of k
m3<-function(x, k){
for(j in 1:k){
A=array(3*x[1])
B=array(3*x[1]+1)
C=array(3*x[1]+5)
for(i in 2:length(x)){
A=c(A, 3*x[i])
B=c(B, 3*x[i]+1)
C=c(C, 3*x[i]+5)
result=sort(union(x, union(A, union(B, C))), decreasing = FALSE)
}
x=result
}
return(result)
}
S=array(0)
U=m3(S, 3) #row r-1
V=m3(S, 4) #row r
up=ceiling((V[length(V)]-5)/3) # find the max element in r that less than in r-1
Y1=V[V<up]#take elt in r less than up
Y2=setdiff(Y1, U) #elt in r less than up not in r-1
Y3=m3(Y2, 1) # elt apply the rec to elt in Y2
Re=sort(union(V, Y3))
Re2=paste(Re, sep=", ", collapse=", ")
write.table(Re2, file="A015Sequence.txt")
CROSSREFS
Cf. A000045 (Fibonacci numbers), A000129 (Pell numbers), A001333 (Pell-Lucas numbers). Superset of A005836.
Sequence in context: A188003 A120519 A100614 * A173999 A127427 A286994
KEYWORD
nonn
AUTHOR
Wipawee Tangjai, Jun 15 2016
STATUS
approved